From 3b12ab22af7594c7650e18bed40c3f152d2a43b3 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 7 Apr 2020 15:12:08 +0100 Subject: [PATCH] building out new budibase API --- packages/common/node_modules/.bin/babel | 1 + .../node_modules/.bin/babel-external-helpers | 1 + packages/common/node_modules/.bin/cross-env | 1 + .../common/node_modules/.bin/cross-env-shell | 1 + packages/common/node_modules/.bin/jest | 1 + packages/common/node_modules/.bin/rimraf | 1 + .../node_modules/@babel/template/LICENSE | 22 + .../node_modules/@babel/template/README.md | 19 + .../@babel/template/lib/builder.js | 83 + .../@babel/template/lib/formatters.js | 63 + .../node_modules/@babel/template/lib/index.js | 38 + .../@babel/template/lib/literal.js | 82 + .../@babel/template/lib/options.js | 82 + .../node_modules/@babel/template/lib/parse.js | 171 + .../@babel/template/lib/populate.js | 127 + .../@babel/template/lib/string.js | 24 + .../@babel/template/node_modules/.bin/parser | 1 + .../node_modules/@babel/template/package.json | 19 + .../common/node_modules/@babel/types/LICENSE | 22 + .../node_modules/@babel/types/README.md | 19 + .../@babel/types/lib/asserts/assertNode.js | 17 + .../types/lib/asserts/generated/index.js | 1444 ++++++ .../@babel/types/lib/builders/builder.js | 42 + .../flow/createTypeAnnotationBasedOnTypeof.js | 28 + .../flow/createUnionTypeAnnotation.js | 22 + .../types/lib/builders/generated/index.js | 1218 +++++ .../types/lib/builders/react/buildChildren.js | 31 + .../@babel/types/lib/clone/clone.js | 14 + .../@babel/types/lib/clone/cloneDeep.js | 14 + .../types/lib/clone/cloneDeepWithoutLoc.js | 14 + .../@babel/types/lib/clone/cloneNode.js | 101 + .../@babel/types/lib/clone/cloneWithoutLoc.js | 14 + .../@babel/types/lib/comments/addComment.js | 17 + .../@babel/types/lib/comments/addComments.js | 23 + .../lib/comments/inheritInnerComments.js | 14 + .../lib/comments/inheritLeadingComments.js | 14 + .../lib/comments/inheritTrailingComments.js | 14 + .../types/lib/comments/inheritsComments.js | 21 + .../types/lib/comments/removeComments.js | 16 + .../types/lib/constants/generated/index.js | 97 + .../@babel/types/lib/constants/index.js | 49 + .../types/lib/converters/ensureBlock.js | 14 + .../converters/gatherSequenceExpressions.js | 73 + .../lib/converters/toBindingIdentifierName.js | 16 + .../@babel/types/lib/converters/toBlock.js | 34 + .../types/lib/converters/toComputedKey.js | 15 + .../types/lib/converters/toExpression.js | 30 + .../types/lib/converters/toIdentifier.js | 25 + .../@babel/types/lib/converters/toKeyAlias.js | 48 + .../lib/converters/toSequenceExpression.js | 23 + .../types/lib/converters/toStatement.js | 44 + .../types/lib/converters/valueToNode.js | 88 + .../@babel/types/lib/definitions/core.js | 858 ++++ .../@babel/types/lib/definitions/es2015.js | 467 ++ .../types/lib/definitions/experimental.js | 241 + .../@babel/types/lib/definitions/flow.js | 461 ++ .../@babel/types/lib/definitions/index.js | 99 + .../@babel/types/lib/definitions/jsx.js | 161 + .../@babel/types/lib/definitions/misc.js | 33 + .../types/lib/definitions/placeholders.js | 33 + .../types/lib/definitions/typescript.js | 417 ++ .../@babel/types/lib/definitions/utils.js | 315 ++ .../node_modules/@babel/types/lib/index.d.ts | 2555 +++++++++ .../node_modules/@babel/types/lib/index.js | 588 +++ .../@babel/types/lib/index.js.flow | 2138 ++++++++ .../modifications/appendToMemberExpression.js | 15 + .../flow/removeTypeDuplicates.js | 74 + .../types/lib/modifications/inherits.js | 33 + .../prependToMemberExpression.js | 13 + .../lib/modifications/removeProperties.js | 30 + .../lib/modifications/removePropertiesDeep.js | 17 + .../lib/retrievers/getBindingIdentifiers.js | 103 + .../retrievers/getOuterBindingIdentifiers.js | 14 + .../@babel/types/lib/traverse/traverse.js | 55 + .../@babel/types/lib/traverse/traverseFast.js | 28 + .../@babel/types/lib/utils/inherit.js | 16 + .../react/cleanJSXElementLiteralChild.js | 47 + .../@babel/types/lib/utils/shallowEqual.js | 18 + .../validators/buildMatchMemberExpression.js | 15 + .../types/lib/validators/generated/index.js | 4573 +++++++++++++++++ .../@babel/types/lib/validators/is.js | 35 + .../@babel/types/lib/validators/isBinding.js | 33 + .../types/lib/validators/isBlockScoped.js | 16 + .../types/lib/validators/isImmutable.js | 26 + .../@babel/types/lib/validators/isLet.js | 14 + .../@babel/types/lib/validators/isNode.js | 12 + .../types/lib/validators/isNodesEquivalent.js | 67 + .../types/lib/validators/isPlaceholderType.js | 21 + .../types/lib/validators/isReferenced.js | 116 + .../@babel/types/lib/validators/isScope.js | 28 + .../lib/validators/isSpecifierDefault.js | 14 + .../@babel/types/lib/validators/isType.js | 24 + .../lib/validators/isValidES3Identifier.js | 16 + .../types/lib/validators/isValidIdentifier.js | 22 + .../@babel/types/lib/validators/isVar.js | 16 + .../types/lib/validators/matchesPattern.js | 40 + .../types/lib/validators/react/isCompatTag.js | 10 + .../lib/validators/react/isReactComponent.js | 14 + .../@babel/types/lib/validators/validate.js | 32 + .../node_modules/@babel/types/package.json | 24 + .../types/scripts/generateTypeHelpers.js | 29 + .../@babel/types/scripts/generators/docs.js | 121 + .../@babel/types/scripts/generators/flow.js | 249 + .../scripts/generators/generateAsserts.js | 44 + .../scripts/generators/generateBuilders.js | 43 + .../scripts/generators/generateConstants.js | 17 + .../scripts/generators/generateValidators.js | 78 + .../types/scripts/generators/typescript.js | 362 ++ .../types/scripts/utils/formatBuilderName.js | 10 + .../@babel/types/scripts/utils/lowerFirst.js | 4 + .../types/scripts/utils/stringifyValidator.js | 66 + .../types/scripts/utils/toFunctionName.js | 4 + .../node_modules/@jest/transform/LICENSE | 21 + .../transform/build/ScriptTransformer.d.ts | 35 + .../build/ScriptTransformer.d.ts.map | 1 + .../transform/build/ScriptTransformer.js | 884 ++++ .../build/enhanceUnexpectedTokenMessage.d.ts | 13 + .../enhanceUnexpectedTokenMessage.d.ts.map | 1 + .../build/enhanceUnexpectedTokenMessage.js | 75 + .../@jest/transform/build/index.d.ts | 11 + .../@jest/transform/build/index.d.ts.map | 1 + .../@jest/transform/build/index.js | 85 + .../transform/build/shouldInstrument.d.ts | 10 + .../transform/build/shouldInstrument.d.ts.map | 1 + .../@jest/transform/build/shouldInstrument.js | 191 + .../build/ts3.4/ScriptTransformer.d.ts | 35 + .../ts3.4/enhanceUnexpectedTokenMessage.d.ts | 13 + .../@jest/transform/build/ts3.4/index.d.ts | 11 + .../build/ts3.4/shouldInstrument.d.ts | 10 + .../@jest/transform/build/ts3.4/types.d.ts | 43 + .../@jest/transform/build/types.d.ts | 43 + .../@jest/transform/build/types.d.ts.map | 1 + .../@jest/transform/build/types.js | 1 + .../node_modules/@jest/transform/package.json | 54 + .../common/node_modules/@jest/types/LICENSE | 21 + .../@jest/types/build/Circus.d.ts | 177 + .../@jest/types/build/Circus.d.ts.map | 1 + .../node_modules/@jest/types/build/Circus.js | 1 + .../@jest/types/build/Config.d.ts | 420 ++ .../@jest/types/build/Config.d.ts.map | 1 + .../node_modules/@jest/types/build/Config.js | 15 + .../@jest/types/build/Global.d.ts | 77 + .../@jest/types/build/Global.d.ts.map | 1 + .../node_modules/@jest/types/build/Global.js | 1 + .../@jest/types/build/TestResult.d.ts | 31 + .../@jest/types/build/TestResult.d.ts.map | 1 + .../@jest/types/build/TestResult.js | 1 + .../@jest/types/build/Transform.d.ts | 13 + .../@jest/types/build/Transform.d.ts.map | 1 + .../@jest/types/build/Transform.js | 1 + .../node_modules/@jest/types/build/index.d.ts | 13 + .../@jest/types/build/index.d.ts.map | 1 + .../node_modules/@jest/types/build/index.js | 1 + .../@jest/types/build/ts3.4/Circus.d.ts | 178 + .../@jest/types/build/ts3.4/Config.d.ts | 421 ++ .../@jest/types/build/ts3.4/Global.d.ts | 78 + .../@jest/types/build/ts3.4/TestResult.d.ts | 31 + .../@jest/types/build/ts3.4/Transform.d.ts | 13 + .../@jest/types/build/ts3.4/index.d.ts | 13 + .../node_modules/@jest/types/package.json | 35 + .../common/node_modules/@types/yargs/LICENSE | 21 + .../node_modules/@types/yargs/README.md | 16 + .../node_modules/@types/yargs/index.d.ts | 784 +++ .../node_modules/@types/yargs/package.json | 66 + .../node_modules/@types/yargs/yargs.d.ts | 9 + .../node_modules/ansi-styles/index.d.ts | 197 + .../common/node_modules/ansi-styles/index.js | 163 + .../common/node_modules/ansi-styles/license | 9 + .../node_modules/ansi-styles/package.json | 57 + .../common/node_modules/ansi-styles/readme.md | 158 + packages/common/node_modules/anymatch/LICENSE | 15 + .../common/node_modules/anymatch/README.md | 87 + .../common/node_modules/anymatch/index.d.ts | 19 + .../common/node_modules/anymatch/index.js | 102 + .../common/node_modules/anymatch/package.json | 48 + .../common/node_modules/babel-jest/LICENSE | 21 + .../common/node_modules/babel-jest/README.md | 25 + .../node_modules/babel-jest/build/index.d.ts | 16 + .../babel-jest/build/index.d.ts.map | 1 + .../node_modules/babel-jest/build/index.js | 323 ++ .../babel-jest/build/loadBabelConfig.d.ts | 8 + .../babel-jest/build/loadBabelConfig.d.ts.map | 1 + .../babel-jest/build/loadBabelConfig.js | 21 + .../babel-jest/build/ts3.4/index.d.ts | 16 + .../build/ts3.4/loadBabelConfig.d.ts | 8 + .../node_modules/babel-jest/package.json | 42 + .../babel-plugin-istanbul/CHANGELOG.md | 306 ++ .../babel-plugin-istanbul/LICENSE | 27 + .../babel-plugin-istanbul/README.md | 137 + .../babel-plugin-istanbul/lib/index.js | 170 + .../lib/load-nyc-config-sync.js | 20 + .../babel-plugin-istanbul/package.json | 73 + .../babel-plugin-jest-hoist/LICENSE | 21 + .../babel-plugin-jest-hoist/README.md | 33 + .../babel-plugin-jest-hoist/build/index.d.ts | 13 + .../build/index.d.ts.map | 1 + .../babel-plugin-jest-hoist/build/index.js | 194 + .../build/ts3.4/index.d.ts | 13 + .../babel-plugin-jest-hoist/package.json | 33 + .../node_modules/babel-preset-jest/LICENSE | 21 + .../node_modules/babel-preset-jest/README.md | 33 + .../node_modules/babel-preset-jest/index.js | 14 + .../babel-preset-jest/package.json | 25 + .../common/node_modules/braces/CHANGELOG.md | 184 + packages/common/node_modules/braces/LICENSE | 21 + packages/common/node_modules/braces/README.md | 593 +++ packages/common/node_modules/braces/index.js | 170 + .../common/node_modules/braces/lib/compile.js | 57 + .../node_modules/braces/lib/constants.js | 57 + .../common/node_modules/braces/lib/expand.js | 113 + .../common/node_modules/braces/lib/parse.js | 333 ++ .../node_modules/braces/lib/stringify.js | 32 + .../common/node_modules/braces/lib/utils.js | 112 + .../common/node_modules/braces/package.json | 77 + packages/common/node_modules/chalk/index.d.ts | 411 ++ packages/common/node_modules/chalk/license | 9 + .../common/node_modules/chalk/package.json | 63 + packages/common/node_modules/chalk/readme.md | 304 ++ .../common/node_modules/chalk/source/index.js | 233 + .../node_modules/chalk/source/templates.js | 134 + .../common/node_modules/chalk/source/util.js | 39 + .../node_modules/color-convert/CHANGELOG.md | 54 + .../common/node_modules/color-convert/LICENSE | 21 + .../node_modules/color-convert/README.md | 68 + .../node_modules/color-convert/conversions.js | 839 +++ .../node_modules/color-convert/index.js | 81 + .../node_modules/color-convert/package.json | 48 + .../node_modules/color-convert/route.js | 97 + .../common/node_modules/date-fns/CHANGELOG.md | 1113 ++++ .../common/node_modules/date-fns/LICENSE.md | 4 + .../common/node_modules/date-fns/README.md | 45 + .../getTimezoneOffsetInMilliseconds/index.js | 21 + .../node_modules/date-fns/_lib/package.json | 3 + .../node_modules/date-fns/add_days/index.d.ts | 4 + .../node_modules/date-fns/add_days/index.js | 26 + .../date-fns/add_days/index.js.flow | 6 + .../date-fns/add_days/package.json | 3 + .../date-fns/add_hours/index.d.ts | 4 + .../node_modules/date-fns/add_hours/index.js | 26 + .../date-fns/add_hours/index.js.flow | 6 + .../date-fns/add_hours/package.json | 3 + .../date-fns/add_iso_years/index.d.ts | 4 + .../date-fns/add_iso_years/index.js | 27 + .../date-fns/add_iso_years/index.js.flow | 6 + .../date-fns/add_iso_years/package.json | 3 + .../date-fns/add_milliseconds/index.d.ts | 4 + .../date-fns/add_milliseconds/index.js | 25 + .../date-fns/add_milliseconds/index.js.flow | 6 + .../date-fns/add_milliseconds/package.json | 3 + .../date-fns/add_minutes/index.d.ts | 4 + .../date-fns/add_minutes/index.js | 26 + .../date-fns/add_minutes/index.js.flow | 6 + .../date-fns/add_minutes/package.json | 3 + .../date-fns/add_months/index.d.ts | 4 + .../node_modules/date-fns/add_months/index.js | 34 + .../date-fns/add_months/index.js.flow | 6 + .../date-fns/add_months/package.json | 3 + .../date-fns/add_quarters/index.d.ts | 4 + .../date-fns/add_quarters/index.js | 25 + .../date-fns/add_quarters/index.js.flow | 6 + .../date-fns/add_quarters/package.json | 3 + .../date-fns/add_seconds/index.d.ts | 4 + .../date-fns/add_seconds/index.js | 24 + .../date-fns/add_seconds/index.js.flow | 6 + .../date-fns/add_seconds/package.json | 3 + .../date-fns/add_weeks/index.d.ts | 4 + .../node_modules/date-fns/add_weeks/index.js | 25 + .../date-fns/add_weeks/index.js.flow | 6 + .../date-fns/add_weeks/package.json | 3 + .../date-fns/add_years/index.d.ts | 4 + .../node_modules/date-fns/add_years/index.js | 24 + .../date-fns/add_years/index.js.flow | 6 + .../date-fns/add_years/package.json | 3 + .../are_ranges_overlapping/index.d.ts | 4 + .../date-fns/are_ranges_overlapping/index.js | 44 + .../are_ranges_overlapping/index.js.flow | 8 + .../are_ranges_overlapping/package.json | 3 + .../date-fns/closest_index_to/index.d.ts | 4 + .../date-fns/closest_index_to/index.js | 49 + .../date-fns/closest_index_to/index.js.flow | 6 + .../date-fns/closest_index_to/package.json | 3 + .../date-fns/closest_to/index.d.ts | 4 + .../node_modules/date-fns/closest_to/index.js | 47 + .../date-fns/closest_to/index.js.flow | 6 + .../date-fns/closest_to/package.json | 3 + .../date-fns/compare_asc/index.d.ts | 4 + .../date-fns/compare_asc/index.js | 51 + .../date-fns/compare_asc/index.js.flow | 6 + .../date-fns/compare_asc/package.json | 3 + .../date-fns/compare_desc/index.d.ts | 4 + .../date-fns/compare_desc/index.js | 51 + .../date-fns/compare_desc/index.js.flow | 6 + .../date-fns/compare_desc/package.json | 3 + .../difference_in_calendar_days/index.d.ts | 4 + .../difference_in_calendar_days/index.js | 41 + .../difference_in_calendar_days/index.js.flow | 6 + .../difference_in_calendar_days/package.json | 3 + .../index.d.ts | 4 + .../difference_in_calendar_iso_weeks/index.js | 42 + .../index.js.flow | 6 + .../package.json | 3 + .../index.d.ts | 4 + .../difference_in_calendar_iso_years/index.js | 28 + .../index.js.flow | 6 + .../package.json | 3 + .../difference_in_calendar_months/index.d.ts | 4 + .../difference_in_calendar_months/index.js | 32 + .../index.js.flow | 6 + .../package.json | 3 + .../index.d.ts | 4 + .../difference_in_calendar_quarters/index.js | 33 + .../index.js.flow | 6 + .../package.json | 3 + .../difference_in_calendar_weeks/index.d.ts | 4 + .../difference_in_calendar_weeks/index.js | 52 + .../index.js.flow | 9 + .../difference_in_calendar_weeks/package.json | 3 + .../difference_in_calendar_years/index.d.ts | 4 + .../difference_in_calendar_years/index.js | 29 + .../index.js.flow | 6 + .../difference_in_calendar_years/package.json | 3 + .../date-fns/difference_in_days/index.d.ts | 4 + .../date-fns/difference_in_days/index.js | 39 + .../date-fns/difference_in_days/index.js.flow | 6 + .../date-fns/difference_in_days/package.json | 3 + .../date-fns/difference_in_hours/index.d.ts | 4 + .../date-fns/difference_in_hours/index.js | 29 + .../difference_in_hours/index.js.flow | 6 + .../date-fns/difference_in_hours/package.json | 3 + .../difference_in_iso_years/index.d.ts | 4 + .../date-fns/difference_in_iso_years/index.js | 42 + .../difference_in_iso_years/index.js.flow | 6 + .../difference_in_iso_years/package.json | 3 + .../difference_in_milliseconds/index.d.ts | 4 + .../difference_in_milliseconds/index.js | 29 + .../difference_in_milliseconds/index.js.flow | 6 + .../difference_in_milliseconds/package.json | 3 + .../date-fns/difference_in_minutes/index.d.ts | 4 + .../date-fns/difference_in_minutes/index.js | 29 + .../difference_in_minutes/index.js.flow | 6 + .../difference_in_minutes/package.json | 3 + .../date-fns/difference_in_months/index.d.ts | 4 + .../date-fns/difference_in_months/index.js | 38 + .../difference_in_months/index.js.flow | 6 + .../difference_in_months/package.json | 3 + .../difference_in_quarters/index.d.ts | 4 + .../date-fns/difference_in_quarters/index.js | 27 + .../difference_in_quarters/index.js.flow | 6 + .../difference_in_quarters/package.json | 3 + .../date-fns/difference_in_seconds/index.d.ts | 4 + .../date-fns/difference_in_seconds/index.js | 28 + .../difference_in_seconds/index.js.flow | 6 + .../difference_in_seconds/package.json | 3 + .../date-fns/difference_in_weeks/index.d.ts | 4 + .../date-fns/difference_in_weeks/index.js | 27 + .../difference_in_weeks/index.js.flow | 6 + .../date-fns/difference_in_weeks/package.json | 3 + .../date-fns/difference_in_years/index.d.ts | 4 + .../date-fns/difference_in_years/index.js | 38 + .../difference_in_years/index.js.flow | 6 + .../date-fns/difference_in_years/package.json | 3 + .../date-fns/distance_in_words/index.d.ts | 4 + .../date-fns/distance_in_words/index.js | 203 + .../date-fns/distance_in_words/index.js.flow | 11 + .../date-fns/distance_in_words/package.json | 3 + .../distance_in_words_strict/index.d.ts | 4 + .../distance_in_words_strict/index.js | 176 + .../distance_in_words_strict/index.js.flow | 12 + .../distance_in_words_strict/package.json | 3 + .../distance_in_words_to_now/index.d.ts | 4 + .../distance_in_words_to_now/index.js | 85 + .../distance_in_words_to_now/index.js.flow | 10 + .../distance_in_words_to_now/package.json | 3 + .../common/node_modules/date-fns/docs.json | 1 + .../node_modules/date-fns/each_day/index.d.ts | 4 + .../node_modules/date-fns/each_day/index.js | 54 + .../date-fns/each_day/index.js.flow | 7 + .../date-fns/each_day/package.json | 3 + .../date-fns/end_of_day/index.d.ts | 4 + .../node_modules/date-fns/end_of_day/index.js | 25 + .../date-fns/end_of_day/index.js.flow | 5 + .../date-fns/end_of_day/package.json | 3 + .../date-fns/end_of_hour/index.d.ts | 4 + .../date-fns/end_of_hour/index.js | 25 + .../date-fns/end_of_hour/index.js.flow | 5 + .../date-fns/end_of_hour/package.json | 3 + .../date-fns/end_of_iso_week/index.d.ts | 4 + .../date-fns/end_of_iso_week/index.js | 25 + .../date-fns/end_of_iso_week/index.js.flow | 5 + .../date-fns/end_of_iso_week/package.json | 3 + .../date-fns/end_of_iso_year/index.d.ts | 4 + .../date-fns/end_of_iso_year/index.js | 33 + .../date-fns/end_of_iso_year/index.js.flow | 5 + .../date-fns/end_of_iso_year/package.json | 3 + .../date-fns/end_of_minute/index.d.ts | 4 + .../date-fns/end_of_minute/index.js | 25 + .../date-fns/end_of_minute/index.js.flow | 5 + .../date-fns/end_of_minute/package.json | 3 + .../date-fns/end_of_month/index.d.ts | 4 + .../date-fns/end_of_month/index.js | 27 + .../date-fns/end_of_month/index.js.flow | 5 + .../date-fns/end_of_month/package.json | 3 + .../date-fns/end_of_quarter/index.d.ts | 4 + .../date-fns/end_of_quarter/index.js | 28 + .../date-fns/end_of_quarter/index.js.flow | 5 + .../date-fns/end_of_quarter/package.json | 3 + .../date-fns/end_of_second/index.d.ts | 4 + .../date-fns/end_of_second/index.js | 25 + .../date-fns/end_of_second/index.js.flow | 5 + .../date-fns/end_of_second/package.json | 3 + .../date-fns/end_of_today/index.d.ts | 4 + .../date-fns/end_of_today/index.js | 21 + .../date-fns/end_of_today/index.js.flow | 3 + .../date-fns/end_of_today/package.json | 3 + .../date-fns/end_of_tomorrow/index.d.ts | 4 + .../date-fns/end_of_tomorrow/index.js | 27 + .../date-fns/end_of_tomorrow/index.js.flow | 3 + .../date-fns/end_of_tomorrow/package.json | 3 + .../date-fns/end_of_week/index.d.ts | 4 + .../date-fns/end_of_week/index.js | 38 + .../date-fns/end_of_week/index.js.flow | 8 + .../date-fns/end_of_week/package.json | 3 + .../date-fns/end_of_year/index.d.ts | 4 + .../date-fns/end_of_year/index.js | 27 + .../date-fns/end_of_year/index.js.flow | 5 + .../date-fns/end_of_year/package.json | 3 + .../date-fns/end_of_yesterday/index.d.ts | 4 + .../date-fns/end_of_yesterday/index.js | 27 + .../date-fns/end_of_yesterday/index.js.flow | 3 + .../date-fns/end_of_yesterday/package.json | 3 + .../node_modules/date-fns/format/index.d.ts | 4 + .../node_modules/date-fns/format/index.js | 328 ++ .../date-fns/format/index.js.flow | 9 + .../node_modules/date-fns/format/package.json | 3 + .../node_modules/date-fns/get_date/index.d.ts | 4 + .../node_modules/date-fns/get_date/index.js | 24 + .../date-fns/get_date/index.js.flow | 5 + .../date-fns/get_date/package.json | 3 + .../node_modules/date-fns/get_day/index.d.ts | 4 + .../node_modules/date-fns/get_day/index.js | 24 + .../date-fns/get_day/index.js.flow | 5 + .../date-fns/get_day/package.json | 3 + .../date-fns/get_day_of_year/index.d.ts | 4 + .../date-fns/get_day_of_year/index.js | 27 + .../date-fns/get_day_of_year/index.js.flow | 5 + .../date-fns/get_day_of_year/package.json | 3 + .../date-fns/get_days_in_month/index.d.ts | 4 + .../date-fns/get_days_in_month/index.js | 28 + .../date-fns/get_days_in_month/index.js.flow | 5 + .../date-fns/get_days_in_month/package.json | 3 + .../date-fns/get_days_in_year/index.d.ts | 4 + .../date-fns/get_days_in_year/index.js | 22 + .../date-fns/get_days_in_year/index.js.flow | 5 + .../date-fns/get_days_in_year/package.json | 3 + .../date-fns/get_hours/index.d.ts | 4 + .../node_modules/date-fns/get_hours/index.js | 24 + .../date-fns/get_hours/index.js.flow | 5 + .../date-fns/get_hours/package.json | 3 + .../date-fns/get_iso_day/index.d.ts | 4 + .../date-fns/get_iso_day/index.js | 32 + .../date-fns/get_iso_day/index.js.flow | 5 + .../date-fns/get_iso_day/package.json | 3 + .../date-fns/get_iso_week/index.d.ts | 4 + .../date-fns/get_iso_week/index.js | 34 + .../date-fns/get_iso_week/index.js.flow | 5 + .../date-fns/get_iso_week/package.json | 3 + .../date-fns/get_iso_weeks_in_year/index.d.ts | 4 + .../date-fns/get_iso_weeks_in_year/index.js | 33 + .../get_iso_weeks_in_year/index.js.flow | 5 + .../get_iso_weeks_in_year/package.json | 3 + .../date-fns/get_iso_year/index.d.ts | 4 + .../date-fns/get_iso_year/index.js | 45 + .../date-fns/get_iso_year/index.js.flow | 5 + .../date-fns/get_iso_year/package.json | 3 + .../date-fns/get_milliseconds/index.d.ts | 4 + .../date-fns/get_milliseconds/index.js | 24 + .../date-fns/get_milliseconds/index.js.flow | 5 + .../date-fns/get_milliseconds/package.json | 3 + .../date-fns/get_minutes/index.d.ts | 4 + .../date-fns/get_minutes/index.js | 24 + .../date-fns/get_minutes/index.js.flow | 5 + .../date-fns/get_minutes/package.json | 3 + .../date-fns/get_month/index.d.ts | 4 + .../node_modules/date-fns/get_month/index.js | 24 + .../date-fns/get_month/index.js.flow | 5 + .../date-fns/get_month/package.json | 3 + .../get_overlapping_days_in_ranges/index.d.ts | 4 + .../get_overlapping_days_in_ranges/index.js | 62 + .../index.js.flow | 8 + .../package.json | 3 + .../date-fns/get_quarter/index.d.ts | 4 + .../date-fns/get_quarter/index.js | 24 + .../date-fns/get_quarter/index.js.flow | 5 + .../date-fns/get_quarter/package.json | 3 + .../date-fns/get_seconds/index.d.ts | 4 + .../date-fns/get_seconds/index.js | 24 + .../date-fns/get_seconds/index.js.flow | 5 + .../date-fns/get_seconds/package.json | 3 + .../node_modules/date-fns/get_time/index.d.ts | 4 + .../node_modules/date-fns/get_time/index.js | 24 + .../date-fns/get_time/index.js.flow | 5 + .../date-fns/get_time/package.json | 3 + .../node_modules/date-fns/get_year/index.d.ts | 4 + .../node_modules/date-fns/get_year/index.js | 24 + .../date-fns/get_year/index.js.flow | 5 + .../date-fns/get_year/package.json | 3 + .../common/node_modules/date-fns/index.js | 156 + .../node_modules/date-fns/is_after/index.d.ts | 4 + .../node_modules/date-fns/is_after/index.js | 25 + .../date-fns/is_after/index.js.flow | 6 + .../date-fns/is_after/package.json | 3 + .../date-fns/is_before/index.d.ts | 4 + .../node_modules/date-fns/is_before/index.js | 25 + .../date-fns/is_before/index.js.flow | 6 + .../date-fns/is_before/package.json | 3 + .../node_modules/date-fns/is_date/index.d.ts | 4 + .../node_modules/date-fns/is_date/index.js | 20 + .../date-fns/is_date/index.js.flow | 5 + .../date-fns/is_date/package.json | 3 + .../node_modules/date-fns/is_equal/index.d.ts | 4 + .../node_modules/date-fns/is_equal/index.js | 28 + .../date-fns/is_equal/index.js.flow | 6 + .../date-fns/is_equal/package.json | 3 + .../date-fns/is_first_day_of_month/index.d.ts | 4 + .../date-fns/is_first_day_of_month/index.js | 22 + .../is_first_day_of_month/index.js.flow | 5 + .../is_first_day_of_month/package.json | 3 + .../date-fns/is_friday/index.d.ts | 4 + .../node_modules/date-fns/is_friday/index.js | 22 + .../date-fns/is_friday/index.js.flow | 5 + .../date-fns/is_friday/package.json | 3 + .../date-fns/is_future/index.d.ts | 4 + .../node_modules/date-fns/is_future/index.js | 22 + .../date-fns/is_future/index.js.flow | 5 + .../date-fns/is_future/package.json | 3 + .../date-fns/is_last_day_of_month/index.d.ts | 4 + .../date-fns/is_last_day_of_month/index.js | 25 + .../is_last_day_of_month/index.js.flow | 5 + .../is_last_day_of_month/package.json | 3 + .../date-fns/is_leap_year/index.d.ts | 4 + .../date-fns/is_leap_year/index.js | 24 + .../date-fns/is_leap_year/index.js.flow | 5 + .../date-fns/is_leap_year/package.json | 3 + .../date-fns/is_monday/index.d.ts | 4 + .../node_modules/date-fns/is_monday/index.js | 22 + .../date-fns/is_monday/index.js.flow | 5 + .../date-fns/is_monday/package.json | 3 + .../node_modules/date-fns/is_past/index.d.ts | 4 + .../node_modules/date-fns/is_past/index.js | 22 + .../date-fns/is_past/index.js.flow | 5 + .../date-fns/is_past/package.json | 3 + .../date-fns/is_same_day/index.d.ts | 4 + .../date-fns/is_same_day/index.js | 29 + .../date-fns/is_same_day/index.js.flow | 6 + .../date-fns/is_same_day/package.json | 3 + .../date-fns/is_same_hour/index.d.ts | 4 + .../date-fns/is_same_hour/index.js | 29 + .../date-fns/is_same_hour/index.js.flow | 6 + .../date-fns/is_same_hour/package.json | 3 + .../date-fns/is_same_iso_week/index.d.ts | 4 + .../date-fns/is_same_iso_week/index.js | 28 + .../date-fns/is_same_iso_week/index.js.flow | 6 + .../date-fns/is_same_iso_week/package.json | 3 + .../date-fns/is_same_iso_year/index.d.ts | 4 + .../date-fns/is_same_iso_year/index.js | 31 + .../date-fns/is_same_iso_year/index.js.flow | 6 + .../date-fns/is_same_iso_year/package.json | 3 + .../date-fns/is_same_minute/index.d.ts | 4 + .../date-fns/is_same_minute/index.js | 30 + .../date-fns/is_same_minute/index.js.flow | 6 + .../date-fns/is_same_minute/package.json | 3 + .../date-fns/is_same_month/index.d.ts | 4 + .../date-fns/is_same_month/index.js | 29 + .../date-fns/is_same_month/index.js.flow | 6 + .../date-fns/is_same_month/package.json | 3 + .../date-fns/is_same_quarter/index.d.ts | 4 + .../date-fns/is_same_quarter/index.js | 29 + .../date-fns/is_same_quarter/index.js.flow | 6 + .../date-fns/is_same_quarter/package.json | 3 + .../date-fns/is_same_second/index.d.ts | 4 + .../date-fns/is_same_second/index.js | 30 + .../date-fns/is_same_second/index.js.flow | 6 + .../date-fns/is_same_second/package.json | 3 + .../date-fns/is_same_week/index.d.ts | 4 + .../date-fns/is_same_week/index.js | 41 + .../date-fns/is_same_week/index.js.flow | 9 + .../date-fns/is_same_week/package.json | 3 + .../date-fns/is_same_year/index.d.ts | 4 + .../date-fns/is_same_year/index.js | 28 + .../date-fns/is_same_year/index.js.flow | 6 + .../date-fns/is_same_year/package.json | 3 + .../date-fns/is_saturday/index.d.ts | 4 + .../date-fns/is_saturday/index.js | 22 + .../date-fns/is_saturday/index.js.flow | 5 + .../date-fns/is_saturday/package.json | 3 + .../date-fns/is_sunday/index.d.ts | 4 + .../node_modules/date-fns/is_sunday/index.js | 22 + .../date-fns/is_sunday/index.js.flow | 5 + .../date-fns/is_sunday/package.json | 3 + .../date-fns/is_this_hour/index.d.ts | 4 + .../date-fns/is_this_hour/index.js | 23 + .../date-fns/is_this_hour/index.js.flow | 5 + .../date-fns/is_this_hour/package.json | 3 + .../date-fns/is_this_iso_week/index.d.ts | 4 + .../date-fns/is_this_iso_week/index.js | 24 + .../date-fns/is_this_iso_week/index.js.flow | 5 + .../date-fns/is_this_iso_week/package.json | 3 + .../date-fns/is_this_iso_year/index.d.ts | 4 + .../date-fns/is_this_iso_year/index.js | 25 + .../date-fns/is_this_iso_year/index.js.flow | 5 + .../date-fns/is_this_iso_year/package.json | 3 + .../date-fns/is_this_minute/index.d.ts | 4 + .../date-fns/is_this_minute/index.js | 23 + .../date-fns/is_this_minute/index.js.flow | 5 + .../date-fns/is_this_minute/package.json | 3 + .../date-fns/is_this_month/index.d.ts | 4 + .../date-fns/is_this_month/index.js | 22 + .../date-fns/is_this_month/index.js.flow | 5 + .../date-fns/is_this_month/package.json | 3 + .../date-fns/is_this_quarter/index.d.ts | 4 + .../date-fns/is_this_quarter/index.js | 22 + .../date-fns/is_this_quarter/index.js.flow | 5 + .../date-fns/is_this_quarter/package.json | 3 + .../date-fns/is_this_second/index.d.ts | 4 + .../date-fns/is_this_second/index.js | 23 + .../date-fns/is_this_second/index.js.flow | 5 + .../date-fns/is_this_second/package.json | 3 + .../date-fns/is_this_week/index.d.ts | 4 + .../date-fns/is_this_week/index.js | 30 + .../date-fns/is_this_week/index.js.flow | 8 + .../date-fns/is_this_week/package.json | 3 + .../date-fns/is_this_year/index.d.ts | 4 + .../date-fns/is_this_year/index.js | 22 + .../date-fns/is_this_year/index.js.flow | 5 + .../date-fns/is_this_year/package.json | 3 + .../date-fns/is_thursday/index.d.ts | 4 + .../date-fns/is_thursday/index.js | 22 + .../date-fns/is_thursday/index.js.flow | 5 + .../date-fns/is_thursday/package.json | 3 + .../node_modules/date-fns/is_today/index.d.ts | 4 + .../node_modules/date-fns/is_today/index.js | 22 + .../date-fns/is_today/index.js.flow | 5 + .../date-fns/is_today/package.json | 3 + .../date-fns/is_tomorrow/index.d.ts | 4 + .../date-fns/is_tomorrow/index.js | 24 + .../date-fns/is_tomorrow/index.js.flow | 5 + .../date-fns/is_tomorrow/package.json | 3 + .../date-fns/is_tuesday/index.d.ts | 4 + .../node_modules/date-fns/is_tuesday/index.js | 22 + .../date-fns/is_tuesday/index.js.flow | 5 + .../date-fns/is_tuesday/package.json | 3 + .../node_modules/date-fns/is_valid/index.d.ts | 4 + .../node_modules/date-fns/is_valid/index.js | 35 + .../date-fns/is_valid/index.js.flow | 5 + .../date-fns/is_valid/package.json | 3 + .../date-fns/is_wednesday/index.d.ts | 4 + .../date-fns/is_wednesday/index.js | 22 + .../date-fns/is_wednesday/index.js.flow | 5 + .../date-fns/is_wednesday/package.json | 3 + .../date-fns/is_weekend/index.d.ts | 4 + .../node_modules/date-fns/is_weekend/index.js | 24 + .../date-fns/is_weekend/index.js.flow | 5 + .../date-fns/is_weekend/package.json | 3 + .../date-fns/is_within_range/index.d.ts | 4 + .../date-fns/is_within_range/index.js | 42 + .../date-fns/is_within_range/index.js.flow | 7 + .../date-fns/is_within_range/package.json | 3 + .../date-fns/is_yesterday/index.d.ts | 4 + .../date-fns/is_yesterday/index.js | 24 + .../date-fns/is_yesterday/index.js.flow | 5 + .../date-fns/is_yesterday/package.json | 3 + .../date-fns/last_day_of_iso_week/index.d.ts | 4 + .../date-fns/last_day_of_iso_week/index.js | 25 + .../last_day_of_iso_week/index.js.flow | 5 + .../last_day_of_iso_week/package.json | 3 + .../date-fns/last_day_of_iso_year/index.d.ts | 4 + .../date-fns/last_day_of_iso_year/index.js | 33 + .../last_day_of_iso_year/index.js.flow | 5 + .../last_day_of_iso_year/package.json | 3 + .../date-fns/last_day_of_month/index.d.ts | 4 + .../date-fns/last_day_of_month/index.js | 27 + .../date-fns/last_day_of_month/index.js.flow | 5 + .../date-fns/last_day_of_month/package.json | 3 + .../date-fns/last_day_of_quarter/index.d.ts | 4 + .../date-fns/last_day_of_quarter/index.js | 28 + .../last_day_of_quarter/index.js.flow | 5 + .../date-fns/last_day_of_quarter/package.json | 3 + .../date-fns/last_day_of_week/index.d.ts | 4 + .../date-fns/last_day_of_week/index.js | 38 + .../date-fns/last_day_of_week/index.js.flow | 8 + .../date-fns/last_day_of_week/package.json | 3 + .../date-fns/last_day_of_year/index.d.ts | 4 + .../date-fns/last_day_of_year/index.js | 27 + .../date-fns/last_day_of_year/index.js.flow | 5 + .../date-fns/last_day_of_year/package.json | 3 + .../build_formatting_tokens_reg_exp/index.js | 28 + .../date-fns/locale/_lib/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/ar/build_format_locale/index.js | 73 + .../date-fns/locale/ar/index.d.ts | 1 + .../node_modules/date-fns/locale/ar/index.js | 12 + .../date-fns/locale/ar/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/be/build_format_locale/index.js | 73 + .../date-fns/locale/be/index.d.ts | 1 + .../node_modules/date-fns/locale/be/index.js | 12 + .../date-fns/locale/be/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/bg/build_format_locale/index.js | 87 + .../date-fns/locale/bg/index.d.ts | 1 + .../node_modules/date-fns/locale/bg/index.js | 12 + .../date-fns/locale/bg/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/ca/build_format_locale/index.js | 84 + .../date-fns/locale/ca/index.d.ts | 1 + .../node_modules/date-fns/locale/ca/index.js | 12 + .../date-fns/locale/ca/package.json | 3 + .../build_distance_in_words_locale/index.js | 202 + .../locale/cs/build_format_locale/index.js | 73 + .../date-fns/locale/cs/index.d.ts | 1 + .../node_modules/date-fns/locale/cs/index.js | 12 + .../date-fns/locale/cs/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/da/build_format_locale/index.js | 73 + .../date-fns/locale/da/index.d.ts | 1 + .../node_modules/date-fns/locale/da/index.js | 13 + .../date-fns/locale/da/package.json | 3 + .../build_distance_in_words_locale/index.js | 185 + .../locale/de/build_format_locale/index.js | 77 + .../date-fns/locale/de/index.d.ts | 1 + .../node_modules/date-fns/locale/de/index.js | 13 + .../date-fns/locale/de/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/el/build_format_locale/index.js | 87 + .../date-fns/locale/el/index.d.ts | 1 + .../node_modules/date-fns/locale/el/index.js | 12 + .../date-fns/locale/el/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/en/build_format_locale/index.js | 88 + .../date-fns/locale/en/index.d.ts | 1 + .../node_modules/date-fns/locale/en/index.js | 11 + .../date-fns/locale/en/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/eo/build_format_locale/index.js | 69 + .../date-fns/locale/eo/index.d.ts | 1 + .../node_modules/date-fns/locale/eo/index.js | 11 + .../date-fns/locale/eo/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/es/build_format_locale/index.js | 73 + .../date-fns/locale/es/index.d.ts | 1 + .../node_modules/date-fns/locale/es/index.js | 14 + .../date-fns/locale/es/package.json | 3 + .../build_distance_in_words_locale/index.js | 136 + .../locale/fi/build_format_locale/index.js | 66 + .../date-fns/locale/fi/index.d.ts | 1 + .../node_modules/date-fns/locale/fi/index.js | 12 + .../date-fns/locale/fi/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/fil/build_format_locale/index.js | 106 + .../date-fns/locale/fil/index.d.ts | 1 + .../node_modules/date-fns/locale/fil/index.js | 12 + .../date-fns/locale/fil/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/fr/build_format_locale/index.js | 122 + .../date-fns/locale/fr/index.d.ts | 1 + .../node_modules/date-fns/locale/fr/index.js | 13 + .../date-fns/locale/fr/package.json | 3 + .../build_distance_in_words_locale/index.js | 178 + .../locale/hr/build_format_locale/index.js | 83 + .../date-fns/locale/hr/index.d.ts | 1 + .../node_modules/date-fns/locale/hr/index.js | 12 + .../date-fns/locale/hr/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/hu/build_format_locale/index.js | 88 + .../date-fns/locale/hu/index.d.ts | 1 + .../node_modules/date-fns/locale/hu/index.js | 11 + .../date-fns/locale/hu/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/id/build_format_locale/index.js | 86 + .../date-fns/locale/id/index.d.ts | 1 + .../node_modules/date-fns/locale/id/index.js | 13 + .../date-fns/locale/id/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/is/build_format_locale/index.js | 73 + .../date-fns/locale/is/index.d.ts | 1 + .../node_modules/date-fns/locale/is/index.js | 12 + .../date-fns/locale/is/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/it/build_format_locale/index.js | 73 + .../date-fns/locale/it/index.d.ts | 1 + .../node_modules/date-fns/locale/it/index.js | 12 + .../date-fns/locale/it/package.json | 3 + .../build_distance_in_words_locale/index.js | 109 + .../locale/ja/build_format_locale/index.js | 73 + .../date-fns/locale/ja/index.d.ts | 1 + .../node_modules/date-fns/locale/ja/index.js | 13 + .../date-fns/locale/ja/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/ko/build_format_locale/index.js | 73 + .../date-fns/locale/ko/index.d.ts | 1 + .../node_modules/date-fns/locale/ko/index.js | 12 + .../date-fns/locale/ko/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/mk/build_format_locale/index.js | 83 + .../date-fns/locale/mk/index.d.ts | 1 + .../node_modules/date-fns/locale/mk/index.js | 12 + .../date-fns/locale/mk/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/nb/build_format_locale/index.js | 73 + .../date-fns/locale/nb/index.d.ts | 1 + .../node_modules/date-fns/locale/nb/index.js | 12 + .../date-fns/locale/nb/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/nl/build_format_locale/index.js | 73 + .../date-fns/locale/nl/index.d.ts | 1 + .../node_modules/date-fns/locale/nl/index.js | 13 + .../date-fns/locale/nl/package.json | 3 + .../node_modules/date-fns/locale/package.json | 3 + .../build_distance_in_words_locale/index.js | 165 + .../locale/pl/build_format_locale/index.js | 70 + .../date-fns/locale/pl/index.d.ts | 1 + .../node_modules/date-fns/locale/pl/index.js | 13 + .../date-fns/locale/pl/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/pt/build_format_locale/index.js | 73 + .../date-fns/locale/pt/index.d.ts | 1 + .../node_modules/date-fns/locale/pt/index.js | 12 + .../date-fns/locale/pt/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/ro/build_format_locale/index.js | 74 + .../date-fns/locale/ro/index.d.ts | 1 + .../node_modules/date-fns/locale/ro/index.js | 12 + .../date-fns/locale/ro/package.json | 3 + .../build_distance_in_words_locale/index.js | 234 + .../locale/ru/build_format_locale/index.js | 89 + .../date-fns/locale/ru/index.d.ts | 1 + .../node_modules/date-fns/locale/ru/index.js | 11 + .../date-fns/locale/ru/package.json | 3 + .../build_distance_in_words_locale/index.js | 202 + .../locale/sk/build_format_locale/index.js | 73 + .../date-fns/locale/sk/index.d.ts | 1 + .../node_modules/date-fns/locale/sk/index.js | 12 + .../date-fns/locale/sk/package.json | 3 + .../build_distance_in_words_locale/index.js | 133 + .../locale/sl/build_format_locale/index.js | 73 + .../date-fns/locale/sl/index.d.ts | 1 + .../node_modules/date-fns/locale/sl/index.js | 12 + .../date-fns/locale/sl/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/sr/build_format_locale/index.js | 73 + .../date-fns/locale/sr/index.d.ts | 1 + .../node_modules/date-fns/locale/sr/index.js | 12 + .../date-fns/locale/sr/package.json | 3 + .../build_distance_in_words_locale/index.js | 116 + .../locale/sv/build_format_locale/index.js | 72 + .../date-fns/locale/sv/index.d.ts | 1 + .../node_modules/date-fns/locale/sv/index.js | 12 + .../date-fns/locale/sv/package.json | 3 + .../build_distance_in_words_locale/index.js | 103 + .../locale/th/build_format_locale/index.js | 61 + .../date-fns/locale/th/index.d.ts | 1 + .../node_modules/date-fns/locale/th/index.js | 12 + .../date-fns/locale/th/package.json | 3 + .../build_distance_in_words_locale/index.js | 110 + .../locale/tr/build_format_locale/index.js | 106 + .../date-fns/locale/tr/index.d.ts | 1 + .../node_modules/date-fns/locale/tr/index.js | 12 + .../date-fns/locale/tr/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/zh_cn/build_format_locale/index.js | 61 + .../date-fns/locale/zh_cn/index.d.ts | 1 + .../date-fns/locale/zh_cn/index.js | 13 + .../date-fns/locale/zh_cn/package.json | 3 + .../build_distance_in_words_locale/index.js | 99 + .../locale/zh_tw/build_format_locale/index.js | 73 + .../date-fns/locale/zh_tw/index.d.ts | 1 + .../date-fns/locale/zh_tw/index.js | 12 + .../date-fns/locale/zh_tw/package.json | 3 + .../node_modules/date-fns/max/index.d.ts | 4 + .../common/node_modules/date-fns/max/index.js | 32 + .../node_modules/date-fns/max/index.js.flow | 5 + .../node_modules/date-fns/max/package.json | 3 + .../node_modules/date-fns/min/index.d.ts | 4 + .../common/node_modules/date-fns/min/index.js | 32 + .../node_modules/date-fns/min/index.js.flow | 5 + .../node_modules/date-fns/min/package.json | 3 + .../common/node_modules/date-fns/package.json | 87 + .../node_modules/date-fns/parse/index.d.ts | 4 + .../node_modules/date-fns/parse/index.js | 332 ++ .../node_modules/date-fns/parse/index.js.flow | 8 + .../node_modules/date-fns/parse/package.json | 3 + .../node_modules/date-fns/set_date/index.d.ts | 4 + .../node_modules/date-fns/set_date/index.js | 26 + .../date-fns/set_date/index.js.flow | 6 + .../date-fns/set_date/package.json | 3 + .../node_modules/date-fns/set_day/index.d.ts | 4 + .../node_modules/date-fns/set_day/index.js | 40 + .../date-fns/set_day/index.js.flow | 9 + .../date-fns/set_day/package.json | 3 + .../date-fns/set_day_of_year/index.d.ts | 4 + .../date-fns/set_day_of_year/index.js | 27 + .../date-fns/set_day_of_year/index.js.flow | 6 + .../date-fns/set_day_of_year/package.json | 3 + .../date-fns/set_hours/index.d.ts | 4 + .../node_modules/date-fns/set_hours/index.js | 26 + .../date-fns/set_hours/index.js.flow | 6 + .../date-fns/set_hours/package.json | 3 + .../date-fns/set_iso_day/index.d.ts | 4 + .../date-fns/set_iso_day/index.js | 31 + .../date-fns/set_iso_day/index.js.flow | 6 + .../date-fns/set_iso_day/package.json | 3 + .../date-fns/set_iso_week/index.d.ts | 4 + .../date-fns/set_iso_week/index.js | 30 + .../date-fns/set_iso_week/index.js.flow | 6 + .../date-fns/set_iso_week/package.json | 3 + .../date-fns/set_iso_year/index.d.ts | 4 + .../date-fns/set_iso_year/index.js | 36 + .../date-fns/set_iso_year/index.js.flow | 6 + .../date-fns/set_iso_year/package.json | 3 + .../date-fns/set_milliseconds/index.d.ts | 4 + .../date-fns/set_milliseconds/index.js | 26 + .../date-fns/set_milliseconds/index.js.flow | 6 + .../date-fns/set_milliseconds/package.json | 3 + .../date-fns/set_minutes/index.d.ts | 4 + .../date-fns/set_minutes/index.js | 26 + .../date-fns/set_minutes/index.js.flow | 6 + .../date-fns/set_minutes/package.json | 3 + .../date-fns/set_month/index.d.ts | 4 + .../node_modules/date-fns/set_month/index.js | 36 + .../date-fns/set_month/index.js.flow | 6 + .../date-fns/set_month/package.json | 3 + .../date-fns/set_quarter/index.d.ts | 4 + .../date-fns/set_quarter/index.js | 28 + .../date-fns/set_quarter/index.js.flow | 6 + .../date-fns/set_quarter/package.json | 3 + .../date-fns/set_seconds/index.d.ts | 4 + .../date-fns/set_seconds/index.js | 26 + .../date-fns/set_seconds/index.js.flow | 6 + .../date-fns/set_seconds/package.json | 3 + .../node_modules/date-fns/set_year/index.d.ts | 4 + .../node_modules/date-fns/set_year/index.js | 26 + .../date-fns/set_year/index.js.flow | 6 + .../date-fns/set_year/package.json | 3 + .../date-fns/start_of_day/index.d.ts | 4 + .../date-fns/start_of_day/index.js | 25 + .../date-fns/start_of_day/index.js.flow | 5 + .../date-fns/start_of_day/package.json | 3 + .../date-fns/start_of_hour/index.d.ts | 4 + .../date-fns/start_of_hour/index.js | 25 + .../date-fns/start_of_hour/index.js.flow | 5 + .../date-fns/start_of_hour/package.json | 3 + .../date-fns/start_of_iso_week/index.d.ts | 4 + .../date-fns/start_of_iso_week/index.js | 25 + .../date-fns/start_of_iso_week/index.js.flow | 5 + .../date-fns/start_of_iso_week/package.json | 3 + .../date-fns/start_of_iso_year/index.d.ts | 4 + .../date-fns/start_of_iso_year/index.js | 32 + .../date-fns/start_of_iso_year/index.js.flow | 5 + .../date-fns/start_of_iso_year/package.json | 3 + .../date-fns/start_of_minute/index.d.ts | 4 + .../date-fns/start_of_minute/index.js | 25 + .../date-fns/start_of_minute/index.js.flow | 5 + .../date-fns/start_of_minute/package.json | 3 + .../date-fns/start_of_month/index.d.ts | 4 + .../date-fns/start_of_month/index.js | 26 + .../date-fns/start_of_month/index.js.flow | 5 + .../date-fns/start_of_month/package.json | 3 + .../date-fns/start_of_quarter/index.d.ts | 4 + .../date-fns/start_of_quarter/index.js | 28 + .../date-fns/start_of_quarter/index.js.flow | 5 + .../date-fns/start_of_quarter/package.json | 3 + .../date-fns/start_of_second/index.d.ts | 4 + .../date-fns/start_of_second/index.js | 25 + .../date-fns/start_of_second/index.js.flow | 5 + .../date-fns/start_of_second/package.json | 3 + .../date-fns/start_of_today/index.d.ts | 4 + .../date-fns/start_of_today/index.js | 21 + .../date-fns/start_of_today/index.js.flow | 3 + .../date-fns/start_of_today/package.json | 3 + .../date-fns/start_of_tomorrow/index.d.ts | 4 + .../date-fns/start_of_tomorrow/index.js | 27 + .../date-fns/start_of_tomorrow/index.js.flow | 3 + .../date-fns/start_of_tomorrow/package.json | 3 + .../date-fns/start_of_week/index.d.ts | 4 + .../date-fns/start_of_week/index.js | 38 + .../date-fns/start_of_week/index.js.flow | 8 + .../date-fns/start_of_week/package.json | 3 + .../date-fns/start_of_year/index.d.ts | 4 + .../date-fns/start_of_year/index.js | 27 + .../date-fns/start_of_year/index.js.flow | 5 + .../date-fns/start_of_year/package.json | 3 + .../date-fns/start_of_yesterday/index.d.ts | 4 + .../date-fns/start_of_yesterday/index.js | 27 + .../date-fns/start_of_yesterday/index.js.flow | 3 + .../date-fns/start_of_yesterday/package.json | 3 + .../node_modules/date-fns/sub_days/index.d.ts | 4 + .../node_modules/date-fns/sub_days/index.js | 24 + .../date-fns/sub_days/index.js.flow | 6 + .../date-fns/sub_days/package.json | 3 + .../date-fns/sub_hours/index.d.ts | 4 + .../node_modules/date-fns/sub_hours/index.js | 24 + .../date-fns/sub_hours/index.js.flow | 6 + .../date-fns/sub_hours/package.json | 3 + .../date-fns/sub_iso_years/index.d.ts | 4 + .../date-fns/sub_iso_years/index.js | 26 + .../date-fns/sub_iso_years/index.js.flow | 6 + .../date-fns/sub_iso_years/package.json | 3 + .../date-fns/sub_milliseconds/index.d.ts | 4 + .../date-fns/sub_milliseconds/index.js | 24 + .../date-fns/sub_milliseconds/index.js.flow | 6 + .../date-fns/sub_milliseconds/package.json | 3 + .../date-fns/sub_minutes/index.d.ts | 4 + .../date-fns/sub_minutes/index.js | 24 + .../date-fns/sub_minutes/index.js.flow | 6 + .../date-fns/sub_minutes/package.json | 3 + .../date-fns/sub_months/index.d.ts | 4 + .../node_modules/date-fns/sub_months/index.js | 24 + .../date-fns/sub_months/index.js.flow | 6 + .../date-fns/sub_months/package.json | 3 + .../date-fns/sub_quarters/index.d.ts | 4 + .../date-fns/sub_quarters/index.js | 24 + .../date-fns/sub_quarters/index.js.flow | 6 + .../date-fns/sub_quarters/package.json | 3 + .../date-fns/sub_seconds/index.d.ts | 4 + .../date-fns/sub_seconds/index.js | 24 + .../date-fns/sub_seconds/index.js.flow | 6 + .../date-fns/sub_seconds/package.json | 3 + .../date-fns/sub_weeks/index.d.ts | 4 + .../node_modules/date-fns/sub_weeks/index.js | 24 + .../date-fns/sub_weeks/index.js.flow | 6 + .../date-fns/sub_weeks/package.json | 3 + .../date-fns/sub_years/index.d.ts | 4 + .../node_modules/date-fns/sub_years/index.js | 24 + .../date-fns/sub_years/index.js.flow | 6 + .../date-fns/sub_years/package.json | 3 + .../common/node_modules/date-fns/typings.d.ts | 3301 ++++++++++++ .../common/node_modules/fill-range/LICENSE | 21 + .../common/node_modules/fill-range/README.md | 237 + .../common/node_modules/fill-range/index.js | 249 + .../node_modules/fill-range/package.json | 69 + packages/common/node_modules/fsevents/LICENSE | 22 + .../common/node_modules/fsevents/README.md | 77 + .../node_modules/fsevents/fsevents.d.ts | 55 + .../common/node_modules/fsevents/fsevents.js | 77 + .../node_modules/fsevents/fsevents.node | Bin 0 -> 36204 bytes .../common/node_modules/fsevents/package.json | 59 + .../common/node_modules/has-flag/index.d.ts | 39 + .../common/node_modules/has-flag/index.js | 8 + packages/common/node_modules/has-flag/license | 9 + .../common/node_modules/has-flag/package.json | 46 + .../common/node_modules/has-flag/readme.md | 89 + .../common/node_modules/is-number/LICENSE | 21 + .../common/node_modules/is-number/README.md | 187 + .../common/node_modules/is-number/index.js | 18 + .../node_modules/is-number/package.json | 82 + .../istanbul-lib-coverage/CHANGELOG.md | 165 + .../istanbul-lib-coverage/LICENSE | 24 + .../istanbul-lib-coverage/README.md | 29 + .../istanbul-lib-coverage/index.js | 64 + .../istanbul-lib-coverage/lib/coverage-map.js | 134 + .../lib/coverage-summary.js | 102 + .../lib/data-properties.js | 12 + .../lib/file-coverage.js | 264 + .../istanbul-lib-coverage/lib/percent.js | 15 + .../istanbul-lib-coverage/package.json | 48 + .../istanbul-lib-instrument/CHANGELOG.md | 548 ++ .../istanbul-lib-instrument/LICENSE | 24 + .../istanbul-lib-instrument/README.md | 21 + .../istanbul-lib-instrument/dist/constants.js | 22 + .../istanbul-lib-instrument/dist/index.js | 42 + .../dist/instrumenter.js | 182 + .../dist/read-coverage.js | 87 + .../dist/source-coverage.js | 121 + .../istanbul-lib-instrument/dist/visitor.js | 680 +++ .../node_modules/.bin/parser | 1 + .../node_modules/.bin/semver | 1 + .../istanbul-lib-instrument/package.json | 57 + .../node_modules/jest-haste-map/LICENSE | 21 + .../jest-haste-map/build/HasteFS.d.ts | 28 + .../jest-haste-map/build/HasteFS.d.ts.map | 1 + .../jest-haste-map/build/HasteFS.js | 193 + .../jest-haste-map/build/ModuleMap.d.ts | 49 + .../jest-haste-map/build/ModuleMap.d.ts.map | 1 + .../jest-haste-map/build/ModuleMap.js | 305 ++ .../jest-haste-map/build/blacklist.d.ts | 9 + .../jest-haste-map/build/blacklist.d.ts.map | 1 + .../jest-haste-map/build/blacklist.js | 59 + .../jest-haste-map/build/constants.d.ts | 10 + .../jest-haste-map/build/constants.d.ts.map | 1 + .../jest-haste-map/build/constants.js | 52 + .../jest-haste-map/build/crawlers/node.d.ts | 13 + .../build/crawlers/node.d.ts.map | 1 + .../jest-haste-map/build/crawlers/node.js | 308 ++ .../build/crawlers/watchman.d.ts | 14 + .../build/crawlers/watchman.d.ts.map | 1 + .../jest-haste-map/build/crawlers/watchman.js | 326 ++ .../jest-haste-map/build/getMockName.d.ts | 9 + .../jest-haste-map/build/getMockName.d.ts.map | 1 + .../jest-haste-map/build/getMockName.js | 76 + .../jest-haste-map/build/index.d.ts | 191 + .../jest-haste-map/build/index.d.ts.map | 1 + .../jest-haste-map/build/index.js | 1254 +++++ .../build/lib/FSEventsWatcher.d.ts | 45 + .../build/lib/FSEventsWatcher.d.ts.map | 1 + .../build/lib/FSEventsWatcher.js | 294 ++ .../build/lib/WatchmanWatcher.js | 400 ++ .../build/lib/dependencyExtractor.d.ts | 8 + .../build/lib/dependencyExtractor.d.ts.map | 1 + .../build/lib/dependencyExtractor.js | 100 + .../jest-haste-map/build/lib/fast_path.d.ts | 9 + .../build/lib/fast_path.d.ts.map | 1 + .../jest-haste-map/build/lib/fast_path.js | 81 + .../build/lib/getPlatformExtension.d.ts | 8 + .../build/lib/getPlatformExtension.d.ts.map | 1 + .../build/lib/getPlatformExtension.js | 31 + .../build/lib/isRegExpSupported.d.ts | 8 + .../build/lib/isRegExpSupported.d.ts.map | 1 + .../build/lib/isRegExpSupported.js | 22 + .../build/lib/normalizePathSep.d.ts | 9 + .../build/lib/normalizePathSep.d.ts.map | 1 + .../build/lib/normalizePathSep.js | 75 + .../jest-haste-map/build/ts3.4/HasteFS.d.ts | 28 + .../jest-haste-map/build/ts3.4/ModuleMap.d.ts | 49 + .../jest-haste-map/build/ts3.4/blacklist.d.ts | 9 + .../jest-haste-map/build/ts3.4/constants.d.ts | 10 + .../build/ts3.4/crawlers/node.d.ts | 13 + .../build/ts3.4/crawlers/watchman.d.ts | 14 + .../build/ts3.4/getMockName.d.ts | 9 + .../jest-haste-map/build/ts3.4/index.d.ts | 192 + .../build/ts3.4/lib/FSEventsWatcher.d.ts | 46 + .../build/ts3.4/lib/dependencyExtractor.d.ts | 8 + .../build/ts3.4/lib/fast_path.d.ts | 9 + .../build/ts3.4/lib/getPlatformExtension.d.ts | 8 + .../build/ts3.4/lib/isRegExpSupported.d.ts | 8 + .../build/ts3.4/lib/normalizePathSep.d.ts | 9 + .../jest-haste-map/build/ts3.4/types.d.ts | 97 + .../jest-haste-map/build/ts3.4/worker.d.ts | 10 + .../jest-haste-map/build/types.d.ts | 96 + .../jest-haste-map/build/types.d.ts.map | 1 + .../jest-haste-map/build/types.js | 1 + .../jest-haste-map/build/worker.d.ts | 10 + .../jest-haste-map/build/worker.d.ts.map | 1 + .../jest-haste-map/build/worker.js | 197 + .../node_modules/.bin/node-which | 1 + .../jest-haste-map/node_modules/.bin/sane | 1 + .../node_modules/jest-haste-map/package.json | 52 + .../node_modules/jest-regex-util/LICENSE | 21 + .../jest-regex-util/build/index.d.ts | 11 + .../jest-regex-util/build/index.d.ts.map | 1 + .../jest-regex-util/build/index.js | 45 + .../jest-regex-util/build/ts3.4/index.d.ts | 11 + .../node_modules/jest-regex-util/package.json | 29 + .../node_modules/jest-serializer/LICENSE | 21 + .../node_modules/jest-serializer/README.md | 47 + .../jest-serializer/build/index.d.ts | 21 + .../jest-serializer/build/index.d.ts.map | 1 + .../jest-serializer/build/index.js | 109 + .../jest-serializer/build/ts3.4/index.d.ts | 23 + .../node_modules/jest-serializer/package.json | 29 + .../node_modules/jest-serializer/v8.d.ts | 11 + .../common/node_modules/jest-util/LICENSE | 21 + .../jest-util/build/ErrorWithStack.d.ts | 10 + .../jest-util/build/ErrorWithStack.d.ts.map | 1 + .../jest-util/build/ErrorWithStack.js | 24 + .../jest-util/build/clearLine.d.ts | 9 + .../jest-util/build/clearLine.d.ts.map | 1 + .../node_modules/jest-util/build/clearLine.js | 18 + .../build/convertDescriptorToString.d.ts | 8 + .../build/convertDescriptorToString.d.ts.map | 1 + .../build/convertDescriptorToString.js | 39 + .../jest-util/build/createDirectory.d.ts | 9 + .../jest-util/build/createDirectory.d.ts.map | 1 + .../jest-util/build/createDirectory.js | 36 + .../jest-util/build/createProcessObject.d.ts | 9 + .../build/createProcessObject.d.ts.map | 1 + .../jest-util/build/createProcessObject.js | 134 + .../jest-util/build/deepCyclicCopy.d.ts | 12 + .../jest-util/build/deepCyclicCopy.d.ts.map | 1 + .../jest-util/build/deepCyclicCopy.js | 84 + .../node_modules/jest-util/build/index.d.ts | 23 + .../jest-util/build/index.d.ts.map | 1 + .../node_modules/jest-util/build/index.js | 174 + .../jest-util/build/installCommonGlobals.d.ts | 10 + .../build/installCommonGlobals.d.ts.map | 1 + .../jest-util/build/installCommonGlobals.js | 127 + .../build/interopRequireDefault.d.ts | 8 + .../build/interopRequireDefault.d.ts.map | 1 + .../jest-util/build/interopRequireDefault.js | 22 + .../jest-util/build/isInteractive.d.ts | 9 + .../jest-util/build/isInteractive.d.ts.map | 1 + .../jest-util/build/isInteractive.js | 31 + .../jest-util/build/isPromise.d.ts | 9 + .../jest-util/build/isPromise.d.ts.map | 1 + .../node_modules/jest-util/build/isPromise.js | 20 + .../jest-util/build/pluralize.d.ts | 8 + .../jest-util/build/pluralize.d.ts.map | 1 + .../node_modules/jest-util/build/pluralize.js | 16 + .../jest-util/build/preRunMessage.d.ts | 10 + .../jest-util/build/preRunMessage.d.ts.map | 1 + .../jest-util/build/preRunMessage.js | 48 + .../build/replacePathSepForGlob.d.ts | 9 + .../build/replacePathSepForGlob.d.ts.map | 1 + .../jest-util/build/replacePathSepForGlob.js | 16 + .../jest-util/build/setGlobal.d.ts | 10 + .../jest-util/build/setGlobal.d.ts.map | 1 + .../node_modules/jest-util/build/setGlobal.js | 19 + .../jest-util/build/specialChars.d.ts | 15 + .../jest-util/build/specialChars.d.ts.map | 1 + .../jest-util/build/specialChars.js | 25 + .../build/testPathPatternToRegExp.d.ts | 9 + .../build/testPathPatternToRegExp.d.ts.map | 1 + .../build/testPathPatternToRegExp.js | 19 + .../jest-util/build/ts3.4/ErrorWithStack.d.ts | 10 + .../jest-util/build/ts3.4/clearLine.d.ts | 10 + .../ts3.4/convertDescriptorToString.d.ts | 8 + .../build/ts3.4/createDirectory.d.ts | 9 + .../build/ts3.4/createProcessObject.d.ts | 10 + .../jest-util/build/ts3.4/deepCyclicCopy.d.ts | 12 + .../jest-util/build/ts3.4/index.d.ts | 23 + .../build/ts3.4/installCommonGlobals.d.ts | 11 + .../build/ts3.4/interopRequireDefault.d.ts | 8 + .../jest-util/build/ts3.4/isInteractive.d.ts | 9 + .../jest-util/build/ts3.4/isPromise.d.ts | 9 + .../jest-util/build/ts3.4/pluralize.d.ts | 8 + .../jest-util/build/ts3.4/preRunMessage.d.ts | 11 + .../build/ts3.4/replacePathSepForGlob.d.ts | 9 + .../jest-util/build/ts3.4/setGlobal.d.ts | 11 + .../jest-util/build/ts3.4/specialChars.d.ts | 15 + .../build/ts3.4/testPathPatternToRegExp.d.ts | 9 + .../jest-util/node_modules/.bin/is-ci | 1 + .../node_modules/jest-util/package.json | 37 + .../common/node_modules/jest-worker/LICENSE | 21 + .../common/node_modules/jest-worker/README.md | 233 + .../node_modules/jest-worker/build/Farm.d.ts | 27 + .../jest-worker/build/Farm.d.ts.map | 1 + .../node_modules/jest-worker/build/Farm.js | 179 + .../jest-worker/build/WorkerPool.d.ts | 14 + .../jest-worker/build/WorkerPool.d.ts.map | 1 + .../jest-worker/build/WorkerPool.js | 49 + .../build/base/BaseWorkerPool.d.ts | 22 + .../build/base/BaseWorkerPool.d.ts.map | 1 + .../jest-worker/build/base/BaseWorkerPool.js | 207 + .../node_modules/jest-worker/build/index.d.ts | 46 + .../jest-worker/build/index.d.ts.map | 1 + .../node_modules/jest-worker/build/index.js | 199 + .../jest-worker/build/ts3.4/Farm.d.ts | 27 + .../jest-worker/build/ts3.4/WorkerPool.d.ts | 14 + .../build/ts3.4/base/BaseWorkerPool.d.ts | 23 + .../jest-worker/build/ts3.4/index.d.ts | 47 + .../jest-worker/build/ts3.4/types.d.ts | 104 + .../ts3.4/workers/ChildProcessWorker.d.ts | 52 + .../ts3.4/workers/NodeThreadsWorker.d.ts | 35 + .../build/ts3.4/workers/processChild.d.ts | 8 + .../build/ts3.4/workers/threadChild.d.ts | 8 + .../node_modules/jest-worker/build/types.d.ts | 101 + .../jest-worker/build/types.d.ts.map | 1 + .../node_modules/jest-worker/build/types.js | 28 + .../build/workers/ChildProcessWorker.d.ts | 51 + .../build/workers/ChildProcessWorker.d.ts.map | 1 + .../build/workers/ChildProcessWorker.js | 369 ++ .../build/workers/NodeThreadsWorker.d.ts | 34 + .../build/workers/NodeThreadsWorker.d.ts.map | 1 + .../build/workers/NodeThreadsWorker.js | 379 ++ .../build/workers/processChild.d.ts | 8 + .../build/workers/processChild.d.ts.map | 1 + .../jest-worker/build/workers/processChild.js | 194 + .../build/workers/threadChild.d.ts | 8 + .../build/workers/threadChild.d.ts.map | 1 + .../jest-worker/build/workers/threadChild.js | 207 + .../node_modules/jest-worker/package.json | 37 + .../common/node_modules/make-dir/index.d.ts | 66 + .../common/node_modules/make-dir/index.js | 156 + packages/common/node_modules/make-dir/license | 9 + .../make-dir/node_modules/.bin/semver | 1 + .../common/node_modules/make-dir/package.json | 59 + .../common/node_modules/make-dir/readme.md | 125 + .../node_modules/micromatch/CHANGELOG.md | 108 + .../common/node_modules/micromatch/LICENSE | 21 + .../common/node_modules/micromatch/README.md | 1000 ++++ .../common/node_modules/micromatch/index.js | 467 ++ .../node_modules/micromatch/package.json | 118 + .../readable-stream/CONTRIBUTING.md | 38 + .../readable-stream/GOVERNANCE.md | 136 + .../node_modules/readable-stream/LICENSE | 47 + .../node_modules/readable-stream/README.md | 106 + .../readable-stream/errors-browser.js | 127 + .../node_modules/readable-stream/errors.js | 116 + .../readable-stream/experimentalWarning.js | 17 + .../readable-stream/lib/_stream_duplex.js | 139 + .../lib/_stream_passthrough.js | 39 + .../readable-stream/lib/_stream_readable.js | 1124 ++++ .../readable-stream/lib/_stream_transform.js | 201 + .../readable-stream/lib/_stream_writable.js | 697 +++ .../lib/internal/streams/async_iterator.js | 207 + .../lib/internal/streams/buffer_list.js | 210 + .../lib/internal/streams/destroy.js | 105 + .../lib/internal/streams/end-of-stream.js | 104 + .../lib/internal/streams/from-browser.js | 3 + .../lib/internal/streams/from.js | 64 + .../lib/internal/streams/pipeline.js | 97 + .../lib/internal/streams/state.js | 27 + .../lib/internal/streams/stream-browser.js | 1 + .../lib/internal/streams/stream.js | 1 + .../node_modules/readable-stream/package.json | 68 + .../readable-stream/readable-browser.js | 9 + .../node_modules/readable-stream/readable.js | 16 + .../node_modules/realpath-native/LICENSE | 22 + .../node_modules/realpath-native/README.md | 60 + .../node_modules/realpath-native/index.d.ts | 6 + .../node_modules/realpath-native/index.js | 46 + .../node_modules/realpath-native/package.json | 55 + .../common/node_modules/semver/CHANGELOG.md | 70 + packages/common/node_modules/semver/LICENSE | 15 + packages/common/node_modules/semver/README.md | 443 ++ .../common/node_modules/semver/bin/semver.js | 174 + .../common/node_modules/semver/package.json | 28 + packages/common/node_modules/semver/range.bnf | 16 + packages/common/node_modules/semver/semver.js | 1596 ++++++ packages/common/node_modules/slash/index.d.ts | 25 + packages/common/node_modules/slash/index.js | 11 + packages/common/node_modules/slash/license | 9 + .../common/node_modules/slash/package.json | 35 + packages/common/node_modules/slash/readme.md | 44 + .../node_modules/supports-color/browser.js | 5 + .../node_modules/supports-color/index.js | 139 + .../node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 53 + .../node_modules/supports-color/readme.md | 76 + .../node_modules/test-exclude/CHANGELOG.md | 352 ++ .../node_modules/test-exclude/LICENSE.txt | 14 + .../node_modules/test-exclude/README.md | 96 + .../common/node_modules/test-exclude/index.js | 161 + .../test-exclude/is-outside-dir-posix.js | 7 + .../test-exclude/is-outside-dir-win32.js | 10 + .../test-exclude/is-outside-dir.js | 7 + .../node_modules/test-exclude/package.json | 45 + .../node_modules/to-regex-range/LICENSE | 21 + .../node_modules/to-regex-range/README.md | 305 ++ .../node_modules/to-regex-range/index.js | 288 ++ .../node_modules/to-regex-range/package.json | 88 + .../common/node_modules/which/CHANGELOG.md | 166 + packages/common/node_modules/which/LICENSE | 15 + packages/common/node_modules/which/README.md | 54 + .../common/node_modules/which/bin/node-which | 52 + .../common/node_modules/which/package.json | 43 + packages/common/node_modules/which/which.js | 125 + .../write-file-atomic/CHANGELOG.md | 32 + .../node_modules/write-file-atomic/LICENSE | 6 + .../node_modules/write-file-atomic/README.md | 72 + .../node_modules/write-file-atomic/index.js | 259 + .../write-file-atomic/package.json | 48 + packages/server/app.js | 2 + packages/server/db/client.js | 5 + packages/server/db/index.js | 3 + .../server/middleware/controllers/database.js | 12 + .../server/middleware/controllers/record.js | 18 + packages/server/middleware/routers.js | 137 +- .../server/middleware/routes/neo/database.js | 10 + .../server/middleware/routes/neo/record.js | 36 + .../server/middleware/routes/neo/schema.js | 13 + packages/server/package.json | 2 + packages/server/yarn.lock | 141 +- 1362 files changed, 74497 insertions(+), 67 deletions(-) create mode 120000 packages/common/node_modules/.bin/babel create mode 120000 packages/common/node_modules/.bin/babel-external-helpers create mode 120000 packages/common/node_modules/.bin/cross-env create mode 120000 packages/common/node_modules/.bin/cross-env-shell create mode 120000 packages/common/node_modules/.bin/jest create mode 120000 packages/common/node_modules/.bin/rimraf create mode 100644 packages/common/node_modules/@babel/template/LICENSE create mode 100644 packages/common/node_modules/@babel/template/README.md create mode 100644 packages/common/node_modules/@babel/template/lib/builder.js create mode 100644 packages/common/node_modules/@babel/template/lib/formatters.js create mode 100644 packages/common/node_modules/@babel/template/lib/index.js create mode 100644 packages/common/node_modules/@babel/template/lib/literal.js create mode 100644 packages/common/node_modules/@babel/template/lib/options.js create mode 100644 packages/common/node_modules/@babel/template/lib/parse.js create mode 100644 packages/common/node_modules/@babel/template/lib/populate.js create mode 100644 packages/common/node_modules/@babel/template/lib/string.js create mode 120000 packages/common/node_modules/@babel/template/node_modules/.bin/parser create mode 100644 packages/common/node_modules/@babel/template/package.json create mode 100644 packages/common/node_modules/@babel/types/LICENSE create mode 100644 packages/common/node_modules/@babel/types/README.md create mode 100644 packages/common/node_modules/@babel/types/lib/asserts/assertNode.js create mode 100644 packages/common/node_modules/@babel/types/lib/asserts/generated/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/builders/builder.js create mode 100644 packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js create mode 100644 packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js create mode 100644 packages/common/node_modules/@babel/types/lib/builders/generated/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js create mode 100644 packages/common/node_modules/@babel/types/lib/clone/clone.js create mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js create mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js create mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneNode.js create mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/addComment.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/addComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/comments/removeComments.js create mode 100644 packages/common/node_modules/@babel/types/lib/constants/generated/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/constants/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toBlock.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toExpression.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/toStatement.js create mode 100644 packages/common/node_modules/@babel/types/lib/converters/valueToNode.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/core.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/es2015.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/experimental.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/flow.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/jsx.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/misc.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/placeholders.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/typescript.js create mode 100644 packages/common/node_modules/@babel/types/lib/definitions/utils.js create mode 100644 packages/common/node_modules/@babel/types/lib/index.d.ts create mode 100644 packages/common/node_modules/@babel/types/lib/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/index.js.flow create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/inherits.js create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js create mode 100644 packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js create mode 100644 packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js create mode 100644 packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js create mode 100644 packages/common/node_modules/@babel/types/lib/traverse/traverse.js create mode 100644 packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js create mode 100644 packages/common/node_modules/@babel/types/lib/utils/inherit.js create mode 100644 packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js create mode 100644 packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/generated/index.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/is.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isBinding.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isImmutable.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isLet.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isNode.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isReferenced.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isScope.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isType.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/isVar.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js create mode 100644 packages/common/node_modules/@babel/types/lib/validators/validate.js create mode 100644 packages/common/node_modules/@babel/types/package.json create mode 100644 packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/docs.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/flow.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js create mode 100644 packages/common/node_modules/@babel/types/scripts/generators/typescript.js create mode 100644 packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js create mode 100644 packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js create mode 100644 packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js create mode 100644 packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js create mode 100644 packages/common/node_modules/@jest/transform/LICENSE create mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map create mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.js create mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map create mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js create mode 100644 packages/common/node_modules/@jest/transform/build/index.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/index.d.ts.map create mode 100644 packages/common/node_modules/@jest/transform/build/index.js create mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map create mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.js create mode 100644 packages/common/node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/ts3.4/types.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/types.d.ts create mode 100644 packages/common/node_modules/@jest/transform/build/types.d.ts.map create mode 100644 packages/common/node_modules/@jest/transform/build/types.js create mode 100644 packages/common/node_modules/@jest/transform/package.json create mode 100644 packages/common/node_modules/@jest/types/LICENSE create mode 100644 packages/common/node_modules/@jest/types/build/Circus.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/Circus.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/Circus.js create mode 100644 packages/common/node_modules/@jest/types/build/Config.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/Config.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/Config.js create mode 100644 packages/common/node_modules/@jest/types/build/Global.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/Global.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/Global.js create mode 100644 packages/common/node_modules/@jest/types/build/TestResult.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/TestResult.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/TestResult.js create mode 100644 packages/common/node_modules/@jest/types/build/Transform.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/Transform.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/Transform.js create mode 100644 packages/common/node_modules/@jest/types/build/index.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/index.d.ts.map create mode 100644 packages/common/node_modules/@jest/types/build/index.js create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/Circus.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/Config.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/Global.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/TestResult.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/Transform.d.ts create mode 100644 packages/common/node_modules/@jest/types/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/@jest/types/package.json create mode 100644 packages/common/node_modules/@types/yargs/LICENSE create mode 100644 packages/common/node_modules/@types/yargs/README.md create mode 100644 packages/common/node_modules/@types/yargs/index.d.ts create mode 100644 packages/common/node_modules/@types/yargs/package.json create mode 100644 packages/common/node_modules/@types/yargs/yargs.d.ts create mode 100644 packages/common/node_modules/ansi-styles/index.d.ts create mode 100644 packages/common/node_modules/ansi-styles/index.js create mode 100644 packages/common/node_modules/ansi-styles/license create mode 100644 packages/common/node_modules/ansi-styles/package.json create mode 100644 packages/common/node_modules/ansi-styles/readme.md create mode 100644 packages/common/node_modules/anymatch/LICENSE create mode 100644 packages/common/node_modules/anymatch/README.md create mode 100644 packages/common/node_modules/anymatch/index.d.ts create mode 100644 packages/common/node_modules/anymatch/index.js create mode 100644 packages/common/node_modules/anymatch/package.json create mode 100644 packages/common/node_modules/babel-jest/LICENSE create mode 100644 packages/common/node_modules/babel-jest/README.md create mode 100644 packages/common/node_modules/babel-jest/build/index.d.ts create mode 100644 packages/common/node_modules/babel-jest/build/index.d.ts.map create mode 100644 packages/common/node_modules/babel-jest/build/index.js create mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts create mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map create mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.js create mode 100644 packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts create mode 100644 packages/common/node_modules/babel-jest/package.json create mode 100644 packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md create mode 100644 packages/common/node_modules/babel-plugin-istanbul/LICENSE create mode 100644 packages/common/node_modules/babel-plugin-istanbul/README.md create mode 100644 packages/common/node_modules/babel-plugin-istanbul/lib/index.js create mode 100644 packages/common/node_modules/babel-plugin-istanbul/lib/load-nyc-config-sync.js create mode 100644 packages/common/node_modules/babel-plugin-istanbul/package.json create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/LICENSE create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/README.md create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.js create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/package.json create mode 100644 packages/common/node_modules/babel-preset-jest/LICENSE create mode 100644 packages/common/node_modules/babel-preset-jest/README.md create mode 100644 packages/common/node_modules/babel-preset-jest/index.js create mode 100644 packages/common/node_modules/babel-preset-jest/package.json create mode 100644 packages/common/node_modules/braces/CHANGELOG.md create mode 100644 packages/common/node_modules/braces/LICENSE create mode 100644 packages/common/node_modules/braces/README.md create mode 100644 packages/common/node_modules/braces/index.js create mode 100644 packages/common/node_modules/braces/lib/compile.js create mode 100644 packages/common/node_modules/braces/lib/constants.js create mode 100644 packages/common/node_modules/braces/lib/expand.js create mode 100644 packages/common/node_modules/braces/lib/parse.js create mode 100644 packages/common/node_modules/braces/lib/stringify.js create mode 100644 packages/common/node_modules/braces/lib/utils.js create mode 100644 packages/common/node_modules/braces/package.json create mode 100644 packages/common/node_modules/chalk/index.d.ts create mode 100644 packages/common/node_modules/chalk/license create mode 100644 packages/common/node_modules/chalk/package.json create mode 100644 packages/common/node_modules/chalk/readme.md create mode 100644 packages/common/node_modules/chalk/source/index.js create mode 100644 packages/common/node_modules/chalk/source/templates.js create mode 100644 packages/common/node_modules/chalk/source/util.js create mode 100644 packages/common/node_modules/color-convert/CHANGELOG.md create mode 100644 packages/common/node_modules/color-convert/LICENSE create mode 100644 packages/common/node_modules/color-convert/README.md create mode 100644 packages/common/node_modules/color-convert/conversions.js create mode 100644 packages/common/node_modules/color-convert/index.js create mode 100644 packages/common/node_modules/color-convert/package.json create mode 100644 packages/common/node_modules/color-convert/route.js create mode 100644 packages/common/node_modules/date-fns/CHANGELOG.md create mode 100644 packages/common/node_modules/date-fns/LICENSE.md create mode 100644 packages/common/node_modules/date-fns/README.md create mode 100644 packages/common/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/_lib/package.json create mode 100644 packages/common/node_modules/date-fns/add_days/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_days/index.js create mode 100644 packages/common/node_modules/date-fns/add_days/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_days/package.json create mode 100644 packages/common/node_modules/date-fns/add_hours/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_hours/index.js create mode 100644 packages/common/node_modules/date-fns/add_hours/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_hours/package.json create mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.js create mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_iso_years/package.json create mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_milliseconds/package.json create mode 100644 packages/common/node_modules/date-fns/add_minutes/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_minutes/index.js create mode 100644 packages/common/node_modules/date-fns/add_minutes/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_minutes/package.json create mode 100644 packages/common/node_modules/date-fns/add_months/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_months/index.js create mode 100644 packages/common/node_modules/date-fns/add_months/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_months/package.json create mode 100644 packages/common/node_modules/date-fns/add_quarters/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_quarters/index.js create mode 100644 packages/common/node_modules/date-fns/add_quarters/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_quarters/package.json create mode 100644 packages/common/node_modules/date-fns/add_seconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_seconds/index.js create mode 100644 packages/common/node_modules/date-fns/add_seconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_seconds/package.json create mode 100644 packages/common/node_modules/date-fns/add_weeks/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_weeks/index.js create mode 100644 packages/common/node_modules/date-fns/add_weeks/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_weeks/package.json create mode 100644 packages/common/node_modules/date-fns/add_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/add_years/index.js create mode 100644 packages/common/node_modules/date-fns/add_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/add_years/package.json create mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.d.ts create mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.js create mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.js.flow create mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/package.json create mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.d.ts create mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.js create mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.js.flow create mode 100644 packages/common/node_modules/date-fns/closest_index_to/package.json create mode 100644 packages/common/node_modules/date-fns/closest_to/index.d.ts create mode 100644 packages/common/node_modules/date-fns/closest_to/index.js create mode 100644 packages/common/node_modules/date-fns/closest_to/index.js.flow create mode 100644 packages/common/node_modules/date-fns/closest_to/package.json create mode 100644 packages/common/node_modules/date-fns/compare_asc/index.d.ts create mode 100644 packages/common/node_modules/date-fns/compare_asc/index.js create mode 100644 packages/common/node_modules/date-fns/compare_asc/index.js.flow create mode 100644 packages/common/node_modules/date-fns/compare_asc/package.json create mode 100644 packages/common/node_modules/date-fns/compare_desc/index.d.ts create mode 100644 packages/common/node_modules/date-fns/compare_desc/index.js create mode 100644 packages/common/node_modules/date-fns/compare_desc/index.js.flow create mode 100644 packages/common/node_modules/date-fns/compare_desc/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_days/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_hours/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_months/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/package.json create mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.js create mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/difference_in_years/package.json create mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.d.ts create mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.js create mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.js.flow create mode 100644 packages/common/node_modules/date-fns/distance_in_words/package.json create mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.d.ts create mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.js create mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.js.flow create mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/package.json create mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.d.ts create mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.js create mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.js.flow create mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/package.json create mode 100644 packages/common/node_modules/date-fns/docs.json create mode 100644 packages/common/node_modules/date-fns/each_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/each_day/index.js create mode 100644 packages/common/node_modules/date-fns/each_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/each_day/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_day/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_day/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_hour/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_minute/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_month/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_month/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_second/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_second/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_second/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_second/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_today/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_today/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_today/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_today/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_week/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_week/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_year/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_year/package.json create mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.js create mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/package.json create mode 100644 packages/common/node_modules/date-fns/format/index.d.ts create mode 100644 packages/common/node_modules/date-fns/format/index.js create mode 100644 packages/common/node_modules/date-fns/format/index.js.flow create mode 100644 packages/common/node_modules/date-fns/format/package.json create mode 100644 packages/common/node_modules/date-fns/get_date/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_date/index.js create mode 100644 packages/common/node_modules/date-fns/get_date/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_date/package.json create mode 100644 packages/common/node_modules/date-fns/get_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_day/index.js create mode 100644 packages/common/node_modules/date-fns/get_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_day/package.json create mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.js create mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_day_of_year/package.json create mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.js create mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_days_in_month/package.json create mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.js create mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_days_in_year/package.json create mode 100644 packages/common/node_modules/date-fns/get_hours/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_hours/index.js create mode 100644 packages/common/node_modules/date-fns/get_hours/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_hours/package.json create mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.js create mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_iso_day/package.json create mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.js create mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/package.json create mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_milliseconds/package.json create mode 100644 packages/common/node_modules/date-fns/get_minutes/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_minutes/index.js create mode 100644 packages/common/node_modules/date-fns/get_minutes/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_minutes/package.json create mode 100644 packages/common/node_modules/date-fns/get_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_month/index.js create mode 100644 packages/common/node_modules/date-fns/get_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_month/package.json create mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.js create mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/package.json create mode 100644 packages/common/node_modules/date-fns/get_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/get_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/get_seconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_seconds/index.js create mode 100644 packages/common/node_modules/date-fns/get_seconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_seconds/package.json create mode 100644 packages/common/node_modules/date-fns/get_time/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_time/index.js create mode 100644 packages/common/node_modules/date-fns/get_time/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_time/package.json create mode 100644 packages/common/node_modules/date-fns/get_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/get_year/index.js create mode 100644 packages/common/node_modules/date-fns/get_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/get_year/package.json create mode 100644 packages/common/node_modules/date-fns/index.js create mode 100644 packages/common/node_modules/date-fns/is_after/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_after/index.js create mode 100644 packages/common/node_modules/date-fns/is_after/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_after/package.json create mode 100644 packages/common/node_modules/date-fns/is_before/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_before/index.js create mode 100644 packages/common/node_modules/date-fns/is_before/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_before/package.json create mode 100644 packages/common/node_modules/date-fns/is_date/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_date/index.js create mode 100644 packages/common/node_modules/date-fns/is_date/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_date/package.json create mode 100644 packages/common/node_modules/date-fns/is_equal/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_equal/index.js create mode 100644 packages/common/node_modules/date-fns/is_equal/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_equal/package.json create mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.js create mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/package.json create mode 100644 packages/common/node_modules/date-fns/is_friday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_friday/index.js create mode 100644 packages/common/node_modules/date-fns/is_friday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_friday/package.json create mode 100644 packages/common/node_modules/date-fns/is_future/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_future/index.js create mode 100644 packages/common/node_modules/date-fns/is_future/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_future/package.json create mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.js create mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/package.json create mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.js create mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_leap_year/package.json create mode 100644 packages/common/node_modules/date-fns/is_monday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_monday/index.js create mode 100644 packages/common/node_modules/date-fns/is_monday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_monday/package.json create mode 100644 packages/common/node_modules/date-fns/is_past/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_past/index.js create mode 100644 packages/common/node_modules/date-fns/is_past/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_past/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_day/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_day/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_hour/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_minute/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_month/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_month/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_second/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_second/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_second/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_second/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_week/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_week/package.json create mode 100644 packages/common/node_modules/date-fns/is_same_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_same_year/index.js create mode 100644 packages/common/node_modules/date-fns/is_same_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_same_year/package.json create mode 100644 packages/common/node_modules/date-fns/is_saturday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_saturday/index.js create mode 100644 packages/common/node_modules/date-fns/is_saturday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_saturday/package.json create mode 100644 packages/common/node_modules/date-fns/is_sunday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_sunday/index.js create mode 100644 packages/common/node_modules/date-fns/is_sunday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_sunday/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_hour/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_minute/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_month/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_month/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_second/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_second/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_second/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_second/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_week/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_week/package.json create mode 100644 packages/common/node_modules/date-fns/is_this_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_this_year/index.js create mode 100644 packages/common/node_modules/date-fns/is_this_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_this_year/package.json create mode 100644 packages/common/node_modules/date-fns/is_thursday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_thursday/index.js create mode 100644 packages/common/node_modules/date-fns/is_thursday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_thursday/package.json create mode 100644 packages/common/node_modules/date-fns/is_today/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_today/index.js create mode 100644 packages/common/node_modules/date-fns/is_today/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_today/package.json create mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.js create mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_tomorrow/package.json create mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.js create mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_tuesday/package.json create mode 100644 packages/common/node_modules/date-fns/is_valid/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_valid/index.js create mode 100644 packages/common/node_modules/date-fns/is_valid/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_valid/package.json create mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.js create mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_wednesday/package.json create mode 100644 packages/common/node_modules/date-fns/is_weekend/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_weekend/index.js create mode 100644 packages/common/node_modules/date-fns/is_weekend/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_weekend/package.json create mode 100644 packages/common/node_modules/date-fns/is_within_range/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_within_range/index.js create mode 100644 packages/common/node_modules/date-fns/is_within_range/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_within_range/package.json create mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.js create mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/is_yesterday/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_month/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_week/package.json create mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.js create mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/last_day_of_year/package.json create mode 100644 packages/common/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js create mode 100644 packages/common/node_modules/date-fns/locale/_lib/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ar/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ar/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ar/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ar/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ar/package.json create mode 100644 packages/common/node_modules/date-fns/locale/be/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/be/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/be/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/be/index.js create mode 100644 packages/common/node_modules/date-fns/locale/be/package.json create mode 100644 packages/common/node_modules/date-fns/locale/bg/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/bg/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/bg/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/bg/index.js create mode 100644 packages/common/node_modules/date-fns/locale/bg/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ca/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ca/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ca/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ca/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ca/package.json create mode 100644 packages/common/node_modules/date-fns/locale/cs/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/cs/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/cs/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/cs/index.js create mode 100644 packages/common/node_modules/date-fns/locale/cs/package.json create mode 100644 packages/common/node_modules/date-fns/locale/da/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/da/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/da/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/da/index.js create mode 100644 packages/common/node_modules/date-fns/locale/da/package.json create mode 100644 packages/common/node_modules/date-fns/locale/de/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/de/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/de/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/de/index.js create mode 100644 packages/common/node_modules/date-fns/locale/de/package.json create mode 100644 packages/common/node_modules/date-fns/locale/el/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/el/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/el/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/el/index.js create mode 100644 packages/common/node_modules/date-fns/locale/el/package.json create mode 100644 packages/common/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/en/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/en/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/en/index.js create mode 100644 packages/common/node_modules/date-fns/locale/en/package.json create mode 100644 packages/common/node_modules/date-fns/locale/eo/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/eo/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/eo/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/eo/index.js create mode 100644 packages/common/node_modules/date-fns/locale/eo/package.json create mode 100644 packages/common/node_modules/date-fns/locale/es/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/es/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/es/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/es/index.js create mode 100644 packages/common/node_modules/date-fns/locale/es/package.json create mode 100644 packages/common/node_modules/date-fns/locale/fi/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fi/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fi/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/fi/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fi/package.json create mode 100644 packages/common/node_modules/date-fns/locale/fil/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fil/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fil/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/fil/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fil/package.json create mode 100644 packages/common/node_modules/date-fns/locale/fr/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fr/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fr/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/fr/index.js create mode 100644 packages/common/node_modules/date-fns/locale/fr/package.json create mode 100644 packages/common/node_modules/date-fns/locale/hr/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hr/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hr/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/hr/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hr/package.json create mode 100644 packages/common/node_modules/date-fns/locale/hu/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hu/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hu/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/hu/index.js create mode 100644 packages/common/node_modules/date-fns/locale/hu/package.json create mode 100644 packages/common/node_modules/date-fns/locale/id/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/id/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/id/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/id/index.js create mode 100644 packages/common/node_modules/date-fns/locale/id/package.json create mode 100644 packages/common/node_modules/date-fns/locale/is/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/is/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/is/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/is/index.js create mode 100644 packages/common/node_modules/date-fns/locale/is/package.json create mode 100644 packages/common/node_modules/date-fns/locale/it/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/it/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/it/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/it/index.js create mode 100644 packages/common/node_modules/date-fns/locale/it/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ja/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ja/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ja/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ja/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ja/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ko/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ko/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ko/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ko/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ko/package.json create mode 100644 packages/common/node_modules/date-fns/locale/mk/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/mk/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/mk/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/mk/index.js create mode 100644 packages/common/node_modules/date-fns/locale/mk/package.json create mode 100644 packages/common/node_modules/date-fns/locale/nb/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nb/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nb/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/nb/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nb/package.json create mode 100644 packages/common/node_modules/date-fns/locale/nl/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nl/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nl/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/nl/index.js create mode 100644 packages/common/node_modules/date-fns/locale/nl/package.json create mode 100644 packages/common/node_modules/date-fns/locale/package.json create mode 100644 packages/common/node_modules/date-fns/locale/pl/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pl/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pl/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/pl/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pl/package.json create mode 100644 packages/common/node_modules/date-fns/locale/pt/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pt/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pt/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/pt/index.js create mode 100644 packages/common/node_modules/date-fns/locale/pt/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ro/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ro/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ro/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ro/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ro/package.json create mode 100644 packages/common/node_modules/date-fns/locale/ru/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ru/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ru/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/ru/index.js create mode 100644 packages/common/node_modules/date-fns/locale/ru/package.json create mode 100644 packages/common/node_modules/date-fns/locale/sk/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sk/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sk/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/sk/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sk/package.json create mode 100644 packages/common/node_modules/date-fns/locale/sl/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sl/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sl/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/sl/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sl/package.json create mode 100644 packages/common/node_modules/date-fns/locale/sr/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sr/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sr/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/sr/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sr/package.json create mode 100644 packages/common/node_modules/date-fns/locale/sv/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sv/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sv/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/sv/index.js create mode 100644 packages/common/node_modules/date-fns/locale/sv/package.json create mode 100644 packages/common/node_modules/date-fns/locale/th/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/th/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/th/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/th/index.js create mode 100644 packages/common/node_modules/date-fns/locale/th/package.json create mode 100644 packages/common/node_modules/date-fns/locale/tr/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/tr/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/tr/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/tr/index.js create mode 100644 packages/common/node_modules/date-fns/locale/tr/package.json create mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/package.json create mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/build_distance_in_words_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/build_format_locale/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/index.d.ts create mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/index.js create mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/package.json create mode 100644 packages/common/node_modules/date-fns/max/index.d.ts create mode 100644 packages/common/node_modules/date-fns/max/index.js create mode 100644 packages/common/node_modules/date-fns/max/index.js.flow create mode 100644 packages/common/node_modules/date-fns/max/package.json create mode 100644 packages/common/node_modules/date-fns/min/index.d.ts create mode 100644 packages/common/node_modules/date-fns/min/index.js create mode 100644 packages/common/node_modules/date-fns/min/index.js.flow create mode 100644 packages/common/node_modules/date-fns/min/package.json create mode 100644 packages/common/node_modules/date-fns/package.json create mode 100644 packages/common/node_modules/date-fns/parse/index.d.ts create mode 100644 packages/common/node_modules/date-fns/parse/index.js create mode 100644 packages/common/node_modules/date-fns/parse/index.js.flow create mode 100644 packages/common/node_modules/date-fns/parse/package.json create mode 100644 packages/common/node_modules/date-fns/set_date/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_date/index.js create mode 100644 packages/common/node_modules/date-fns/set_date/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_date/package.json create mode 100644 packages/common/node_modules/date-fns/set_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_day/index.js create mode 100644 packages/common/node_modules/date-fns/set_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_day/package.json create mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.js create mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_day_of_year/package.json create mode 100644 packages/common/node_modules/date-fns/set_hours/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_hours/index.js create mode 100644 packages/common/node_modules/date-fns/set_hours/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_hours/package.json create mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.js create mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_iso_day/package.json create mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_milliseconds/package.json create mode 100644 packages/common/node_modules/date-fns/set_minutes/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_minutes/index.js create mode 100644 packages/common/node_modules/date-fns/set_minutes/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_minutes/package.json create mode 100644 packages/common/node_modules/date-fns/set_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_month/index.js create mode 100644 packages/common/node_modules/date-fns/set_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_month/package.json create mode 100644 packages/common/node_modules/date-fns/set_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/set_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/set_seconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_seconds/index.js create mode 100644 packages/common/node_modules/date-fns/set_seconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_seconds/package.json create mode 100644 packages/common/node_modules/date-fns/set_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/set_year/index.js create mode 100644 packages/common/node_modules/date-fns/set_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/set_year/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_day/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_day/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_day/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_day/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_hour/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_minute/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_month/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_month/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_month/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_month/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_quarter/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_second/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_second/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_second/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_second/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_today/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_today/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_today/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_today/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_week/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_week/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_week/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_week/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_year/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_year/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_year/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_year/package.json create mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.d.ts create mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.js create mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.js.flow create mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/package.json create mode 100644 packages/common/node_modules/date-fns/sub_days/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_days/index.js create mode 100644 packages/common/node_modules/date-fns/sub_days/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_days/package.json create mode 100644 packages/common/node_modules/date-fns/sub_hours/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_hours/index.js create mode 100644 packages/common/node_modules/date-fns/sub_hours/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_hours/package.json create mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.js create mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_iso_years/package.json create mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.js create mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/package.json create mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.js create mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_minutes/package.json create mode 100644 packages/common/node_modules/date-fns/sub_months/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_months/index.js create mode 100644 packages/common/node_modules/date-fns/sub_months/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_months/package.json create mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.js create mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_quarters/package.json create mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.js create mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_seconds/package.json create mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.js create mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_weeks/package.json create mode 100644 packages/common/node_modules/date-fns/sub_years/index.d.ts create mode 100644 packages/common/node_modules/date-fns/sub_years/index.js create mode 100644 packages/common/node_modules/date-fns/sub_years/index.js.flow create mode 100644 packages/common/node_modules/date-fns/sub_years/package.json create mode 100644 packages/common/node_modules/date-fns/typings.d.ts create mode 100644 packages/common/node_modules/fill-range/LICENSE create mode 100644 packages/common/node_modules/fill-range/README.md create mode 100644 packages/common/node_modules/fill-range/index.js create mode 100644 packages/common/node_modules/fill-range/package.json create mode 100644 packages/common/node_modules/fsevents/LICENSE create mode 100644 packages/common/node_modules/fsevents/README.md create mode 100644 packages/common/node_modules/fsevents/fsevents.d.ts create mode 100644 packages/common/node_modules/fsevents/fsevents.js create mode 100755 packages/common/node_modules/fsevents/fsevents.node create mode 100644 packages/common/node_modules/fsevents/package.json create mode 100644 packages/common/node_modules/has-flag/index.d.ts create mode 100644 packages/common/node_modules/has-flag/index.js create mode 100644 packages/common/node_modules/has-flag/license create mode 100644 packages/common/node_modules/has-flag/package.json create mode 100644 packages/common/node_modules/has-flag/readme.md create mode 100644 packages/common/node_modules/is-number/LICENSE create mode 100644 packages/common/node_modules/is-number/README.md create mode 100644 packages/common/node_modules/is-number/index.js create mode 100644 packages/common/node_modules/is-number/package.json create mode 100644 packages/common/node_modules/istanbul-lib-coverage/CHANGELOG.md create mode 100644 packages/common/node_modules/istanbul-lib-coverage/LICENSE create mode 100644 packages/common/node_modules/istanbul-lib-coverage/README.md create mode 100644 packages/common/node_modules/istanbul-lib-coverage/index.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/coverage-map.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/coverage-summary.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/data-properties.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/file-coverage.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/percent.js create mode 100644 packages/common/node_modules/istanbul-lib-coverage/package.json create mode 100644 packages/common/node_modules/istanbul-lib-instrument/CHANGELOG.md create mode 100644 packages/common/node_modules/istanbul-lib-instrument/LICENSE create mode 100644 packages/common/node_modules/istanbul-lib-instrument/README.md create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/constants.js create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/index.js create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/instrumenter.js create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/read-coverage.js create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/source-coverage.js create mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/visitor.js create mode 120000 packages/common/node_modules/istanbul-lib-instrument/node_modules/.bin/parser create mode 120000 packages/common/node_modules/istanbul-lib-instrument/node_modules/.bin/semver create mode 100644 packages/common/node_modules/istanbul-lib-instrument/package.json create mode 100644 packages/common/node_modules/jest-haste-map/LICENSE create mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.js create mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.js create mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.js create mode 100644 packages/common/node_modules/jest-haste-map/build/constants.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/constants.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/constants.js create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.js create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.js create mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.js create mode 100644 packages/common/node_modules/jest-haste-map/build/index.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/index.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/index.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.js create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.js create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/HasteFS.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/ModuleMap.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/blacklist.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/constants.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/crawlers/node.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/crawlers/watchman.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/getMockName.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/FSEventsWatcher.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/dependencyExtractor.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/fast_path.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/getPlatformExtension.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/isRegExpSupported.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/lib/normalizePathSep.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/types.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/ts3.4/worker.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/types.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/types.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/types.js create mode 100644 packages/common/node_modules/jest-haste-map/build/worker.d.ts create mode 100644 packages/common/node_modules/jest-haste-map/build/worker.d.ts.map create mode 100644 packages/common/node_modules/jest-haste-map/build/worker.js create mode 120000 packages/common/node_modules/jest-haste-map/node_modules/.bin/node-which create mode 120000 packages/common/node_modules/jest-haste-map/node_modules/.bin/sane create mode 100644 packages/common/node_modules/jest-haste-map/package.json create mode 100644 packages/common/node_modules/jest-regex-util/LICENSE create mode 100644 packages/common/node_modules/jest-regex-util/build/index.d.ts create mode 100644 packages/common/node_modules/jest-regex-util/build/index.d.ts.map create mode 100644 packages/common/node_modules/jest-regex-util/build/index.js create mode 100644 packages/common/node_modules/jest-regex-util/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/jest-regex-util/package.json create mode 100644 packages/common/node_modules/jest-serializer/LICENSE create mode 100644 packages/common/node_modules/jest-serializer/README.md create mode 100644 packages/common/node_modules/jest-serializer/build/index.d.ts create mode 100644 packages/common/node_modules/jest-serializer/build/index.d.ts.map create mode 100644 packages/common/node_modules/jest-serializer/build/index.js create mode 100644 packages/common/node_modules/jest-serializer/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/jest-serializer/package.json create mode 100644 packages/common/node_modules/jest-serializer/v8.d.ts create mode 100644 packages/common/node_modules/jest-util/LICENSE create mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.js create mode 100644 packages/common/node_modules/jest-util/build/clearLine.d.ts create mode 100644 packages/common/node_modules/jest-util/build/clearLine.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/clearLine.js create mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.d.ts create mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.js create mode 100644 packages/common/node_modules/jest-util/build/createDirectory.d.ts create mode 100644 packages/common/node_modules/jest-util/build/createDirectory.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/createDirectory.js create mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.d.ts create mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.js create mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.d.ts create mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.js create mode 100644 packages/common/node_modules/jest-util/build/index.d.ts create mode 100644 packages/common/node_modules/jest-util/build/index.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/index.js create mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.d.ts create mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.js create mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.d.ts create mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.js create mode 100644 packages/common/node_modules/jest-util/build/isInteractive.d.ts create mode 100644 packages/common/node_modules/jest-util/build/isInteractive.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/isInteractive.js create mode 100644 packages/common/node_modules/jest-util/build/isPromise.d.ts create mode 100644 packages/common/node_modules/jest-util/build/isPromise.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/isPromise.js create mode 100644 packages/common/node_modules/jest-util/build/pluralize.d.ts create mode 100644 packages/common/node_modules/jest-util/build/pluralize.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/pluralize.js create mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.d.ts create mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.js create mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.d.ts create mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.js create mode 100644 packages/common/node_modules/jest-util/build/setGlobal.d.ts create mode 100644 packages/common/node_modules/jest-util/build/setGlobal.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/setGlobal.js create mode 100644 packages/common/node_modules/jest-util/build/specialChars.d.ts create mode 100644 packages/common/node_modules/jest-util/build/specialChars.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/specialChars.js create mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.d.ts create mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map create mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.js create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/ErrorWithStack.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/clearLine.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/convertDescriptorToString.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/createDirectory.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/createProcessObject.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/deepCyclicCopy.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/installCommonGlobals.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/interopRequireDefault.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/isInteractive.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/isPromise.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/pluralize.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/preRunMessage.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/replacePathSepForGlob.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/setGlobal.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/specialChars.d.ts create mode 100644 packages/common/node_modules/jest-util/build/ts3.4/testPathPatternToRegExp.d.ts create mode 120000 packages/common/node_modules/jest-util/node_modules/.bin/is-ci create mode 100644 packages/common/node_modules/jest-util/package.json create mode 100644 packages/common/node_modules/jest-worker/LICENSE create mode 100644 packages/common/node_modules/jest-worker/README.md create mode 100644 packages/common/node_modules/jest-worker/build/Farm.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/Farm.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/Farm.js create mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.js create mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.js create mode 100644 packages/common/node_modules/jest-worker/build/index.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/index.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/index.js create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/Farm.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/WorkerPool.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/base/BaseWorkerPool.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/index.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/types.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/workers/ChildProcessWorker.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/workers/NodeThreadsWorker.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/workers/processChild.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/ts3.4/workers/threadChild.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/types.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/types.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/types.js create mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.js create mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.js create mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.js create mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.d.ts create mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.d.ts.map create mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.js create mode 100644 packages/common/node_modules/jest-worker/package.json create mode 100644 packages/common/node_modules/make-dir/index.d.ts create mode 100644 packages/common/node_modules/make-dir/index.js create mode 100644 packages/common/node_modules/make-dir/license create mode 120000 packages/common/node_modules/make-dir/node_modules/.bin/semver create mode 100644 packages/common/node_modules/make-dir/package.json create mode 100644 packages/common/node_modules/make-dir/readme.md create mode 100644 packages/common/node_modules/micromatch/CHANGELOG.md create mode 100755 packages/common/node_modules/micromatch/LICENSE create mode 100644 packages/common/node_modules/micromatch/README.md create mode 100644 packages/common/node_modules/micromatch/index.js create mode 100644 packages/common/node_modules/micromatch/package.json create mode 100644 packages/common/node_modules/readable-stream/CONTRIBUTING.md create mode 100644 packages/common/node_modules/readable-stream/GOVERNANCE.md create mode 100644 packages/common/node_modules/readable-stream/LICENSE create mode 100644 packages/common/node_modules/readable-stream/README.md create mode 100644 packages/common/node_modules/readable-stream/errors-browser.js create mode 100644 packages/common/node_modules/readable-stream/errors.js create mode 100644 packages/common/node_modules/readable-stream/experimentalWarning.js create mode 100644 packages/common/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 packages/common/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 packages/common/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 packages/common/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 packages/common/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/async_iterator.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/buffer_list.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/destroy.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/end-of-stream.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/from-browser.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/from.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/pipeline.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/state.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/stream-browser.js create mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/stream.js create mode 100644 packages/common/node_modules/readable-stream/package.json create mode 100644 packages/common/node_modules/readable-stream/readable-browser.js create mode 100644 packages/common/node_modules/readable-stream/readable.js create mode 100644 packages/common/node_modules/realpath-native/LICENSE create mode 100644 packages/common/node_modules/realpath-native/README.md create mode 100644 packages/common/node_modules/realpath-native/index.d.ts create mode 100644 packages/common/node_modules/realpath-native/index.js create mode 100644 packages/common/node_modules/realpath-native/package.json create mode 100644 packages/common/node_modules/semver/CHANGELOG.md create mode 100644 packages/common/node_modules/semver/LICENSE create mode 100644 packages/common/node_modules/semver/README.md create mode 100755 packages/common/node_modules/semver/bin/semver.js create mode 100644 packages/common/node_modules/semver/package.json create mode 100644 packages/common/node_modules/semver/range.bnf create mode 100644 packages/common/node_modules/semver/semver.js create mode 100644 packages/common/node_modules/slash/index.d.ts create mode 100644 packages/common/node_modules/slash/index.js create mode 100644 packages/common/node_modules/slash/license create mode 100644 packages/common/node_modules/slash/package.json create mode 100644 packages/common/node_modules/slash/readme.md create mode 100644 packages/common/node_modules/supports-color/browser.js create mode 100644 packages/common/node_modules/supports-color/index.js create mode 100644 packages/common/node_modules/supports-color/license create mode 100644 packages/common/node_modules/supports-color/package.json create mode 100644 packages/common/node_modules/supports-color/readme.md create mode 100644 packages/common/node_modules/test-exclude/CHANGELOG.md create mode 100644 packages/common/node_modules/test-exclude/LICENSE.txt create mode 100644 packages/common/node_modules/test-exclude/README.md create mode 100644 packages/common/node_modules/test-exclude/index.js create mode 100644 packages/common/node_modules/test-exclude/is-outside-dir-posix.js create mode 100644 packages/common/node_modules/test-exclude/is-outside-dir-win32.js create mode 100644 packages/common/node_modules/test-exclude/is-outside-dir.js create mode 100644 packages/common/node_modules/test-exclude/package.json create mode 100644 packages/common/node_modules/to-regex-range/LICENSE create mode 100644 packages/common/node_modules/to-regex-range/README.md create mode 100644 packages/common/node_modules/to-regex-range/index.js create mode 100644 packages/common/node_modules/to-regex-range/package.json create mode 100644 packages/common/node_modules/which/CHANGELOG.md create mode 100644 packages/common/node_modules/which/LICENSE create mode 100644 packages/common/node_modules/which/README.md create mode 100755 packages/common/node_modules/which/bin/node-which create mode 100644 packages/common/node_modules/which/package.json create mode 100644 packages/common/node_modules/which/which.js create mode 100644 packages/common/node_modules/write-file-atomic/CHANGELOG.md create mode 100644 packages/common/node_modules/write-file-atomic/LICENSE create mode 100644 packages/common/node_modules/write-file-atomic/README.md create mode 100644 packages/common/node_modules/write-file-atomic/index.js create mode 100644 packages/common/node_modules/write-file-atomic/package.json create mode 100644 packages/server/db/client.js create mode 100644 packages/server/db/index.js create mode 100644 packages/server/middleware/controllers/database.js create mode 100644 packages/server/middleware/controllers/record.js create mode 100644 packages/server/middleware/routes/neo/database.js create mode 100644 packages/server/middleware/routes/neo/record.js create mode 100644 packages/server/middleware/routes/neo/schema.js diff --git a/packages/common/node_modules/.bin/babel b/packages/common/node_modules/.bin/babel new file mode 120000 index 0000000000..27ea49088b --- /dev/null +++ b/packages/common/node_modules/.bin/babel @@ -0,0 +1 @@ +../../../../node_modules/@babel/cli/bin/babel.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/babel-external-helpers b/packages/common/node_modules/.bin/babel-external-helpers new file mode 120000 index 0000000000..ad0745ec99 --- /dev/null +++ b/packages/common/node_modules/.bin/babel-external-helpers @@ -0,0 +1 @@ +../../../../node_modules/@babel/cli/bin/babel-external-helpers.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/cross-env b/packages/common/node_modules/.bin/cross-env new file mode 120000 index 0000000000..4337fb497e --- /dev/null +++ b/packages/common/node_modules/.bin/cross-env @@ -0,0 +1 @@ +../../../../node_modules/cross-env/dist/bin/cross-env.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/cross-env-shell b/packages/common/node_modules/.bin/cross-env-shell new file mode 120000 index 0000000000..4286dad746 --- /dev/null +++ b/packages/common/node_modules/.bin/cross-env-shell @@ -0,0 +1 @@ +../../../../node_modules/cross-env/dist/bin/cross-env-shell.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/jest b/packages/common/node_modules/.bin/jest new file mode 120000 index 0000000000..bbcd424679 --- /dev/null +++ b/packages/common/node_modules/.bin/jest @@ -0,0 +1 @@ +../../../../node_modules/jest/bin/jest.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/rimraf b/packages/common/node_modules/.bin/rimraf new file mode 120000 index 0000000000..b336073ccb --- /dev/null +++ b/packages/common/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../../../../node_modules/rimraf/bin.js \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/LICENSE b/packages/common/node_modules/@babel/template/LICENSE new file mode 100644 index 0000000000..f31575ec77 --- /dev/null +++ b/packages/common/node_modules/@babel/template/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/common/node_modules/@babel/template/README.md b/packages/common/node_modules/@babel/template/README.md new file mode 100644 index 0000000000..cf8f944396 --- /dev/null +++ b/packages/common/node_modules/@babel/template/README.md @@ -0,0 +1,19 @@ +# @babel/template + +> Generate an AST from a string template. + +See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/template +``` + +or using yarn: + +```sh +yarn add @babel/template --dev +``` diff --git a/packages/common/node_modules/@babel/template/lib/builder.js b/packages/common/node_modules/@babel/template/lib/builder.js new file mode 100644 index 0000000000..2a0e629726 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/builder.js @@ -0,0 +1,83 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createTemplateBuilder; + +var _options = require("./options"); + +var _string = _interopRequireDefault(require("./string")); + +var _literal = _interopRequireDefault(require("./literal")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const NO_PLACEHOLDER = (0, _options.validate)({ + placeholderPattern: false +}); + +function createTemplateBuilder(formatter, defaultOpts) { + const templateFnCache = new WeakMap(); + const templateAstCache = new WeakMap(); + const cachedOpts = defaultOpts || (0, _options.validate)(null); + return Object.assign((tpl, ...args) => { + if (typeof tpl === "string") { + if (args.length > 1) throw new Error("Unexpected extra params."); + return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])))); + } else if (Array.isArray(tpl)) { + let builder = templateFnCache.get(tpl); + + if (!builder) { + builder = (0, _literal.default)(formatter, tpl, cachedOpts); + templateFnCache.set(tpl, builder); + } + + return extendedTrace(builder(args)); + } else if (typeof tpl === "object" && tpl) { + if (args.length > 0) throw new Error("Unexpected extra params."); + return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); + } + + throw new Error(`Unexpected template param ${typeof tpl}`); + }, { + ast: (tpl, ...args) => { + if (typeof tpl === "string") { + if (args.length > 1) throw new Error("Unexpected extra params."); + return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))(); + } else if (Array.isArray(tpl)) { + let builder = templateAstCache.get(tpl); + + if (!builder) { + builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER)); + templateAstCache.set(tpl, builder); + } + + return builder(args)(); + } + + throw new Error(`Unexpected template param ${typeof tpl}`); + } + }); +} + +function extendedTrace(fn) { + let rootStack = ""; + + try { + throw new Error(); + } catch (error) { + if (error.stack) { + rootStack = error.stack.split("\n").slice(3).join("\n"); + } + } + + return arg => { + try { + return fn(arg); + } catch (err) { + err.stack += `\n =============\n${rootStack}`; + throw err; + } + }; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/formatters.js b/packages/common/node_modules/@babel/template/lib/formatters.js new file mode 100644 index 0000000000..59e0984cba --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/formatters.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; + +function makeStatementFormatter(fn) { + return { + code: str => `/* @babel/template */;\n${str}`, + validate: () => {}, + unwrap: ast => { + return fn(ast.program.body.slice(1)); + } + }; +} + +const smart = makeStatementFormatter(body => { + if (body.length > 1) { + return body; + } else { + return body[0]; + } +}); +exports.smart = smart; +const statements = makeStatementFormatter(body => body); +exports.statements = statements; +const statement = makeStatementFormatter(body => { + if (body.length === 0) { + throw new Error("Found nothing to return."); + } + + if (body.length > 1) { + throw new Error("Found multiple statements but wanted one"); + } + + return body[0]; +}); +exports.statement = statement; +const expression = { + code: str => `(\n${str}\n)`, + validate: ({ + program + }) => { + if (program.body.length > 1) { + throw new Error("Found multiple statements but wanted one"); + } + + const expression = program.body[0].expression; + + if (expression.start === 0) { + throw new Error("Parse result included parens."); + } + }, + unwrap: ast => ast.program.body[0].expression +}; +exports.expression = expression; +const program = { + code: str => str, + validate: () => {}, + unwrap: ast => ast.program +}; +exports.program = program; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/index.js b/packages/common/node_modules/@babel/template/lib/index.js new file mode 100644 index 0000000000..9c666dbcc1 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/index.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; + +var formatters = _interopRequireWildcard(require("./formatters")); + +var _builder = _interopRequireDefault(require("./builder")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +const smart = (0, _builder.default)(formatters.smart); +exports.smart = smart; +const statement = (0, _builder.default)(formatters.statement); +exports.statement = statement; +const statements = (0, _builder.default)(formatters.statements); +exports.statements = statements; +const expression = (0, _builder.default)(formatters.expression); +exports.expression = expression; +const program = (0, _builder.default)(formatters.program); +exports.program = program; + +var _default = Object.assign(smart.bind(undefined), { + smart, + statement, + statements, + expression, + program, + ast: smart.ast +}); + +exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/literal.js b/packages/common/node_modules/@babel/template/lib/literal.js new file mode 100644 index 0000000000..0b8f904582 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/literal.js @@ -0,0 +1,82 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = literalTemplate; + +var _options = require("./options"); + +var _parse = _interopRequireDefault(require("./parse")); + +var _populate = _interopRequireDefault(require("./populate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function literalTemplate(formatter, tpl, opts) { + const { + metadata, + names + } = buildLiteralData(formatter, tpl, opts); + return arg => { + const defaultReplacements = arg.reduce((acc, replacement, i) => { + acc[names[i]] = replacement; + return acc; + }, {}); + return arg => { + const replacements = (0, _options.normalizeReplacements)(arg); + + if (replacements) { + Object.keys(replacements).forEach(key => { + if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) { + throw new Error("Unexpected replacement overlap."); + } + }); + } + + return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements)); + }; + }; +} + +function buildLiteralData(formatter, tpl, opts) { + let names; + let nameSet; + let metadata; + let prefix = ""; + + do { + prefix += "$"; + const result = buildTemplateCode(tpl, prefix); + names = result.names; + nameSet = new Set(names); + metadata = (0, _parse.default)(formatter, formatter.code(result.code), { + parser: opts.parser, + placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])), + placeholderPattern: opts.placeholderPattern, + preserveComments: opts.preserveComments, + syntacticPlaceholders: opts.syntacticPlaceholders + }); + } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name))); + + return { + metadata, + names + }; +} + +function buildTemplateCode(tpl, prefix) { + const names = []; + let code = tpl[0]; + + for (let i = 1; i < tpl.length; i++) { + const value = `${prefix}${i - 1}`; + names.push(value); + code += value + tpl[i]; + } + + return { + names, + code + }; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/options.js b/packages/common/node_modules/@babel/template/lib/options.js new file mode 100644 index 0000000000..6039a7bc59 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/options.js @@ -0,0 +1,82 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.merge = merge; +exports.validate = validate; +exports.normalizeReplacements = normalizeReplacements; + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function merge(a, b) { + const { + placeholderWhitelist = a.placeholderWhitelist, + placeholderPattern = a.placeholderPattern, + preserveComments = a.preserveComments, + syntacticPlaceholders = a.syntacticPlaceholders + } = b; + return { + parser: Object.assign({}, a.parser, {}, b.parser), + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + }; +} + +function validate(opts) { + if (opts != null && typeof opts !== "object") { + throw new Error("Unknown template options."); + } + + const _ref = opts || {}, + { + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + } = _ref, + parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); + + if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { + throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); + } + + if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { + throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); + } + + if (preserveComments != null && typeof preserveComments !== "boolean") { + throw new Error("'.preserveComments' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { + throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + return { + parser, + placeholderWhitelist: placeholderWhitelist || undefined, + placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, + preserveComments: preserveComments == null ? undefined : preserveComments, + syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders + }; +} + +function normalizeReplacements(replacements) { + if (Array.isArray(replacements)) { + return replacements.reduce((acc, replacement, i) => { + acc["$" + i] = replacement; + return acc; + }, {}); + } else if (typeof replacements === "object" || replacements == null) { + return replacements || undefined; + } + + throw new Error("Template replacements must be an array, object, null, or undefined"); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/parse.js b/packages/common/node_modules/@babel/template/lib/parse.js new file mode 100644 index 0000000000..31e5849118 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/parse.js @@ -0,0 +1,171 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parseAndBuildMetadata; + +var t = _interopRequireWildcard(require("@babel/types")); + +var _parser = require("@babel/parser"); + +var _codeFrame = require("@babel/code-frame"); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +const PATTERN = /^[_$A-Z0-9]+$/; + +function parseAndBuildMetadata(formatter, code, opts) { + const ast = parseWithCodeFrame(code, opts.parser); + const { + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + } = opts; + t.removePropertiesDeep(ast, { + preserveComments + }); + formatter.validate(ast); + const syntactic = { + placeholders: [], + placeholderNames: new Set() + }; + const legacy = { + placeholders: [], + placeholderNames: new Set() + }; + const isLegacyRef = { + value: undefined + }; + t.traverse(ast, placeholderVisitorHandler, { + syntactic, + legacy, + isLegacyRef, + placeholderWhitelist, + placeholderPattern, + syntacticPlaceholders + }); + return Object.assign({ + ast + }, isLegacyRef.value ? legacy : syntactic); +} + +function placeholderVisitorHandler(node, ancestors, state) { + let name; + + if (t.isPlaceholder(node)) { + if (state.syntacticPlaceholders === false) { + throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); + } else { + name = node.name.name; + state.isLegacyRef.value = false; + } + } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { + return; + } else if (t.isIdentifier(node) || t.isJSXIdentifier(node)) { + name = node.name; + state.isLegacyRef.value = true; + } else if (t.isStringLiteral(node)) { + name = node.value; + state.isLegacyRef.value = true; + } else { + return; + } + + if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { + return; + } + + ancestors = ancestors.slice(); + const { + node: parent, + key + } = ancestors[ancestors.length - 1]; + let type; + + if (t.isStringLiteral(node) || t.isPlaceholder(node, { + expectedNode: "StringLiteral" + })) { + type = "string"; + } else if (t.isNewExpression(parent) && key === "arguments" || t.isCallExpression(parent) && key === "arguments" || t.isFunction(parent) && key === "params") { + type = "param"; + } else if (t.isExpressionStatement(parent) && !t.isPlaceholder(node)) { + type = "statement"; + ancestors = ancestors.slice(0, -1); + } else if (t.isStatement(node) && t.isPlaceholder(node)) { + type = "statement"; + } else { + type = "other"; + } + + const { + placeholders, + placeholderNames + } = state.isLegacyRef.value ? state.legacy : state.syntactic; + placeholders.push({ + name, + type, + resolve: ast => resolveAncestors(ast, ancestors), + isDuplicate: placeholderNames.has(name) + }); + placeholderNames.add(name); +} + +function resolveAncestors(ast, ancestors) { + let parent = ast; + + for (let i = 0; i < ancestors.length - 1; i++) { + const { + key, + index + } = ancestors[i]; + + if (index === undefined) { + parent = parent[key]; + } else { + parent = parent[key][index]; + } + } + + const { + key, + index + } = ancestors[ancestors.length - 1]; + return { + parent, + key, + index + }; +} + +function parseWithCodeFrame(code, parserOpts) { + parserOpts = Object.assign({ + allowReturnOutsideFunction: true, + allowSuperOutsideMethod: true, + sourceType: "module" + }, parserOpts, { + plugins: (parserOpts.plugins || []).concat("placeholders") + }); + + try { + return (0, _parser.parse)(code, parserOpts); + } catch (err) { + const loc = err.loc; + + if (loc) { + err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, { + start: loc + }); + err.code = "BABEL_TEMPLATE_PARSE_ERROR"; + } + + throw err; + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/populate.js b/packages/common/node_modules/@babel/template/lib/populate.js new file mode 100644 index 0000000000..cbca1917c9 --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/populate.js @@ -0,0 +1,127 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = populatePlaceholders; + +var t = _interopRequireWildcard(require("@babel/types")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function populatePlaceholders(metadata, replacements) { + const ast = t.cloneNode(metadata.ast); + + if (replacements) { + metadata.placeholders.forEach(placeholder => { + if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { + const placeholderName = placeholder.name; + throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a + placeholder you may want to consider passing one of the following options to @babel/template: + - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])} + - { placeholderPattern: /^${placeholderName}$/ }`); + } + }); + Object.keys(replacements).forEach(key => { + if (!metadata.placeholderNames.has(key)) { + throw new Error(`Unknown substitution "${key}" given`); + } + }); + } + + metadata.placeholders.slice().reverse().forEach(placeholder => { + try { + applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); + } catch (e) { + e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`; + throw e; + } + }); + return ast; +} + +function applyReplacement(placeholder, ast, replacement) { + if (placeholder.isDuplicate) { + if (Array.isArray(replacement)) { + replacement = replacement.map(node => t.cloneNode(node)); + } else if (typeof replacement === "object") { + replacement = t.cloneNode(replacement); + } + } + + const { + parent, + key, + index + } = placeholder.resolve(ast); + + if (placeholder.type === "string") { + if (typeof replacement === "string") { + replacement = t.stringLiteral(replacement); + } + + if (!replacement || !t.isStringLiteral(replacement)) { + throw new Error("Expected string substitution"); + } + } else if (placeholder.type === "statement") { + if (index === undefined) { + if (!replacement) { + replacement = t.emptyStatement(); + } else if (Array.isArray(replacement)) { + replacement = t.blockStatement(replacement); + } else if (typeof replacement === "string") { + replacement = t.expressionStatement(t.identifier(replacement)); + } else if (!t.isStatement(replacement)) { + replacement = t.expressionStatement(replacement); + } + } else { + if (replacement && !Array.isArray(replacement)) { + if (typeof replacement === "string") { + replacement = t.identifier(replacement); + } + + if (!t.isStatement(replacement)) { + replacement = t.expressionStatement(replacement); + } + } + } + } else if (placeholder.type === "param") { + if (typeof replacement === "string") { + replacement = t.identifier(replacement); + } + + if (index === undefined) throw new Error("Assertion failure."); + } else { + if (typeof replacement === "string") { + replacement = t.identifier(replacement); + } + + if (Array.isArray(replacement)) { + throw new Error("Cannot replace single expression with an array."); + } + } + + if (index === undefined) { + t.validate(parent, key, replacement); + parent[key] = replacement; + } else { + const items = parent[key].slice(); + + if (placeholder.type === "statement" || placeholder.type === "param") { + if (replacement == null) { + items.splice(index, 1); + } else if (Array.isArray(replacement)) { + items.splice(index, 1, ...replacement); + } else { + items[index] = replacement; + } + } else { + items[index] = replacement; + } + + t.validate(parent, key, items); + parent[key] = items; + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/string.js b/packages/common/node_modules/@babel/template/lib/string.js new file mode 100644 index 0000000000..02ad45782e --- /dev/null +++ b/packages/common/node_modules/@babel/template/lib/string.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stringTemplate; + +var _options = require("./options"); + +var _parse = _interopRequireDefault(require("./parse")); + +var _populate = _interopRequireDefault(require("./populate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringTemplate(formatter, code, opts) { + code = formatter.code(code); + let metadata; + return arg => { + const replacements = (0, _options.normalizeReplacements)(arg); + if (!metadata) metadata = (0, _parse.default)(formatter, code, opts); + return formatter.unwrap((0, _populate.default)(metadata, replacements)); + }; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/node_modules/.bin/parser b/packages/common/node_modules/@babel/template/node_modules/.bin/parser new file mode 120000 index 0000000000..fe3b2cb1f4 --- /dev/null +++ b/packages/common/node_modules/@babel/template/node_modules/.bin/parser @@ -0,0 +1 @@ +../../../../../../../node_modules/@babel/parser/bin/babel-parser.js \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/package.json b/packages/common/node_modules/@babel/template/package.json new file mode 100644 index 0000000000..febdd7eab7 --- /dev/null +++ b/packages/common/node_modules/@babel/template/package.json @@ -0,0 +1,19 @@ +{ + "name": "@babel/template", + "version": "7.8.6", + "description": "Generate an AST from a string template.", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/babel/babel/tree/master/packages/babel-template", + "main": "lib/index.js", + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + }, + "gitHead": "750d3dde3bd2d390819820fd22c05441da78751b" +} diff --git a/packages/common/node_modules/@babel/types/LICENSE b/packages/common/node_modules/@babel/types/LICENSE new file mode 100644 index 0000000000..f31575ec77 --- /dev/null +++ b/packages/common/node_modules/@babel/types/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/common/node_modules/@babel/types/README.md b/packages/common/node_modules/@babel/types/README.md new file mode 100644 index 0000000000..8d33374d3b --- /dev/null +++ b/packages/common/node_modules/@babel/types/README.md @@ -0,0 +1,19 @@ +# @babel/types + +> Babel Types is a Lodash-esque utility library for AST nodes + +See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/types +``` + +or using yarn: + +```sh +yarn add @babel/types --dev +``` diff --git a/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js b/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js new file mode 100644 index 0000000000..194ec71681 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertNode; + +var _isNode = _interopRequireDefault(require("../validators/isNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function assertNode(node) { + if (!(0, _isNode.default)(node)) { + const type = node && node.type || JSON.stringify(node); + throw new TypeError(`Not a valid node of type "${type}"`); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js b/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js new file mode 100644 index 0000000000..4a6b22c289 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js @@ -0,0 +1,1444 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.assertArrayExpression = assertArrayExpression; +exports.assertAssignmentExpression = assertAssignmentExpression; +exports.assertBinaryExpression = assertBinaryExpression; +exports.assertInterpreterDirective = assertInterpreterDirective; +exports.assertDirective = assertDirective; +exports.assertDirectiveLiteral = assertDirectiveLiteral; +exports.assertBlockStatement = assertBlockStatement; +exports.assertBreakStatement = assertBreakStatement; +exports.assertCallExpression = assertCallExpression; +exports.assertCatchClause = assertCatchClause; +exports.assertConditionalExpression = assertConditionalExpression; +exports.assertContinueStatement = assertContinueStatement; +exports.assertDebuggerStatement = assertDebuggerStatement; +exports.assertDoWhileStatement = assertDoWhileStatement; +exports.assertEmptyStatement = assertEmptyStatement; +exports.assertExpressionStatement = assertExpressionStatement; +exports.assertFile = assertFile; +exports.assertForInStatement = assertForInStatement; +exports.assertForStatement = assertForStatement; +exports.assertFunctionDeclaration = assertFunctionDeclaration; +exports.assertFunctionExpression = assertFunctionExpression; +exports.assertIdentifier = assertIdentifier; +exports.assertIfStatement = assertIfStatement; +exports.assertLabeledStatement = assertLabeledStatement; +exports.assertStringLiteral = assertStringLiteral; +exports.assertNumericLiteral = assertNumericLiteral; +exports.assertNullLiteral = assertNullLiteral; +exports.assertBooleanLiteral = assertBooleanLiteral; +exports.assertRegExpLiteral = assertRegExpLiteral; +exports.assertLogicalExpression = assertLogicalExpression; +exports.assertMemberExpression = assertMemberExpression; +exports.assertNewExpression = assertNewExpression; +exports.assertProgram = assertProgram; +exports.assertObjectExpression = assertObjectExpression; +exports.assertObjectMethod = assertObjectMethod; +exports.assertObjectProperty = assertObjectProperty; +exports.assertRestElement = assertRestElement; +exports.assertReturnStatement = assertReturnStatement; +exports.assertSequenceExpression = assertSequenceExpression; +exports.assertParenthesizedExpression = assertParenthesizedExpression; +exports.assertSwitchCase = assertSwitchCase; +exports.assertSwitchStatement = assertSwitchStatement; +exports.assertThisExpression = assertThisExpression; +exports.assertThrowStatement = assertThrowStatement; +exports.assertTryStatement = assertTryStatement; +exports.assertUnaryExpression = assertUnaryExpression; +exports.assertUpdateExpression = assertUpdateExpression; +exports.assertVariableDeclaration = assertVariableDeclaration; +exports.assertVariableDeclarator = assertVariableDeclarator; +exports.assertWhileStatement = assertWhileStatement; +exports.assertWithStatement = assertWithStatement; +exports.assertAssignmentPattern = assertAssignmentPattern; +exports.assertArrayPattern = assertArrayPattern; +exports.assertArrowFunctionExpression = assertArrowFunctionExpression; +exports.assertClassBody = assertClassBody; +exports.assertClassExpression = assertClassExpression; +exports.assertClassDeclaration = assertClassDeclaration; +exports.assertExportAllDeclaration = assertExportAllDeclaration; +exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; +exports.assertExportNamedDeclaration = assertExportNamedDeclaration; +exports.assertExportSpecifier = assertExportSpecifier; +exports.assertForOfStatement = assertForOfStatement; +exports.assertImportDeclaration = assertImportDeclaration; +exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; +exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; +exports.assertImportSpecifier = assertImportSpecifier; +exports.assertMetaProperty = assertMetaProperty; +exports.assertClassMethod = assertClassMethod; +exports.assertObjectPattern = assertObjectPattern; +exports.assertSpreadElement = assertSpreadElement; +exports.assertSuper = assertSuper; +exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; +exports.assertTemplateElement = assertTemplateElement; +exports.assertTemplateLiteral = assertTemplateLiteral; +exports.assertYieldExpression = assertYieldExpression; +exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; +exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; +exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; +exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; +exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; +exports.assertClassImplements = assertClassImplements; +exports.assertDeclareClass = assertDeclareClass; +exports.assertDeclareFunction = assertDeclareFunction; +exports.assertDeclareInterface = assertDeclareInterface; +exports.assertDeclareModule = assertDeclareModule; +exports.assertDeclareModuleExports = assertDeclareModuleExports; +exports.assertDeclareTypeAlias = assertDeclareTypeAlias; +exports.assertDeclareOpaqueType = assertDeclareOpaqueType; +exports.assertDeclareVariable = assertDeclareVariable; +exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; +exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; +exports.assertDeclaredPredicate = assertDeclaredPredicate; +exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; +exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; +exports.assertFunctionTypeParam = assertFunctionTypeParam; +exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; +exports.assertInferredPredicate = assertInferredPredicate; +exports.assertInterfaceExtends = assertInterfaceExtends; +exports.assertInterfaceDeclaration = assertInterfaceDeclaration; +exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; +exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; +exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; +exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; +exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; +exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; +exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; +exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; +exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; +exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; +exports.assertObjectTypeIndexer = assertObjectTypeIndexer; +exports.assertObjectTypeProperty = assertObjectTypeProperty; +exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; +exports.assertOpaqueType = assertOpaqueType; +exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; +exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; +exports.assertStringTypeAnnotation = assertStringTypeAnnotation; +exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; +exports.assertThisTypeAnnotation = assertThisTypeAnnotation; +exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; +exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; +exports.assertTypeAlias = assertTypeAlias; +exports.assertTypeAnnotation = assertTypeAnnotation; +exports.assertTypeCastExpression = assertTypeCastExpression; +exports.assertTypeParameter = assertTypeParameter; +exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; +exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; +exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; +exports.assertVariance = assertVariance; +exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; +exports.assertEnumDeclaration = assertEnumDeclaration; +exports.assertEnumBooleanBody = assertEnumBooleanBody; +exports.assertEnumNumberBody = assertEnumNumberBody; +exports.assertEnumStringBody = assertEnumStringBody; +exports.assertEnumSymbolBody = assertEnumSymbolBody; +exports.assertEnumBooleanMember = assertEnumBooleanMember; +exports.assertEnumNumberMember = assertEnumNumberMember; +exports.assertEnumStringMember = assertEnumStringMember; +exports.assertEnumDefaultedMember = assertEnumDefaultedMember; +exports.assertJSXAttribute = assertJSXAttribute; +exports.assertJSXClosingElement = assertJSXClosingElement; +exports.assertJSXElement = assertJSXElement; +exports.assertJSXEmptyExpression = assertJSXEmptyExpression; +exports.assertJSXExpressionContainer = assertJSXExpressionContainer; +exports.assertJSXSpreadChild = assertJSXSpreadChild; +exports.assertJSXIdentifier = assertJSXIdentifier; +exports.assertJSXMemberExpression = assertJSXMemberExpression; +exports.assertJSXNamespacedName = assertJSXNamespacedName; +exports.assertJSXOpeningElement = assertJSXOpeningElement; +exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; +exports.assertJSXText = assertJSXText; +exports.assertJSXFragment = assertJSXFragment; +exports.assertJSXOpeningFragment = assertJSXOpeningFragment; +exports.assertJSXClosingFragment = assertJSXClosingFragment; +exports.assertNoop = assertNoop; +exports.assertPlaceholder = assertPlaceholder; +exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; +exports.assertArgumentPlaceholder = assertArgumentPlaceholder; +exports.assertAwaitExpression = assertAwaitExpression; +exports.assertBindExpression = assertBindExpression; +exports.assertClassProperty = assertClassProperty; +exports.assertOptionalMemberExpression = assertOptionalMemberExpression; +exports.assertPipelineTopicExpression = assertPipelineTopicExpression; +exports.assertPipelineBareFunction = assertPipelineBareFunction; +exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; +exports.assertOptionalCallExpression = assertOptionalCallExpression; +exports.assertClassPrivateProperty = assertClassPrivateProperty; +exports.assertClassPrivateMethod = assertClassPrivateMethod; +exports.assertImport = assertImport; +exports.assertDecorator = assertDecorator; +exports.assertDoExpression = assertDoExpression; +exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; +exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; +exports.assertPrivateName = assertPrivateName; +exports.assertBigIntLiteral = assertBigIntLiteral; +exports.assertRecordExpression = assertRecordExpression; +exports.assertTupleExpression = assertTupleExpression; +exports.assertTSParameterProperty = assertTSParameterProperty; +exports.assertTSDeclareFunction = assertTSDeclareFunction; +exports.assertTSDeclareMethod = assertTSDeclareMethod; +exports.assertTSQualifiedName = assertTSQualifiedName; +exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; +exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; +exports.assertTSPropertySignature = assertTSPropertySignature; +exports.assertTSMethodSignature = assertTSMethodSignature; +exports.assertTSIndexSignature = assertTSIndexSignature; +exports.assertTSAnyKeyword = assertTSAnyKeyword; +exports.assertTSBooleanKeyword = assertTSBooleanKeyword; +exports.assertTSBigIntKeyword = assertTSBigIntKeyword; +exports.assertTSNeverKeyword = assertTSNeverKeyword; +exports.assertTSNullKeyword = assertTSNullKeyword; +exports.assertTSNumberKeyword = assertTSNumberKeyword; +exports.assertTSObjectKeyword = assertTSObjectKeyword; +exports.assertTSStringKeyword = assertTSStringKeyword; +exports.assertTSSymbolKeyword = assertTSSymbolKeyword; +exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; +exports.assertTSUnknownKeyword = assertTSUnknownKeyword; +exports.assertTSVoidKeyword = assertTSVoidKeyword; +exports.assertTSThisType = assertTSThisType; +exports.assertTSFunctionType = assertTSFunctionType; +exports.assertTSConstructorType = assertTSConstructorType; +exports.assertTSTypeReference = assertTSTypeReference; +exports.assertTSTypePredicate = assertTSTypePredicate; +exports.assertTSTypeQuery = assertTSTypeQuery; +exports.assertTSTypeLiteral = assertTSTypeLiteral; +exports.assertTSArrayType = assertTSArrayType; +exports.assertTSTupleType = assertTSTupleType; +exports.assertTSOptionalType = assertTSOptionalType; +exports.assertTSRestType = assertTSRestType; +exports.assertTSUnionType = assertTSUnionType; +exports.assertTSIntersectionType = assertTSIntersectionType; +exports.assertTSConditionalType = assertTSConditionalType; +exports.assertTSInferType = assertTSInferType; +exports.assertTSParenthesizedType = assertTSParenthesizedType; +exports.assertTSTypeOperator = assertTSTypeOperator; +exports.assertTSIndexedAccessType = assertTSIndexedAccessType; +exports.assertTSMappedType = assertTSMappedType; +exports.assertTSLiteralType = assertTSLiteralType; +exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; +exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; +exports.assertTSInterfaceBody = assertTSInterfaceBody; +exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; +exports.assertTSAsExpression = assertTSAsExpression; +exports.assertTSTypeAssertion = assertTSTypeAssertion; +exports.assertTSEnumDeclaration = assertTSEnumDeclaration; +exports.assertTSEnumMember = assertTSEnumMember; +exports.assertTSModuleDeclaration = assertTSModuleDeclaration; +exports.assertTSModuleBlock = assertTSModuleBlock; +exports.assertTSImportType = assertTSImportType; +exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; +exports.assertTSExternalModuleReference = assertTSExternalModuleReference; +exports.assertTSNonNullExpression = assertTSNonNullExpression; +exports.assertTSExportAssignment = assertTSExportAssignment; +exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; +exports.assertTSTypeAnnotation = assertTSTypeAnnotation; +exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; +exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; +exports.assertTSTypeParameter = assertTSTypeParameter; +exports.assertExpression = assertExpression; +exports.assertBinary = assertBinary; +exports.assertScopable = assertScopable; +exports.assertBlockParent = assertBlockParent; +exports.assertBlock = assertBlock; +exports.assertStatement = assertStatement; +exports.assertTerminatorless = assertTerminatorless; +exports.assertCompletionStatement = assertCompletionStatement; +exports.assertConditional = assertConditional; +exports.assertLoop = assertLoop; +exports.assertWhile = assertWhile; +exports.assertExpressionWrapper = assertExpressionWrapper; +exports.assertFor = assertFor; +exports.assertForXStatement = assertForXStatement; +exports.assertFunction = assertFunction; +exports.assertFunctionParent = assertFunctionParent; +exports.assertPureish = assertPureish; +exports.assertDeclaration = assertDeclaration; +exports.assertPatternLike = assertPatternLike; +exports.assertLVal = assertLVal; +exports.assertTSEntityName = assertTSEntityName; +exports.assertLiteral = assertLiteral; +exports.assertImmutable = assertImmutable; +exports.assertUserWhitespacable = assertUserWhitespacable; +exports.assertMethod = assertMethod; +exports.assertObjectMember = assertObjectMember; +exports.assertProperty = assertProperty; +exports.assertUnaryLike = assertUnaryLike; +exports.assertPattern = assertPattern; +exports.assertClass = assertClass; +exports.assertModuleDeclaration = assertModuleDeclaration; +exports.assertExportDeclaration = assertExportDeclaration; +exports.assertModuleSpecifier = assertModuleSpecifier; +exports.assertFlow = assertFlow; +exports.assertFlowType = assertFlowType; +exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; +exports.assertFlowDeclaration = assertFlowDeclaration; +exports.assertFlowPredicate = assertFlowPredicate; +exports.assertEnumBody = assertEnumBody; +exports.assertEnumMember = assertEnumMember; +exports.assertJSX = assertJSX; +exports.assertPrivate = assertPrivate; +exports.assertTSTypeElement = assertTSTypeElement; +exports.assertTSType = assertTSType; +exports.assertNumberLiteral = assertNumberLiteral; +exports.assertRegexLiteral = assertRegexLiteral; +exports.assertRestProperty = assertRestProperty; +exports.assertSpreadProperty = assertSpreadProperty; + +var _is = _interopRequireDefault(require("../../validators/is")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function assert(type, node, opts) { + if (!(0, _is.default)(type, node, opts)) { + throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, ` + `but instead got "${node.type}".`); + } +} + +function assertArrayExpression(node, opts = {}) { + assert("ArrayExpression", node, opts); +} + +function assertAssignmentExpression(node, opts = {}) { + assert("AssignmentExpression", node, opts); +} + +function assertBinaryExpression(node, opts = {}) { + assert("BinaryExpression", node, opts); +} + +function assertInterpreterDirective(node, opts = {}) { + assert("InterpreterDirective", node, opts); +} + +function assertDirective(node, opts = {}) { + assert("Directive", node, opts); +} + +function assertDirectiveLiteral(node, opts = {}) { + assert("DirectiveLiteral", node, opts); +} + +function assertBlockStatement(node, opts = {}) { + assert("BlockStatement", node, opts); +} + +function assertBreakStatement(node, opts = {}) { + assert("BreakStatement", node, opts); +} + +function assertCallExpression(node, opts = {}) { + assert("CallExpression", node, opts); +} + +function assertCatchClause(node, opts = {}) { + assert("CatchClause", node, opts); +} + +function assertConditionalExpression(node, opts = {}) { + assert("ConditionalExpression", node, opts); +} + +function assertContinueStatement(node, opts = {}) { + assert("ContinueStatement", node, opts); +} + +function assertDebuggerStatement(node, opts = {}) { + assert("DebuggerStatement", node, opts); +} + +function assertDoWhileStatement(node, opts = {}) { + assert("DoWhileStatement", node, opts); +} + +function assertEmptyStatement(node, opts = {}) { + assert("EmptyStatement", node, opts); +} + +function assertExpressionStatement(node, opts = {}) { + assert("ExpressionStatement", node, opts); +} + +function assertFile(node, opts = {}) { + assert("File", node, opts); +} + +function assertForInStatement(node, opts = {}) { + assert("ForInStatement", node, opts); +} + +function assertForStatement(node, opts = {}) { + assert("ForStatement", node, opts); +} + +function assertFunctionDeclaration(node, opts = {}) { + assert("FunctionDeclaration", node, opts); +} + +function assertFunctionExpression(node, opts = {}) { + assert("FunctionExpression", node, opts); +} + +function assertIdentifier(node, opts = {}) { + assert("Identifier", node, opts); +} + +function assertIfStatement(node, opts = {}) { + assert("IfStatement", node, opts); +} + +function assertLabeledStatement(node, opts = {}) { + assert("LabeledStatement", node, opts); +} + +function assertStringLiteral(node, opts = {}) { + assert("StringLiteral", node, opts); +} + +function assertNumericLiteral(node, opts = {}) { + assert("NumericLiteral", node, opts); +} + +function assertNullLiteral(node, opts = {}) { + assert("NullLiteral", node, opts); +} + +function assertBooleanLiteral(node, opts = {}) { + assert("BooleanLiteral", node, opts); +} + +function assertRegExpLiteral(node, opts = {}) { + assert("RegExpLiteral", node, opts); +} + +function assertLogicalExpression(node, opts = {}) { + assert("LogicalExpression", node, opts); +} + +function assertMemberExpression(node, opts = {}) { + assert("MemberExpression", node, opts); +} + +function assertNewExpression(node, opts = {}) { + assert("NewExpression", node, opts); +} + +function assertProgram(node, opts = {}) { + assert("Program", node, opts); +} + +function assertObjectExpression(node, opts = {}) { + assert("ObjectExpression", node, opts); +} + +function assertObjectMethod(node, opts = {}) { + assert("ObjectMethod", node, opts); +} + +function assertObjectProperty(node, opts = {}) { + assert("ObjectProperty", node, opts); +} + +function assertRestElement(node, opts = {}) { + assert("RestElement", node, opts); +} + +function assertReturnStatement(node, opts = {}) { + assert("ReturnStatement", node, opts); +} + +function assertSequenceExpression(node, opts = {}) { + assert("SequenceExpression", node, opts); +} + +function assertParenthesizedExpression(node, opts = {}) { + assert("ParenthesizedExpression", node, opts); +} + +function assertSwitchCase(node, opts = {}) { + assert("SwitchCase", node, opts); +} + +function assertSwitchStatement(node, opts = {}) { + assert("SwitchStatement", node, opts); +} + +function assertThisExpression(node, opts = {}) { + assert("ThisExpression", node, opts); +} + +function assertThrowStatement(node, opts = {}) { + assert("ThrowStatement", node, opts); +} + +function assertTryStatement(node, opts = {}) { + assert("TryStatement", node, opts); +} + +function assertUnaryExpression(node, opts = {}) { + assert("UnaryExpression", node, opts); +} + +function assertUpdateExpression(node, opts = {}) { + assert("UpdateExpression", node, opts); +} + +function assertVariableDeclaration(node, opts = {}) { + assert("VariableDeclaration", node, opts); +} + +function assertVariableDeclarator(node, opts = {}) { + assert("VariableDeclarator", node, opts); +} + +function assertWhileStatement(node, opts = {}) { + assert("WhileStatement", node, opts); +} + +function assertWithStatement(node, opts = {}) { + assert("WithStatement", node, opts); +} + +function assertAssignmentPattern(node, opts = {}) { + assert("AssignmentPattern", node, opts); +} + +function assertArrayPattern(node, opts = {}) { + assert("ArrayPattern", node, opts); +} + +function assertArrowFunctionExpression(node, opts = {}) { + assert("ArrowFunctionExpression", node, opts); +} + +function assertClassBody(node, opts = {}) { + assert("ClassBody", node, opts); +} + +function assertClassExpression(node, opts = {}) { + assert("ClassExpression", node, opts); +} + +function assertClassDeclaration(node, opts = {}) { + assert("ClassDeclaration", node, opts); +} + +function assertExportAllDeclaration(node, opts = {}) { + assert("ExportAllDeclaration", node, opts); +} + +function assertExportDefaultDeclaration(node, opts = {}) { + assert("ExportDefaultDeclaration", node, opts); +} + +function assertExportNamedDeclaration(node, opts = {}) { + assert("ExportNamedDeclaration", node, opts); +} + +function assertExportSpecifier(node, opts = {}) { + assert("ExportSpecifier", node, opts); +} + +function assertForOfStatement(node, opts = {}) { + assert("ForOfStatement", node, opts); +} + +function assertImportDeclaration(node, opts = {}) { + assert("ImportDeclaration", node, opts); +} + +function assertImportDefaultSpecifier(node, opts = {}) { + assert("ImportDefaultSpecifier", node, opts); +} + +function assertImportNamespaceSpecifier(node, opts = {}) { + assert("ImportNamespaceSpecifier", node, opts); +} + +function assertImportSpecifier(node, opts = {}) { + assert("ImportSpecifier", node, opts); +} + +function assertMetaProperty(node, opts = {}) { + assert("MetaProperty", node, opts); +} + +function assertClassMethod(node, opts = {}) { + assert("ClassMethod", node, opts); +} + +function assertObjectPattern(node, opts = {}) { + assert("ObjectPattern", node, opts); +} + +function assertSpreadElement(node, opts = {}) { + assert("SpreadElement", node, opts); +} + +function assertSuper(node, opts = {}) { + assert("Super", node, opts); +} + +function assertTaggedTemplateExpression(node, opts = {}) { + assert("TaggedTemplateExpression", node, opts); +} + +function assertTemplateElement(node, opts = {}) { + assert("TemplateElement", node, opts); +} + +function assertTemplateLiteral(node, opts = {}) { + assert("TemplateLiteral", node, opts); +} + +function assertYieldExpression(node, opts = {}) { + assert("YieldExpression", node, opts); +} + +function assertAnyTypeAnnotation(node, opts = {}) { + assert("AnyTypeAnnotation", node, opts); +} + +function assertArrayTypeAnnotation(node, opts = {}) { + assert("ArrayTypeAnnotation", node, opts); +} + +function assertBooleanTypeAnnotation(node, opts = {}) { + assert("BooleanTypeAnnotation", node, opts); +} + +function assertBooleanLiteralTypeAnnotation(node, opts = {}) { + assert("BooleanLiteralTypeAnnotation", node, opts); +} + +function assertNullLiteralTypeAnnotation(node, opts = {}) { + assert("NullLiteralTypeAnnotation", node, opts); +} + +function assertClassImplements(node, opts = {}) { + assert("ClassImplements", node, opts); +} + +function assertDeclareClass(node, opts = {}) { + assert("DeclareClass", node, opts); +} + +function assertDeclareFunction(node, opts = {}) { + assert("DeclareFunction", node, opts); +} + +function assertDeclareInterface(node, opts = {}) { + assert("DeclareInterface", node, opts); +} + +function assertDeclareModule(node, opts = {}) { + assert("DeclareModule", node, opts); +} + +function assertDeclareModuleExports(node, opts = {}) { + assert("DeclareModuleExports", node, opts); +} + +function assertDeclareTypeAlias(node, opts = {}) { + assert("DeclareTypeAlias", node, opts); +} + +function assertDeclareOpaqueType(node, opts = {}) { + assert("DeclareOpaqueType", node, opts); +} + +function assertDeclareVariable(node, opts = {}) { + assert("DeclareVariable", node, opts); +} + +function assertDeclareExportDeclaration(node, opts = {}) { + assert("DeclareExportDeclaration", node, opts); +} + +function assertDeclareExportAllDeclaration(node, opts = {}) { + assert("DeclareExportAllDeclaration", node, opts); +} + +function assertDeclaredPredicate(node, opts = {}) { + assert("DeclaredPredicate", node, opts); +} + +function assertExistsTypeAnnotation(node, opts = {}) { + assert("ExistsTypeAnnotation", node, opts); +} + +function assertFunctionTypeAnnotation(node, opts = {}) { + assert("FunctionTypeAnnotation", node, opts); +} + +function assertFunctionTypeParam(node, opts = {}) { + assert("FunctionTypeParam", node, opts); +} + +function assertGenericTypeAnnotation(node, opts = {}) { + assert("GenericTypeAnnotation", node, opts); +} + +function assertInferredPredicate(node, opts = {}) { + assert("InferredPredicate", node, opts); +} + +function assertInterfaceExtends(node, opts = {}) { + assert("InterfaceExtends", node, opts); +} + +function assertInterfaceDeclaration(node, opts = {}) { + assert("InterfaceDeclaration", node, opts); +} + +function assertInterfaceTypeAnnotation(node, opts = {}) { + assert("InterfaceTypeAnnotation", node, opts); +} + +function assertIntersectionTypeAnnotation(node, opts = {}) { + assert("IntersectionTypeAnnotation", node, opts); +} + +function assertMixedTypeAnnotation(node, opts = {}) { + assert("MixedTypeAnnotation", node, opts); +} + +function assertEmptyTypeAnnotation(node, opts = {}) { + assert("EmptyTypeAnnotation", node, opts); +} + +function assertNullableTypeAnnotation(node, opts = {}) { + assert("NullableTypeAnnotation", node, opts); +} + +function assertNumberLiteralTypeAnnotation(node, opts = {}) { + assert("NumberLiteralTypeAnnotation", node, opts); +} + +function assertNumberTypeAnnotation(node, opts = {}) { + assert("NumberTypeAnnotation", node, opts); +} + +function assertObjectTypeAnnotation(node, opts = {}) { + assert("ObjectTypeAnnotation", node, opts); +} + +function assertObjectTypeInternalSlot(node, opts = {}) { + assert("ObjectTypeInternalSlot", node, opts); +} + +function assertObjectTypeCallProperty(node, opts = {}) { + assert("ObjectTypeCallProperty", node, opts); +} + +function assertObjectTypeIndexer(node, opts = {}) { + assert("ObjectTypeIndexer", node, opts); +} + +function assertObjectTypeProperty(node, opts = {}) { + assert("ObjectTypeProperty", node, opts); +} + +function assertObjectTypeSpreadProperty(node, opts = {}) { + assert("ObjectTypeSpreadProperty", node, opts); +} + +function assertOpaqueType(node, opts = {}) { + assert("OpaqueType", node, opts); +} + +function assertQualifiedTypeIdentifier(node, opts = {}) { + assert("QualifiedTypeIdentifier", node, opts); +} + +function assertStringLiteralTypeAnnotation(node, opts = {}) { + assert("StringLiteralTypeAnnotation", node, opts); +} + +function assertStringTypeAnnotation(node, opts = {}) { + assert("StringTypeAnnotation", node, opts); +} + +function assertSymbolTypeAnnotation(node, opts = {}) { + assert("SymbolTypeAnnotation", node, opts); +} + +function assertThisTypeAnnotation(node, opts = {}) { + assert("ThisTypeAnnotation", node, opts); +} + +function assertTupleTypeAnnotation(node, opts = {}) { + assert("TupleTypeAnnotation", node, opts); +} + +function assertTypeofTypeAnnotation(node, opts = {}) { + assert("TypeofTypeAnnotation", node, opts); +} + +function assertTypeAlias(node, opts = {}) { + assert("TypeAlias", node, opts); +} + +function assertTypeAnnotation(node, opts = {}) { + assert("TypeAnnotation", node, opts); +} + +function assertTypeCastExpression(node, opts = {}) { + assert("TypeCastExpression", node, opts); +} + +function assertTypeParameter(node, opts = {}) { + assert("TypeParameter", node, opts); +} + +function assertTypeParameterDeclaration(node, opts = {}) { + assert("TypeParameterDeclaration", node, opts); +} + +function assertTypeParameterInstantiation(node, opts = {}) { + assert("TypeParameterInstantiation", node, opts); +} + +function assertUnionTypeAnnotation(node, opts = {}) { + assert("UnionTypeAnnotation", node, opts); +} + +function assertVariance(node, opts = {}) { + assert("Variance", node, opts); +} + +function assertVoidTypeAnnotation(node, opts = {}) { + assert("VoidTypeAnnotation", node, opts); +} + +function assertEnumDeclaration(node, opts = {}) { + assert("EnumDeclaration", node, opts); +} + +function assertEnumBooleanBody(node, opts = {}) { + assert("EnumBooleanBody", node, opts); +} + +function assertEnumNumberBody(node, opts = {}) { + assert("EnumNumberBody", node, opts); +} + +function assertEnumStringBody(node, opts = {}) { + assert("EnumStringBody", node, opts); +} + +function assertEnumSymbolBody(node, opts = {}) { + assert("EnumSymbolBody", node, opts); +} + +function assertEnumBooleanMember(node, opts = {}) { + assert("EnumBooleanMember", node, opts); +} + +function assertEnumNumberMember(node, opts = {}) { + assert("EnumNumberMember", node, opts); +} + +function assertEnumStringMember(node, opts = {}) { + assert("EnumStringMember", node, opts); +} + +function assertEnumDefaultedMember(node, opts = {}) { + assert("EnumDefaultedMember", node, opts); +} + +function assertJSXAttribute(node, opts = {}) { + assert("JSXAttribute", node, opts); +} + +function assertJSXClosingElement(node, opts = {}) { + assert("JSXClosingElement", node, opts); +} + +function assertJSXElement(node, opts = {}) { + assert("JSXElement", node, opts); +} + +function assertJSXEmptyExpression(node, opts = {}) { + assert("JSXEmptyExpression", node, opts); +} + +function assertJSXExpressionContainer(node, opts = {}) { + assert("JSXExpressionContainer", node, opts); +} + +function assertJSXSpreadChild(node, opts = {}) { + assert("JSXSpreadChild", node, opts); +} + +function assertJSXIdentifier(node, opts = {}) { + assert("JSXIdentifier", node, opts); +} + +function assertJSXMemberExpression(node, opts = {}) { + assert("JSXMemberExpression", node, opts); +} + +function assertJSXNamespacedName(node, opts = {}) { + assert("JSXNamespacedName", node, opts); +} + +function assertJSXOpeningElement(node, opts = {}) { + assert("JSXOpeningElement", node, opts); +} + +function assertJSXSpreadAttribute(node, opts = {}) { + assert("JSXSpreadAttribute", node, opts); +} + +function assertJSXText(node, opts = {}) { + assert("JSXText", node, opts); +} + +function assertJSXFragment(node, opts = {}) { + assert("JSXFragment", node, opts); +} + +function assertJSXOpeningFragment(node, opts = {}) { + assert("JSXOpeningFragment", node, opts); +} + +function assertJSXClosingFragment(node, opts = {}) { + assert("JSXClosingFragment", node, opts); +} + +function assertNoop(node, opts = {}) { + assert("Noop", node, opts); +} + +function assertPlaceholder(node, opts = {}) { + assert("Placeholder", node, opts); +} + +function assertV8IntrinsicIdentifier(node, opts = {}) { + assert("V8IntrinsicIdentifier", node, opts); +} + +function assertArgumentPlaceholder(node, opts = {}) { + assert("ArgumentPlaceholder", node, opts); +} + +function assertAwaitExpression(node, opts = {}) { + assert("AwaitExpression", node, opts); +} + +function assertBindExpression(node, opts = {}) { + assert("BindExpression", node, opts); +} + +function assertClassProperty(node, opts = {}) { + assert("ClassProperty", node, opts); +} + +function assertOptionalMemberExpression(node, opts = {}) { + assert("OptionalMemberExpression", node, opts); +} + +function assertPipelineTopicExpression(node, opts = {}) { + assert("PipelineTopicExpression", node, opts); +} + +function assertPipelineBareFunction(node, opts = {}) { + assert("PipelineBareFunction", node, opts); +} + +function assertPipelinePrimaryTopicReference(node, opts = {}) { + assert("PipelinePrimaryTopicReference", node, opts); +} + +function assertOptionalCallExpression(node, opts = {}) { + assert("OptionalCallExpression", node, opts); +} + +function assertClassPrivateProperty(node, opts = {}) { + assert("ClassPrivateProperty", node, opts); +} + +function assertClassPrivateMethod(node, opts = {}) { + assert("ClassPrivateMethod", node, opts); +} + +function assertImport(node, opts = {}) { + assert("Import", node, opts); +} + +function assertDecorator(node, opts = {}) { + assert("Decorator", node, opts); +} + +function assertDoExpression(node, opts = {}) { + assert("DoExpression", node, opts); +} + +function assertExportDefaultSpecifier(node, opts = {}) { + assert("ExportDefaultSpecifier", node, opts); +} + +function assertExportNamespaceSpecifier(node, opts = {}) { + assert("ExportNamespaceSpecifier", node, opts); +} + +function assertPrivateName(node, opts = {}) { + assert("PrivateName", node, opts); +} + +function assertBigIntLiteral(node, opts = {}) { + assert("BigIntLiteral", node, opts); +} + +function assertRecordExpression(node, opts = {}) { + assert("RecordExpression", node, opts); +} + +function assertTupleExpression(node, opts = {}) { + assert("TupleExpression", node, opts); +} + +function assertTSParameterProperty(node, opts = {}) { + assert("TSParameterProperty", node, opts); +} + +function assertTSDeclareFunction(node, opts = {}) { + assert("TSDeclareFunction", node, opts); +} + +function assertTSDeclareMethod(node, opts = {}) { + assert("TSDeclareMethod", node, opts); +} + +function assertTSQualifiedName(node, opts = {}) { + assert("TSQualifiedName", node, opts); +} + +function assertTSCallSignatureDeclaration(node, opts = {}) { + assert("TSCallSignatureDeclaration", node, opts); +} + +function assertTSConstructSignatureDeclaration(node, opts = {}) { + assert("TSConstructSignatureDeclaration", node, opts); +} + +function assertTSPropertySignature(node, opts = {}) { + assert("TSPropertySignature", node, opts); +} + +function assertTSMethodSignature(node, opts = {}) { + assert("TSMethodSignature", node, opts); +} + +function assertTSIndexSignature(node, opts = {}) { + assert("TSIndexSignature", node, opts); +} + +function assertTSAnyKeyword(node, opts = {}) { + assert("TSAnyKeyword", node, opts); +} + +function assertTSBooleanKeyword(node, opts = {}) { + assert("TSBooleanKeyword", node, opts); +} + +function assertTSBigIntKeyword(node, opts = {}) { + assert("TSBigIntKeyword", node, opts); +} + +function assertTSNeverKeyword(node, opts = {}) { + assert("TSNeverKeyword", node, opts); +} + +function assertTSNullKeyword(node, opts = {}) { + assert("TSNullKeyword", node, opts); +} + +function assertTSNumberKeyword(node, opts = {}) { + assert("TSNumberKeyword", node, opts); +} + +function assertTSObjectKeyword(node, opts = {}) { + assert("TSObjectKeyword", node, opts); +} + +function assertTSStringKeyword(node, opts = {}) { + assert("TSStringKeyword", node, opts); +} + +function assertTSSymbolKeyword(node, opts = {}) { + assert("TSSymbolKeyword", node, opts); +} + +function assertTSUndefinedKeyword(node, opts = {}) { + assert("TSUndefinedKeyword", node, opts); +} + +function assertTSUnknownKeyword(node, opts = {}) { + assert("TSUnknownKeyword", node, opts); +} + +function assertTSVoidKeyword(node, opts = {}) { + assert("TSVoidKeyword", node, opts); +} + +function assertTSThisType(node, opts = {}) { + assert("TSThisType", node, opts); +} + +function assertTSFunctionType(node, opts = {}) { + assert("TSFunctionType", node, opts); +} + +function assertTSConstructorType(node, opts = {}) { + assert("TSConstructorType", node, opts); +} + +function assertTSTypeReference(node, opts = {}) { + assert("TSTypeReference", node, opts); +} + +function assertTSTypePredicate(node, opts = {}) { + assert("TSTypePredicate", node, opts); +} + +function assertTSTypeQuery(node, opts = {}) { + assert("TSTypeQuery", node, opts); +} + +function assertTSTypeLiteral(node, opts = {}) { + assert("TSTypeLiteral", node, opts); +} + +function assertTSArrayType(node, opts = {}) { + assert("TSArrayType", node, opts); +} + +function assertTSTupleType(node, opts = {}) { + assert("TSTupleType", node, opts); +} + +function assertTSOptionalType(node, opts = {}) { + assert("TSOptionalType", node, opts); +} + +function assertTSRestType(node, opts = {}) { + assert("TSRestType", node, opts); +} + +function assertTSUnionType(node, opts = {}) { + assert("TSUnionType", node, opts); +} + +function assertTSIntersectionType(node, opts = {}) { + assert("TSIntersectionType", node, opts); +} + +function assertTSConditionalType(node, opts = {}) { + assert("TSConditionalType", node, opts); +} + +function assertTSInferType(node, opts = {}) { + assert("TSInferType", node, opts); +} + +function assertTSParenthesizedType(node, opts = {}) { + assert("TSParenthesizedType", node, opts); +} + +function assertTSTypeOperator(node, opts = {}) { + assert("TSTypeOperator", node, opts); +} + +function assertTSIndexedAccessType(node, opts = {}) { + assert("TSIndexedAccessType", node, opts); +} + +function assertTSMappedType(node, opts = {}) { + assert("TSMappedType", node, opts); +} + +function assertTSLiteralType(node, opts = {}) { + assert("TSLiteralType", node, opts); +} + +function assertTSExpressionWithTypeArguments(node, opts = {}) { + assert("TSExpressionWithTypeArguments", node, opts); +} + +function assertTSInterfaceDeclaration(node, opts = {}) { + assert("TSInterfaceDeclaration", node, opts); +} + +function assertTSInterfaceBody(node, opts = {}) { + assert("TSInterfaceBody", node, opts); +} + +function assertTSTypeAliasDeclaration(node, opts = {}) { + assert("TSTypeAliasDeclaration", node, opts); +} + +function assertTSAsExpression(node, opts = {}) { + assert("TSAsExpression", node, opts); +} + +function assertTSTypeAssertion(node, opts = {}) { + assert("TSTypeAssertion", node, opts); +} + +function assertTSEnumDeclaration(node, opts = {}) { + assert("TSEnumDeclaration", node, opts); +} + +function assertTSEnumMember(node, opts = {}) { + assert("TSEnumMember", node, opts); +} + +function assertTSModuleDeclaration(node, opts = {}) { + assert("TSModuleDeclaration", node, opts); +} + +function assertTSModuleBlock(node, opts = {}) { + assert("TSModuleBlock", node, opts); +} + +function assertTSImportType(node, opts = {}) { + assert("TSImportType", node, opts); +} + +function assertTSImportEqualsDeclaration(node, opts = {}) { + assert("TSImportEqualsDeclaration", node, opts); +} + +function assertTSExternalModuleReference(node, opts = {}) { + assert("TSExternalModuleReference", node, opts); +} + +function assertTSNonNullExpression(node, opts = {}) { + assert("TSNonNullExpression", node, opts); +} + +function assertTSExportAssignment(node, opts = {}) { + assert("TSExportAssignment", node, opts); +} + +function assertTSNamespaceExportDeclaration(node, opts = {}) { + assert("TSNamespaceExportDeclaration", node, opts); +} + +function assertTSTypeAnnotation(node, opts = {}) { + assert("TSTypeAnnotation", node, opts); +} + +function assertTSTypeParameterInstantiation(node, opts = {}) { + assert("TSTypeParameterInstantiation", node, opts); +} + +function assertTSTypeParameterDeclaration(node, opts = {}) { + assert("TSTypeParameterDeclaration", node, opts); +} + +function assertTSTypeParameter(node, opts = {}) { + assert("TSTypeParameter", node, opts); +} + +function assertExpression(node, opts = {}) { + assert("Expression", node, opts); +} + +function assertBinary(node, opts = {}) { + assert("Binary", node, opts); +} + +function assertScopable(node, opts = {}) { + assert("Scopable", node, opts); +} + +function assertBlockParent(node, opts = {}) { + assert("BlockParent", node, opts); +} + +function assertBlock(node, opts = {}) { + assert("Block", node, opts); +} + +function assertStatement(node, opts = {}) { + assert("Statement", node, opts); +} + +function assertTerminatorless(node, opts = {}) { + assert("Terminatorless", node, opts); +} + +function assertCompletionStatement(node, opts = {}) { + assert("CompletionStatement", node, opts); +} + +function assertConditional(node, opts = {}) { + assert("Conditional", node, opts); +} + +function assertLoop(node, opts = {}) { + assert("Loop", node, opts); +} + +function assertWhile(node, opts = {}) { + assert("While", node, opts); +} + +function assertExpressionWrapper(node, opts = {}) { + assert("ExpressionWrapper", node, opts); +} + +function assertFor(node, opts = {}) { + assert("For", node, opts); +} + +function assertForXStatement(node, opts = {}) { + assert("ForXStatement", node, opts); +} + +function assertFunction(node, opts = {}) { + assert("Function", node, opts); +} + +function assertFunctionParent(node, opts = {}) { + assert("FunctionParent", node, opts); +} + +function assertPureish(node, opts = {}) { + assert("Pureish", node, opts); +} + +function assertDeclaration(node, opts = {}) { + assert("Declaration", node, opts); +} + +function assertPatternLike(node, opts = {}) { + assert("PatternLike", node, opts); +} + +function assertLVal(node, opts = {}) { + assert("LVal", node, opts); +} + +function assertTSEntityName(node, opts = {}) { + assert("TSEntityName", node, opts); +} + +function assertLiteral(node, opts = {}) { + assert("Literal", node, opts); +} + +function assertImmutable(node, opts = {}) { + assert("Immutable", node, opts); +} + +function assertUserWhitespacable(node, opts = {}) { + assert("UserWhitespacable", node, opts); +} + +function assertMethod(node, opts = {}) { + assert("Method", node, opts); +} + +function assertObjectMember(node, opts = {}) { + assert("ObjectMember", node, opts); +} + +function assertProperty(node, opts = {}) { + assert("Property", node, opts); +} + +function assertUnaryLike(node, opts = {}) { + assert("UnaryLike", node, opts); +} + +function assertPattern(node, opts = {}) { + assert("Pattern", node, opts); +} + +function assertClass(node, opts = {}) { + assert("Class", node, opts); +} + +function assertModuleDeclaration(node, opts = {}) { + assert("ModuleDeclaration", node, opts); +} + +function assertExportDeclaration(node, opts = {}) { + assert("ExportDeclaration", node, opts); +} + +function assertModuleSpecifier(node, opts = {}) { + assert("ModuleSpecifier", node, opts); +} + +function assertFlow(node, opts = {}) { + assert("Flow", node, opts); +} + +function assertFlowType(node, opts = {}) { + assert("FlowType", node, opts); +} + +function assertFlowBaseAnnotation(node, opts = {}) { + assert("FlowBaseAnnotation", node, opts); +} + +function assertFlowDeclaration(node, opts = {}) { + assert("FlowDeclaration", node, opts); +} + +function assertFlowPredicate(node, opts = {}) { + assert("FlowPredicate", node, opts); +} + +function assertEnumBody(node, opts = {}) { + assert("EnumBody", node, opts); +} + +function assertEnumMember(node, opts = {}) { + assert("EnumMember", node, opts); +} + +function assertJSX(node, opts = {}) { + assert("JSX", node, opts); +} + +function assertPrivate(node, opts = {}) { + assert("Private", node, opts); +} + +function assertTSTypeElement(node, opts = {}) { + assert("TSTypeElement", node, opts); +} + +function assertTSType(node, opts = {}) { + assert("TSType", node, opts); +} + +function assertNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + assert("NumberLiteral", node, opts); +} + +function assertRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + assert("RegexLiteral", node, opts); +} + +function assertRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + assert("RestProperty", node, opts); +} + +function assertSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + assert("SpreadProperty", node, opts); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/builder.js b/packages/common/node_modules/@babel/types/lib/builders/builder.js new file mode 100644 index 0000000000..812cc17933 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/builders/builder.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = builder; + +var _clone = _interopRequireDefault(require("lodash/clone")); + +var _definitions = require("../definitions"); + +var _validate = _interopRequireDefault(require("../validators/validate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function builder(type, ...args) { + const keys = _definitions.BUILDER_KEYS[type]; + const countArgs = args.length; + + if (countArgs > keys.length) { + throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); + } + + const node = { + type + }; + let i = 0; + keys.forEach(key => { + const field = _definitions.NODE_FIELDS[type][key]; + let arg; + if (i < countArgs) arg = args[i]; + if (arg === undefined) arg = (0, _clone.default)(field.default); + node[key] = arg; + i++; + }); + + for (const key of Object.keys(node)) { + (0, _validate.default)(node, key, node[key]); + } + + return node; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js new file mode 100644 index 0000000000..4724335f2a --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createTypeAnnotationBasedOnTypeof; + +var _generated = require("../generated"); + +function createTypeAnnotationBasedOnTypeof(type) { + if (type === "string") { + return (0, _generated.stringTypeAnnotation)(); + } else if (type === "number") { + return (0, _generated.numberTypeAnnotation)(); + } else if (type === "undefined") { + return (0, _generated.voidTypeAnnotation)(); + } else if (type === "boolean") { + return (0, _generated.booleanTypeAnnotation)(); + } else if (type === "function") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); + } else if (type === "object") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); + } else if (type === "symbol") { + return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); + } else { + throw new Error("Invalid typeof value"); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js new file mode 100644 index 0000000000..df76b0107f --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createUnionTypeAnnotation; + +var _generated = require("../generated"); + +var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createUnionTypeAnnotation(types) { + const flattened = (0, _removeTypeDuplicates.default)(types); + + if (flattened.length === 1) { + return flattened[0]; + } else { + return (0, _generated.unionTypeAnnotation)(flattened); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/generated/index.js b/packages/common/node_modules/@babel/types/lib/builders/generated/index.js new file mode 100644 index 0000000000..917d77a3b9 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/builders/generated/index.js @@ -0,0 +1,1218 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayExpression = exports.ArrayExpression = ArrayExpression; +exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; +exports.binaryExpression = exports.BinaryExpression = BinaryExpression; +exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; +exports.directive = exports.Directive = Directive; +exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; +exports.blockStatement = exports.BlockStatement = BlockStatement; +exports.breakStatement = exports.BreakStatement = BreakStatement; +exports.callExpression = exports.CallExpression = CallExpression; +exports.catchClause = exports.CatchClause = CatchClause; +exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; +exports.continueStatement = exports.ContinueStatement = ContinueStatement; +exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; +exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; +exports.emptyStatement = exports.EmptyStatement = EmptyStatement; +exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; +exports.file = exports.File = File; +exports.forInStatement = exports.ForInStatement = ForInStatement; +exports.forStatement = exports.ForStatement = ForStatement; +exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; +exports.functionExpression = exports.FunctionExpression = FunctionExpression; +exports.identifier = exports.Identifier = Identifier; +exports.ifStatement = exports.IfStatement = IfStatement; +exports.labeledStatement = exports.LabeledStatement = LabeledStatement; +exports.stringLiteral = exports.StringLiteral = StringLiteral; +exports.numericLiteral = exports.NumericLiteral = NumericLiteral; +exports.nullLiteral = exports.NullLiteral = NullLiteral; +exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; +exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; +exports.logicalExpression = exports.LogicalExpression = LogicalExpression; +exports.memberExpression = exports.MemberExpression = MemberExpression; +exports.newExpression = exports.NewExpression = NewExpression; +exports.program = exports.Program = Program; +exports.objectExpression = exports.ObjectExpression = ObjectExpression; +exports.objectMethod = exports.ObjectMethod = ObjectMethod; +exports.objectProperty = exports.ObjectProperty = ObjectProperty; +exports.restElement = exports.RestElement = RestElement; +exports.returnStatement = exports.ReturnStatement = ReturnStatement; +exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; +exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; +exports.switchCase = exports.SwitchCase = SwitchCase; +exports.switchStatement = exports.SwitchStatement = SwitchStatement; +exports.thisExpression = exports.ThisExpression = ThisExpression; +exports.throwStatement = exports.ThrowStatement = ThrowStatement; +exports.tryStatement = exports.TryStatement = TryStatement; +exports.unaryExpression = exports.UnaryExpression = UnaryExpression; +exports.updateExpression = exports.UpdateExpression = UpdateExpression; +exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; +exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; +exports.whileStatement = exports.WhileStatement = WhileStatement; +exports.withStatement = exports.WithStatement = WithStatement; +exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; +exports.arrayPattern = exports.ArrayPattern = ArrayPattern; +exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.classBody = exports.ClassBody = ClassBody; +exports.classExpression = exports.ClassExpression = ClassExpression; +exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; +exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; +exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; +exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; +exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; +exports.forOfStatement = exports.ForOfStatement = ForOfStatement; +exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; +exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; +exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; +exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; +exports.metaProperty = exports.MetaProperty = MetaProperty; +exports.classMethod = exports.ClassMethod = ClassMethod; +exports.objectPattern = exports.ObjectPattern = ObjectPattern; +exports.spreadElement = exports.SpreadElement = SpreadElement; +exports.super = exports.Super = Super; +exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; +exports.templateElement = exports.TemplateElement = TemplateElement; +exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; +exports.yieldExpression = exports.YieldExpression = YieldExpression; +exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; +exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; +exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; +exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; +exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; +exports.classImplements = exports.ClassImplements = ClassImplements; +exports.declareClass = exports.DeclareClass = DeclareClass; +exports.declareFunction = exports.DeclareFunction = DeclareFunction; +exports.declareInterface = exports.DeclareInterface = DeclareInterface; +exports.declareModule = exports.DeclareModule = DeclareModule; +exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; +exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; +exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; +exports.declareVariable = exports.DeclareVariable = DeclareVariable; +exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; +exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; +exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; +exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; +exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; +exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; +exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; +exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; +exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; +exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; +exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; +exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; +exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; +exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; +exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; +exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; +exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; +exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; +exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; +exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; +exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; +exports.opaqueType = exports.OpaqueType = OpaqueType; +exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; +exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; +exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; +exports.symbolTypeAnnotation = exports.SymbolTypeAnnotation = SymbolTypeAnnotation; +exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; +exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; +exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; +exports.typeAlias = exports.TypeAlias = TypeAlias; +exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; +exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; +exports.typeParameter = exports.TypeParameter = TypeParameter; +exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; +exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; +exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.variance = exports.Variance = Variance; +exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; +exports.enumDeclaration = exports.EnumDeclaration = EnumDeclaration; +exports.enumBooleanBody = exports.EnumBooleanBody = EnumBooleanBody; +exports.enumNumberBody = exports.EnumNumberBody = EnumNumberBody; +exports.enumStringBody = exports.EnumStringBody = EnumStringBody; +exports.enumSymbolBody = exports.EnumSymbolBody = EnumSymbolBody; +exports.enumBooleanMember = exports.EnumBooleanMember = EnumBooleanMember; +exports.enumNumberMember = exports.EnumNumberMember = EnumNumberMember; +exports.enumStringMember = exports.EnumStringMember = EnumStringMember; +exports.enumDefaultedMember = exports.EnumDefaultedMember = EnumDefaultedMember; +exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; +exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; +exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; +exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; +exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; +exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; +exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; +exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; +exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; +exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; +exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; +exports.jSXText = exports.jsxText = exports.JSXText = JSXText; +exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; +exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; +exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; +exports.noop = exports.Noop = Noop; +exports.placeholder = exports.Placeholder = Placeholder; +exports.v8IntrinsicIdentifier = exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; +exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; +exports.awaitExpression = exports.AwaitExpression = AwaitExpression; +exports.bindExpression = exports.BindExpression = BindExpression; +exports.classProperty = exports.ClassProperty = ClassProperty; +exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; +exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; +exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; +exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; +exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; +exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; +exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; +exports.import = exports.Import = Import; +exports.decorator = exports.Decorator = Decorator; +exports.doExpression = exports.DoExpression = DoExpression; +exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; +exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; +exports.privateName = exports.PrivateName = PrivateName; +exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; +exports.recordExpression = exports.RecordExpression = RecordExpression; +exports.tupleExpression = exports.TupleExpression = TupleExpression; +exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; +exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; +exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; +exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; +exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; +exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; +exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; +exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; +exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; +exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; +exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; +exports.tSBigIntKeyword = exports.tsBigIntKeyword = exports.TSBigIntKeyword = TSBigIntKeyword; +exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; +exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; +exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; +exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; +exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; +exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; +exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; +exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; +exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; +exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; +exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; +exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; +exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; +exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; +exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; +exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; +exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; +exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; +exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; +exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; +exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; +exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; +exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; +exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; +exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; +exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; +exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; +exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; +exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; +exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; +exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; +exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; +exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; +exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; +exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; +exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; +exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; +exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; +exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; +exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; +exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; +exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; +exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; +exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; +exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; +exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; +exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; +exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; +exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; +exports.numberLiteral = exports.NumberLiteral = NumberLiteral; +exports.regexLiteral = exports.RegexLiteral = RegexLiteral; +exports.restProperty = exports.RestProperty = RestProperty; +exports.spreadProperty = exports.SpreadProperty = SpreadProperty; + +var _builder = _interopRequireDefault(require("../builder")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ArrayExpression(...args) { + return (0, _builder.default)("ArrayExpression", ...args); +} + +function AssignmentExpression(...args) { + return (0, _builder.default)("AssignmentExpression", ...args); +} + +function BinaryExpression(...args) { + return (0, _builder.default)("BinaryExpression", ...args); +} + +function InterpreterDirective(...args) { + return (0, _builder.default)("InterpreterDirective", ...args); +} + +function Directive(...args) { + return (0, _builder.default)("Directive", ...args); +} + +function DirectiveLiteral(...args) { + return (0, _builder.default)("DirectiveLiteral", ...args); +} + +function BlockStatement(...args) { + return (0, _builder.default)("BlockStatement", ...args); +} + +function BreakStatement(...args) { + return (0, _builder.default)("BreakStatement", ...args); +} + +function CallExpression(...args) { + return (0, _builder.default)("CallExpression", ...args); +} + +function CatchClause(...args) { + return (0, _builder.default)("CatchClause", ...args); +} + +function ConditionalExpression(...args) { + return (0, _builder.default)("ConditionalExpression", ...args); +} + +function ContinueStatement(...args) { + return (0, _builder.default)("ContinueStatement", ...args); +} + +function DebuggerStatement(...args) { + return (0, _builder.default)("DebuggerStatement", ...args); +} + +function DoWhileStatement(...args) { + return (0, _builder.default)("DoWhileStatement", ...args); +} + +function EmptyStatement(...args) { + return (0, _builder.default)("EmptyStatement", ...args); +} + +function ExpressionStatement(...args) { + return (0, _builder.default)("ExpressionStatement", ...args); +} + +function File(...args) { + return (0, _builder.default)("File", ...args); +} + +function ForInStatement(...args) { + return (0, _builder.default)("ForInStatement", ...args); +} + +function ForStatement(...args) { + return (0, _builder.default)("ForStatement", ...args); +} + +function FunctionDeclaration(...args) { + return (0, _builder.default)("FunctionDeclaration", ...args); +} + +function FunctionExpression(...args) { + return (0, _builder.default)("FunctionExpression", ...args); +} + +function Identifier(...args) { + return (0, _builder.default)("Identifier", ...args); +} + +function IfStatement(...args) { + return (0, _builder.default)("IfStatement", ...args); +} + +function LabeledStatement(...args) { + return (0, _builder.default)("LabeledStatement", ...args); +} + +function StringLiteral(...args) { + return (0, _builder.default)("StringLiteral", ...args); +} + +function NumericLiteral(...args) { + return (0, _builder.default)("NumericLiteral", ...args); +} + +function NullLiteral(...args) { + return (0, _builder.default)("NullLiteral", ...args); +} + +function BooleanLiteral(...args) { + return (0, _builder.default)("BooleanLiteral", ...args); +} + +function RegExpLiteral(...args) { + return (0, _builder.default)("RegExpLiteral", ...args); +} + +function LogicalExpression(...args) { + return (0, _builder.default)("LogicalExpression", ...args); +} + +function MemberExpression(...args) { + return (0, _builder.default)("MemberExpression", ...args); +} + +function NewExpression(...args) { + return (0, _builder.default)("NewExpression", ...args); +} + +function Program(...args) { + return (0, _builder.default)("Program", ...args); +} + +function ObjectExpression(...args) { + return (0, _builder.default)("ObjectExpression", ...args); +} + +function ObjectMethod(...args) { + return (0, _builder.default)("ObjectMethod", ...args); +} + +function ObjectProperty(...args) { + return (0, _builder.default)("ObjectProperty", ...args); +} + +function RestElement(...args) { + return (0, _builder.default)("RestElement", ...args); +} + +function ReturnStatement(...args) { + return (0, _builder.default)("ReturnStatement", ...args); +} + +function SequenceExpression(...args) { + return (0, _builder.default)("SequenceExpression", ...args); +} + +function ParenthesizedExpression(...args) { + return (0, _builder.default)("ParenthesizedExpression", ...args); +} + +function SwitchCase(...args) { + return (0, _builder.default)("SwitchCase", ...args); +} + +function SwitchStatement(...args) { + return (0, _builder.default)("SwitchStatement", ...args); +} + +function ThisExpression(...args) { + return (0, _builder.default)("ThisExpression", ...args); +} + +function ThrowStatement(...args) { + return (0, _builder.default)("ThrowStatement", ...args); +} + +function TryStatement(...args) { + return (0, _builder.default)("TryStatement", ...args); +} + +function UnaryExpression(...args) { + return (0, _builder.default)("UnaryExpression", ...args); +} + +function UpdateExpression(...args) { + return (0, _builder.default)("UpdateExpression", ...args); +} + +function VariableDeclaration(...args) { + return (0, _builder.default)("VariableDeclaration", ...args); +} + +function VariableDeclarator(...args) { + return (0, _builder.default)("VariableDeclarator", ...args); +} + +function WhileStatement(...args) { + return (0, _builder.default)("WhileStatement", ...args); +} + +function WithStatement(...args) { + return (0, _builder.default)("WithStatement", ...args); +} + +function AssignmentPattern(...args) { + return (0, _builder.default)("AssignmentPattern", ...args); +} + +function ArrayPattern(...args) { + return (0, _builder.default)("ArrayPattern", ...args); +} + +function ArrowFunctionExpression(...args) { + return (0, _builder.default)("ArrowFunctionExpression", ...args); +} + +function ClassBody(...args) { + return (0, _builder.default)("ClassBody", ...args); +} + +function ClassExpression(...args) { + return (0, _builder.default)("ClassExpression", ...args); +} + +function ClassDeclaration(...args) { + return (0, _builder.default)("ClassDeclaration", ...args); +} + +function ExportAllDeclaration(...args) { + return (0, _builder.default)("ExportAllDeclaration", ...args); +} + +function ExportDefaultDeclaration(...args) { + return (0, _builder.default)("ExportDefaultDeclaration", ...args); +} + +function ExportNamedDeclaration(...args) { + return (0, _builder.default)("ExportNamedDeclaration", ...args); +} + +function ExportSpecifier(...args) { + return (0, _builder.default)("ExportSpecifier", ...args); +} + +function ForOfStatement(...args) { + return (0, _builder.default)("ForOfStatement", ...args); +} + +function ImportDeclaration(...args) { + return (0, _builder.default)("ImportDeclaration", ...args); +} + +function ImportDefaultSpecifier(...args) { + return (0, _builder.default)("ImportDefaultSpecifier", ...args); +} + +function ImportNamespaceSpecifier(...args) { + return (0, _builder.default)("ImportNamespaceSpecifier", ...args); +} + +function ImportSpecifier(...args) { + return (0, _builder.default)("ImportSpecifier", ...args); +} + +function MetaProperty(...args) { + return (0, _builder.default)("MetaProperty", ...args); +} + +function ClassMethod(...args) { + return (0, _builder.default)("ClassMethod", ...args); +} + +function ObjectPattern(...args) { + return (0, _builder.default)("ObjectPattern", ...args); +} + +function SpreadElement(...args) { + return (0, _builder.default)("SpreadElement", ...args); +} + +function Super(...args) { + return (0, _builder.default)("Super", ...args); +} + +function TaggedTemplateExpression(...args) { + return (0, _builder.default)("TaggedTemplateExpression", ...args); +} + +function TemplateElement(...args) { + return (0, _builder.default)("TemplateElement", ...args); +} + +function TemplateLiteral(...args) { + return (0, _builder.default)("TemplateLiteral", ...args); +} + +function YieldExpression(...args) { + return (0, _builder.default)("YieldExpression", ...args); +} + +function AnyTypeAnnotation(...args) { + return (0, _builder.default)("AnyTypeAnnotation", ...args); +} + +function ArrayTypeAnnotation(...args) { + return (0, _builder.default)("ArrayTypeAnnotation", ...args); +} + +function BooleanTypeAnnotation(...args) { + return (0, _builder.default)("BooleanTypeAnnotation", ...args); +} + +function BooleanLiteralTypeAnnotation(...args) { + return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args); +} + +function NullLiteralTypeAnnotation(...args) { + return (0, _builder.default)("NullLiteralTypeAnnotation", ...args); +} + +function ClassImplements(...args) { + return (0, _builder.default)("ClassImplements", ...args); +} + +function DeclareClass(...args) { + return (0, _builder.default)("DeclareClass", ...args); +} + +function DeclareFunction(...args) { + return (0, _builder.default)("DeclareFunction", ...args); +} + +function DeclareInterface(...args) { + return (0, _builder.default)("DeclareInterface", ...args); +} + +function DeclareModule(...args) { + return (0, _builder.default)("DeclareModule", ...args); +} + +function DeclareModuleExports(...args) { + return (0, _builder.default)("DeclareModuleExports", ...args); +} + +function DeclareTypeAlias(...args) { + return (0, _builder.default)("DeclareTypeAlias", ...args); +} + +function DeclareOpaqueType(...args) { + return (0, _builder.default)("DeclareOpaqueType", ...args); +} + +function DeclareVariable(...args) { + return (0, _builder.default)("DeclareVariable", ...args); +} + +function DeclareExportDeclaration(...args) { + return (0, _builder.default)("DeclareExportDeclaration", ...args); +} + +function DeclareExportAllDeclaration(...args) { + return (0, _builder.default)("DeclareExportAllDeclaration", ...args); +} + +function DeclaredPredicate(...args) { + return (0, _builder.default)("DeclaredPredicate", ...args); +} + +function ExistsTypeAnnotation(...args) { + return (0, _builder.default)("ExistsTypeAnnotation", ...args); +} + +function FunctionTypeAnnotation(...args) { + return (0, _builder.default)("FunctionTypeAnnotation", ...args); +} + +function FunctionTypeParam(...args) { + return (0, _builder.default)("FunctionTypeParam", ...args); +} + +function GenericTypeAnnotation(...args) { + return (0, _builder.default)("GenericTypeAnnotation", ...args); +} + +function InferredPredicate(...args) { + return (0, _builder.default)("InferredPredicate", ...args); +} + +function InterfaceExtends(...args) { + return (0, _builder.default)("InterfaceExtends", ...args); +} + +function InterfaceDeclaration(...args) { + return (0, _builder.default)("InterfaceDeclaration", ...args); +} + +function InterfaceTypeAnnotation(...args) { + return (0, _builder.default)("InterfaceTypeAnnotation", ...args); +} + +function IntersectionTypeAnnotation(...args) { + return (0, _builder.default)("IntersectionTypeAnnotation", ...args); +} + +function MixedTypeAnnotation(...args) { + return (0, _builder.default)("MixedTypeAnnotation", ...args); +} + +function EmptyTypeAnnotation(...args) { + return (0, _builder.default)("EmptyTypeAnnotation", ...args); +} + +function NullableTypeAnnotation(...args) { + return (0, _builder.default)("NullableTypeAnnotation", ...args); +} + +function NumberLiteralTypeAnnotation(...args) { + return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args); +} + +function NumberTypeAnnotation(...args) { + return (0, _builder.default)("NumberTypeAnnotation", ...args); +} + +function ObjectTypeAnnotation(...args) { + return (0, _builder.default)("ObjectTypeAnnotation", ...args); +} + +function ObjectTypeInternalSlot(...args) { + return (0, _builder.default)("ObjectTypeInternalSlot", ...args); +} + +function ObjectTypeCallProperty(...args) { + return (0, _builder.default)("ObjectTypeCallProperty", ...args); +} + +function ObjectTypeIndexer(...args) { + return (0, _builder.default)("ObjectTypeIndexer", ...args); +} + +function ObjectTypeProperty(...args) { + return (0, _builder.default)("ObjectTypeProperty", ...args); +} + +function ObjectTypeSpreadProperty(...args) { + return (0, _builder.default)("ObjectTypeSpreadProperty", ...args); +} + +function OpaqueType(...args) { + return (0, _builder.default)("OpaqueType", ...args); +} + +function QualifiedTypeIdentifier(...args) { + return (0, _builder.default)("QualifiedTypeIdentifier", ...args); +} + +function StringLiteralTypeAnnotation(...args) { + return (0, _builder.default)("StringLiteralTypeAnnotation", ...args); +} + +function StringTypeAnnotation(...args) { + return (0, _builder.default)("StringTypeAnnotation", ...args); +} + +function SymbolTypeAnnotation(...args) { + return (0, _builder.default)("SymbolTypeAnnotation", ...args); +} + +function ThisTypeAnnotation(...args) { + return (0, _builder.default)("ThisTypeAnnotation", ...args); +} + +function TupleTypeAnnotation(...args) { + return (0, _builder.default)("TupleTypeAnnotation", ...args); +} + +function TypeofTypeAnnotation(...args) { + return (0, _builder.default)("TypeofTypeAnnotation", ...args); +} + +function TypeAlias(...args) { + return (0, _builder.default)("TypeAlias", ...args); +} + +function TypeAnnotation(...args) { + return (0, _builder.default)("TypeAnnotation", ...args); +} + +function TypeCastExpression(...args) { + return (0, _builder.default)("TypeCastExpression", ...args); +} + +function TypeParameter(...args) { + return (0, _builder.default)("TypeParameter", ...args); +} + +function TypeParameterDeclaration(...args) { + return (0, _builder.default)("TypeParameterDeclaration", ...args); +} + +function TypeParameterInstantiation(...args) { + return (0, _builder.default)("TypeParameterInstantiation", ...args); +} + +function UnionTypeAnnotation(...args) { + return (0, _builder.default)("UnionTypeAnnotation", ...args); +} + +function Variance(...args) { + return (0, _builder.default)("Variance", ...args); +} + +function VoidTypeAnnotation(...args) { + return (0, _builder.default)("VoidTypeAnnotation", ...args); +} + +function EnumDeclaration(...args) { + return (0, _builder.default)("EnumDeclaration", ...args); +} + +function EnumBooleanBody(...args) { + return (0, _builder.default)("EnumBooleanBody", ...args); +} + +function EnumNumberBody(...args) { + return (0, _builder.default)("EnumNumberBody", ...args); +} + +function EnumStringBody(...args) { + return (0, _builder.default)("EnumStringBody", ...args); +} + +function EnumSymbolBody(...args) { + return (0, _builder.default)("EnumSymbolBody", ...args); +} + +function EnumBooleanMember(...args) { + return (0, _builder.default)("EnumBooleanMember", ...args); +} + +function EnumNumberMember(...args) { + return (0, _builder.default)("EnumNumberMember", ...args); +} + +function EnumStringMember(...args) { + return (0, _builder.default)("EnumStringMember", ...args); +} + +function EnumDefaultedMember(...args) { + return (0, _builder.default)("EnumDefaultedMember", ...args); +} + +function JSXAttribute(...args) { + return (0, _builder.default)("JSXAttribute", ...args); +} + +function JSXClosingElement(...args) { + return (0, _builder.default)("JSXClosingElement", ...args); +} + +function JSXElement(...args) { + return (0, _builder.default)("JSXElement", ...args); +} + +function JSXEmptyExpression(...args) { + return (0, _builder.default)("JSXEmptyExpression", ...args); +} + +function JSXExpressionContainer(...args) { + return (0, _builder.default)("JSXExpressionContainer", ...args); +} + +function JSXSpreadChild(...args) { + return (0, _builder.default)("JSXSpreadChild", ...args); +} + +function JSXIdentifier(...args) { + return (0, _builder.default)("JSXIdentifier", ...args); +} + +function JSXMemberExpression(...args) { + return (0, _builder.default)("JSXMemberExpression", ...args); +} + +function JSXNamespacedName(...args) { + return (0, _builder.default)("JSXNamespacedName", ...args); +} + +function JSXOpeningElement(...args) { + return (0, _builder.default)("JSXOpeningElement", ...args); +} + +function JSXSpreadAttribute(...args) { + return (0, _builder.default)("JSXSpreadAttribute", ...args); +} + +function JSXText(...args) { + return (0, _builder.default)("JSXText", ...args); +} + +function JSXFragment(...args) { + return (0, _builder.default)("JSXFragment", ...args); +} + +function JSXOpeningFragment(...args) { + return (0, _builder.default)("JSXOpeningFragment", ...args); +} + +function JSXClosingFragment(...args) { + return (0, _builder.default)("JSXClosingFragment", ...args); +} + +function Noop(...args) { + return (0, _builder.default)("Noop", ...args); +} + +function Placeholder(...args) { + return (0, _builder.default)("Placeholder", ...args); +} + +function V8IntrinsicIdentifier(...args) { + return (0, _builder.default)("V8IntrinsicIdentifier", ...args); +} + +function ArgumentPlaceholder(...args) { + return (0, _builder.default)("ArgumentPlaceholder", ...args); +} + +function AwaitExpression(...args) { + return (0, _builder.default)("AwaitExpression", ...args); +} + +function BindExpression(...args) { + return (0, _builder.default)("BindExpression", ...args); +} + +function ClassProperty(...args) { + return (0, _builder.default)("ClassProperty", ...args); +} + +function OptionalMemberExpression(...args) { + return (0, _builder.default)("OptionalMemberExpression", ...args); +} + +function PipelineTopicExpression(...args) { + return (0, _builder.default)("PipelineTopicExpression", ...args); +} + +function PipelineBareFunction(...args) { + return (0, _builder.default)("PipelineBareFunction", ...args); +} + +function PipelinePrimaryTopicReference(...args) { + return (0, _builder.default)("PipelinePrimaryTopicReference", ...args); +} + +function OptionalCallExpression(...args) { + return (0, _builder.default)("OptionalCallExpression", ...args); +} + +function ClassPrivateProperty(...args) { + return (0, _builder.default)("ClassPrivateProperty", ...args); +} + +function ClassPrivateMethod(...args) { + return (0, _builder.default)("ClassPrivateMethod", ...args); +} + +function Import(...args) { + return (0, _builder.default)("Import", ...args); +} + +function Decorator(...args) { + return (0, _builder.default)("Decorator", ...args); +} + +function DoExpression(...args) { + return (0, _builder.default)("DoExpression", ...args); +} + +function ExportDefaultSpecifier(...args) { + return (0, _builder.default)("ExportDefaultSpecifier", ...args); +} + +function ExportNamespaceSpecifier(...args) { + return (0, _builder.default)("ExportNamespaceSpecifier", ...args); +} + +function PrivateName(...args) { + return (0, _builder.default)("PrivateName", ...args); +} + +function BigIntLiteral(...args) { + return (0, _builder.default)("BigIntLiteral", ...args); +} + +function RecordExpression(...args) { + return (0, _builder.default)("RecordExpression", ...args); +} + +function TupleExpression(...args) { + return (0, _builder.default)("TupleExpression", ...args); +} + +function TSParameterProperty(...args) { + return (0, _builder.default)("TSParameterProperty", ...args); +} + +function TSDeclareFunction(...args) { + return (0, _builder.default)("TSDeclareFunction", ...args); +} + +function TSDeclareMethod(...args) { + return (0, _builder.default)("TSDeclareMethod", ...args); +} + +function TSQualifiedName(...args) { + return (0, _builder.default)("TSQualifiedName", ...args); +} + +function TSCallSignatureDeclaration(...args) { + return (0, _builder.default)("TSCallSignatureDeclaration", ...args); +} + +function TSConstructSignatureDeclaration(...args) { + return (0, _builder.default)("TSConstructSignatureDeclaration", ...args); +} + +function TSPropertySignature(...args) { + return (0, _builder.default)("TSPropertySignature", ...args); +} + +function TSMethodSignature(...args) { + return (0, _builder.default)("TSMethodSignature", ...args); +} + +function TSIndexSignature(...args) { + return (0, _builder.default)("TSIndexSignature", ...args); +} + +function TSAnyKeyword(...args) { + return (0, _builder.default)("TSAnyKeyword", ...args); +} + +function TSBooleanKeyword(...args) { + return (0, _builder.default)("TSBooleanKeyword", ...args); +} + +function TSBigIntKeyword(...args) { + return (0, _builder.default)("TSBigIntKeyword", ...args); +} + +function TSNeverKeyword(...args) { + return (0, _builder.default)("TSNeverKeyword", ...args); +} + +function TSNullKeyword(...args) { + return (0, _builder.default)("TSNullKeyword", ...args); +} + +function TSNumberKeyword(...args) { + return (0, _builder.default)("TSNumberKeyword", ...args); +} + +function TSObjectKeyword(...args) { + return (0, _builder.default)("TSObjectKeyword", ...args); +} + +function TSStringKeyword(...args) { + return (0, _builder.default)("TSStringKeyword", ...args); +} + +function TSSymbolKeyword(...args) { + return (0, _builder.default)("TSSymbolKeyword", ...args); +} + +function TSUndefinedKeyword(...args) { + return (0, _builder.default)("TSUndefinedKeyword", ...args); +} + +function TSUnknownKeyword(...args) { + return (0, _builder.default)("TSUnknownKeyword", ...args); +} + +function TSVoidKeyword(...args) { + return (0, _builder.default)("TSVoidKeyword", ...args); +} + +function TSThisType(...args) { + return (0, _builder.default)("TSThisType", ...args); +} + +function TSFunctionType(...args) { + return (0, _builder.default)("TSFunctionType", ...args); +} + +function TSConstructorType(...args) { + return (0, _builder.default)("TSConstructorType", ...args); +} + +function TSTypeReference(...args) { + return (0, _builder.default)("TSTypeReference", ...args); +} + +function TSTypePredicate(...args) { + return (0, _builder.default)("TSTypePredicate", ...args); +} + +function TSTypeQuery(...args) { + return (0, _builder.default)("TSTypeQuery", ...args); +} + +function TSTypeLiteral(...args) { + return (0, _builder.default)("TSTypeLiteral", ...args); +} + +function TSArrayType(...args) { + return (0, _builder.default)("TSArrayType", ...args); +} + +function TSTupleType(...args) { + return (0, _builder.default)("TSTupleType", ...args); +} + +function TSOptionalType(...args) { + return (0, _builder.default)("TSOptionalType", ...args); +} + +function TSRestType(...args) { + return (0, _builder.default)("TSRestType", ...args); +} + +function TSUnionType(...args) { + return (0, _builder.default)("TSUnionType", ...args); +} + +function TSIntersectionType(...args) { + return (0, _builder.default)("TSIntersectionType", ...args); +} + +function TSConditionalType(...args) { + return (0, _builder.default)("TSConditionalType", ...args); +} + +function TSInferType(...args) { + return (0, _builder.default)("TSInferType", ...args); +} + +function TSParenthesizedType(...args) { + return (0, _builder.default)("TSParenthesizedType", ...args); +} + +function TSTypeOperator(...args) { + return (0, _builder.default)("TSTypeOperator", ...args); +} + +function TSIndexedAccessType(...args) { + return (0, _builder.default)("TSIndexedAccessType", ...args); +} + +function TSMappedType(...args) { + return (0, _builder.default)("TSMappedType", ...args); +} + +function TSLiteralType(...args) { + return (0, _builder.default)("TSLiteralType", ...args); +} + +function TSExpressionWithTypeArguments(...args) { + return (0, _builder.default)("TSExpressionWithTypeArguments", ...args); +} + +function TSInterfaceDeclaration(...args) { + return (0, _builder.default)("TSInterfaceDeclaration", ...args); +} + +function TSInterfaceBody(...args) { + return (0, _builder.default)("TSInterfaceBody", ...args); +} + +function TSTypeAliasDeclaration(...args) { + return (0, _builder.default)("TSTypeAliasDeclaration", ...args); +} + +function TSAsExpression(...args) { + return (0, _builder.default)("TSAsExpression", ...args); +} + +function TSTypeAssertion(...args) { + return (0, _builder.default)("TSTypeAssertion", ...args); +} + +function TSEnumDeclaration(...args) { + return (0, _builder.default)("TSEnumDeclaration", ...args); +} + +function TSEnumMember(...args) { + return (0, _builder.default)("TSEnumMember", ...args); +} + +function TSModuleDeclaration(...args) { + return (0, _builder.default)("TSModuleDeclaration", ...args); +} + +function TSModuleBlock(...args) { + return (0, _builder.default)("TSModuleBlock", ...args); +} + +function TSImportType(...args) { + return (0, _builder.default)("TSImportType", ...args); +} + +function TSImportEqualsDeclaration(...args) { + return (0, _builder.default)("TSImportEqualsDeclaration", ...args); +} + +function TSExternalModuleReference(...args) { + return (0, _builder.default)("TSExternalModuleReference", ...args); +} + +function TSNonNullExpression(...args) { + return (0, _builder.default)("TSNonNullExpression", ...args); +} + +function TSExportAssignment(...args) { + return (0, _builder.default)("TSExportAssignment", ...args); +} + +function TSNamespaceExportDeclaration(...args) { + return (0, _builder.default)("TSNamespaceExportDeclaration", ...args); +} + +function TSTypeAnnotation(...args) { + return (0, _builder.default)("TSTypeAnnotation", ...args); +} + +function TSTypeParameterInstantiation(...args) { + return (0, _builder.default)("TSTypeParameterInstantiation", ...args); +} + +function TSTypeParameterDeclaration(...args) { + return (0, _builder.default)("TSTypeParameterDeclaration", ...args); +} + +function TSTypeParameter(...args) { + return (0, _builder.default)("TSTypeParameter", ...args); +} + +function NumberLiteral(...args) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + return NumberLiteral("NumberLiteral", ...args); +} + +function RegexLiteral(...args) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + return RegexLiteral("RegexLiteral", ...args); +} + +function RestProperty(...args) { + console.trace("The node type RestProperty has been renamed to RestElement"); + return RestProperty("RestProperty", ...args); +} + +function SpreadProperty(...args) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + return SpreadProperty("SpreadProperty", ...args); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js b/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js new file mode 100644 index 0000000000..91e7cbd9ca --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildChildren; + +var _generated = require("../../validators/generated"); + +var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/react/cleanJSXElementLiteralChild")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function buildChildren(node) { + const elements = []; + + for (let i = 0; i < node.children.length; i++) { + let child = node.children[i]; + + if ((0, _generated.isJSXText)(child)) { + (0, _cleanJSXElementLiteralChild.default)(child, elements); + continue; + } + + if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; + if ((0, _generated.isJSXEmptyExpression)(child)) continue; + elements.push(child); + } + + return elements; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/clone.js b/packages/common/node_modules/@babel/types/lib/clone/clone.js new file mode 100644 index 0000000000..9595f6e25c --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/clone/clone.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = clone; + +var _cloneNode = _interopRequireDefault(require("./cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function clone(node) { + return (0, _cloneNode.default)(node, false); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js b/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js new file mode 100644 index 0000000000..eb29c53622 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneDeep; + +var _cloneNode = _interopRequireDefault(require("./cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cloneDeep(node) { + return (0, _cloneNode.default)(node); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js b/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js new file mode 100644 index 0000000000..d8612e9ebb --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneDeepWithoutLoc; + +var _cloneNode = _interopRequireDefault(require("./cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cloneDeepWithoutLoc(node) { + return (0, _cloneNode.default)(node, true, true); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js b/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js new file mode 100644 index 0000000000..44032e3f9d --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js @@ -0,0 +1,101 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneNode; + +var _definitions = require("../definitions"); + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function cloneIfNode(obj, deep, withoutLoc) { + if (obj && typeof obj.type === "string") { + return cloneNode(obj, deep, withoutLoc); + } + + return obj; +} + +function cloneIfNodeOrArray(obj, deep, withoutLoc) { + if (Array.isArray(obj)) { + return obj.map(node => cloneIfNode(node, deep, withoutLoc)); + } + + return cloneIfNode(obj, deep, withoutLoc); +} + +function cloneNode(node, deep = true, withoutLoc = false) { + if (!node) return node; + const { + type + } = node; + const newNode = { + type + }; + + if (type === "Identifier") { + newNode.name = node.name; + + if (has(node, "optional") && typeof node.optional === "boolean") { + newNode.optional = node.optional; + } + + if (has(node, "typeAnnotation")) { + newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; + } + } else if (!has(_definitions.NODE_FIELDS, type)) { + throw new Error(`Unknown node type: "${type}"`); + } else { + for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { + if (has(node, field)) { + if (deep) { + newNode[field] = type === "File" && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); + } else { + newNode[field] = node[field]; + } + } + } + } + + if (has(node, "loc")) { + if (withoutLoc) { + newNode.loc = null; + } else { + newNode.loc = node.loc; + } + } + + if (has(node, "leadingComments")) { + newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); + } + + if (has(node, "innerComments")) { + newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); + } + + if (has(node, "trailingComments")) { + newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); + } + + if (has(node, "extra")) { + newNode.extra = Object.assign({}, node.extra); + } + + return newNode; +} + +function cloneCommentsWithoutLoc(comments) { + return comments.map(({ + type, + value + }) => ({ + type, + value, + loc: null + })); +} + +function maybeCloneComments(comments, deep, withoutLoc) { + return deep && withoutLoc ? cloneCommentsWithoutLoc(comments) : comments; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js new file mode 100644 index 0000000000..34fd172ed7 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneWithoutLoc; + +var _cloneNode = _interopRequireDefault(require("./cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cloneWithoutLoc(node) { + return (0, _cloneNode.default)(node, false, true); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/addComment.js b/packages/common/node_modules/@babel/types/lib/comments/addComment.js new file mode 100644 index 0000000000..ff586514e7 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/addComment.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComment; + +var _addComments = _interopRequireDefault(require("./addComments")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function addComment(node, type, content, line) { + return (0, _addComments.default)(node, type, [{ + type: line ? "CommentLine" : "CommentBlock", + value: content + }]); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/addComments.js b/packages/common/node_modules/@babel/types/lib/comments/addComments.js new file mode 100644 index 0000000000..f3a61df713 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/addComments.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = addComments; + +function addComments(node, type, comments) { + if (!comments || !node) return node; + const key = `${type}Comments`; + + if (node[key]) { + if (type === "leading") { + node[key] = comments.concat(node[key]); + } else { + node[key] = node[key].concat(comments); + } + } else { + node[key] = comments; + } + + return node; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js new file mode 100644 index 0000000000..fbe59dec62 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritInnerComments; + +var _inherit = _interopRequireDefault(require("../utils/inherit")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inheritInnerComments(child, parent) { + (0, _inherit.default)("innerComments", child, parent); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js new file mode 100644 index 0000000000..ccb02ec55b --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritLeadingComments; + +var _inherit = _interopRequireDefault(require("../utils/inherit")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inheritLeadingComments(child, parent) { + (0, _inherit.default)("leadingComments", child, parent); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js new file mode 100644 index 0000000000..bce1e2d9ac --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritTrailingComments; + +var _inherit = _interopRequireDefault(require("../utils/inherit")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inheritTrailingComments(child, parent) { + (0, _inherit.default)("trailingComments", child, parent); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js new file mode 100644 index 0000000000..fd942d86cd --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inheritsComments; + +var _inheritTrailingComments = _interopRequireDefault(require("./inheritTrailingComments")); + +var _inheritLeadingComments = _interopRequireDefault(require("./inheritLeadingComments")); + +var _inheritInnerComments = _interopRequireDefault(require("./inheritInnerComments")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inheritsComments(child, parent) { + (0, _inheritTrailingComments.default)(child, parent); + (0, _inheritLeadingComments.default)(child, parent); + (0, _inheritInnerComments.default)(child, parent); + return child; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/removeComments.js b/packages/common/node_modules/@babel/types/lib/comments/removeComments.js new file mode 100644 index 0000000000..fe34f1a890 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/comments/removeComments.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeComments; + +var _constants = require("../constants"); + +function removeComments(node) { + _constants.COMMENT_KEYS.forEach(key => { + node[key] = null; + }); + + return node; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/constants/generated/index.js b/packages/common/node_modules/@babel/types/lib/constants/generated/index.js new file mode 100644 index 0000000000..a8b6e78040 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/constants/generated/index.js @@ -0,0 +1,97 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; + +var _definitions = require("../../definitions"); + +const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; +exports.EXPRESSION_TYPES = EXPRESSION_TYPES; +const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; +exports.BINARY_TYPES = BINARY_TYPES; +const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; +exports.SCOPABLE_TYPES = SCOPABLE_TYPES; +const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; +exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; +const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; +exports.BLOCK_TYPES = BLOCK_TYPES; +const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; +exports.STATEMENT_TYPES = STATEMENT_TYPES; +const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; +exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; +const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; +exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; +const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; +exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; +const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; +exports.LOOP_TYPES = LOOP_TYPES; +const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; +exports.WHILE_TYPES = WHILE_TYPES; +const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; +exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; +const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; +exports.FOR_TYPES = FOR_TYPES; +const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; +exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; +const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; +exports.FUNCTION_TYPES = FUNCTION_TYPES; +const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; +exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; +const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; +exports.PUREISH_TYPES = PUREISH_TYPES; +const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; +exports.DECLARATION_TYPES = DECLARATION_TYPES; +const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; +exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; +const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; +exports.LVAL_TYPES = LVAL_TYPES; +const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; +exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; +const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; +exports.LITERAL_TYPES = LITERAL_TYPES; +const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; +exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; +const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; +exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; +const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; +exports.METHOD_TYPES = METHOD_TYPES; +const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; +exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; +const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; +exports.PROPERTY_TYPES = PROPERTY_TYPES; +const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; +exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; +const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; +exports.PATTERN_TYPES = PATTERN_TYPES; +const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; +exports.CLASS_TYPES = CLASS_TYPES; +const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; +exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; +const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; +exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; +const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; +exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; +const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; +exports.FLOW_TYPES = FLOW_TYPES; +const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; +exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; +const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; +exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; +const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; +exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; +const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; +exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; +const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; +exports.ENUMBODY_TYPES = ENUMBODY_TYPES; +const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; +exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; +const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; +exports.JSX_TYPES = JSX_TYPES; +const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; +exports.PRIVATE_TYPES = PRIVATE_TYPES; +const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; +exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; +const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; +exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/constants/index.js b/packages/common/node_modules/@babel/types/lib/constants/index.js new file mode 100644 index 0000000000..7553162c66 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/constants/index.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; +const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; +const FLATTENABLE_KEYS = ["body", "expressions"]; +exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; +const FOR_INIT_KEYS = ["left", "init"]; +exports.FOR_INIT_KEYS = FOR_INIT_KEYS; +const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; +exports.COMMENT_KEYS = COMMENT_KEYS; +const LOGICAL_OPERATORS = ["||", "&&", "??"]; +exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; +const UPDATE_OPERATORS = ["++", "--"]; +exports.UPDATE_OPERATORS = UPDATE_OPERATORS; +const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; +const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; +const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; +exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; +const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; +exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; +const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; +const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; +exports.BINARY_OPERATORS = BINARY_OPERATORS; +const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")]; +exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; +const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; +const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; +exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; +const STRING_UNARY_OPERATORS = ["typeof"]; +exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; +const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; +exports.UNARY_OPERATORS = UNARY_OPERATORS; +const INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] +}; +exports.INHERIT_KEYS = INHERIT_KEYS; +const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); +exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; +const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); +exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js b/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js new file mode 100644 index 0000000000..2836b36578 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ensureBlock; + +var _toBlock = _interopRequireDefault(require("./toBlock")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ensureBlock(node, key = "body") { + return node[key] = (0, _toBlock.default)(node[key], node); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js new file mode 100644 index 0000000000..fadd0f04be --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js @@ -0,0 +1,73 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gatherSequenceExpressions; + +var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function gatherSequenceExpressions(nodes, scope, declars) { + const exprs = []; + let ensureLastUndefined = true; + + for (const node of nodes) { + ensureLastUndefined = false; + + if ((0, _generated.isExpression)(node)) { + exprs.push(node); + } else if ((0, _generated.isExpressionStatement)(node)) { + exprs.push(node.expression); + } else if ((0, _generated.isVariableDeclaration)(node)) { + if (node.kind !== "var") return; + + for (const declar of node.declarations) { + const bindings = (0, _getBindingIdentifiers.default)(declar); + + for (const key of Object.keys(bindings)) { + declars.push({ + kind: node.kind, + id: (0, _cloneNode.default)(bindings[key]) + }); + } + + if (declar.init) { + exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); + } + } + + ensureLastUndefined = true; + } else if ((0, _generated.isIfStatement)(node)) { + const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); + const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return; + exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); + } else if ((0, _generated.isBlockStatement)(node)) { + const body = gatherSequenceExpressions(node.body, scope, declars); + if (!body) return; + exprs.push(body); + } else if ((0, _generated.isEmptyStatement)(node)) { + ensureLastUndefined = true; + } else { + return; + } + } + + if (ensureLastUndefined) { + exprs.push(scope.buildUndefinedNode()); + } + + if (exprs.length === 1) { + return exprs[0]; + } else { + return (0, _generated2.sequenceExpression)(exprs); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js new file mode 100644 index 0000000000..b9d165b6fd --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBindingIdentifierName; + +var _toIdentifier = _interopRequireDefault(require("./toIdentifier")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toBindingIdentifierName(name) { + name = (0, _toIdentifier.default)(name); + if (name === "eval" || name === "arguments") name = "_" + name; + return name; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toBlock.js b/packages/common/node_modules/@babel/types/lib/converters/toBlock.js new file mode 100644 index 0000000000..19886833fa --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toBlock.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBlock; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +function toBlock(node, parent) { + if ((0, _generated.isBlockStatement)(node)) { + return node; + } + + let blockNodes = []; + + if ((0, _generated.isEmptyStatement)(node)) { + blockNodes = []; + } else { + if (!(0, _generated.isStatement)(node)) { + if ((0, _generated.isFunction)(parent)) { + node = (0, _generated2.returnStatement)(node); + } else { + node = (0, _generated2.expressionStatement)(node); + } + } + + blockNodes = [node]; + } + + return (0, _generated2.blockStatement)(blockNodes); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js b/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js new file mode 100644 index 0000000000..31e6770f6f --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toComputedKey; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +function toComputedKey(node, key = node.key || node.property) { + if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); + return key; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toExpression.js b/packages/common/node_modules/@babel/types/lib/converters/toExpression.js new file mode 100644 index 0000000000..6e58b0de4d --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toExpression.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toExpression; + +var _generated = require("../validators/generated"); + +function toExpression(node) { + if ((0, _generated.isExpressionStatement)(node)) { + node = node.expression; + } + + if ((0, _generated.isExpression)(node)) { + return node; + } + + if ((0, _generated.isClass)(node)) { + node.type = "ClassExpression"; + } else if ((0, _generated.isFunction)(node)) { + node.type = "FunctionExpression"; + } + + if (!(0, _generated.isExpression)(node)) { + throw new Error(`cannot turn ${node.type} to an expression`); + } + + return node; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js b/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js new file mode 100644 index 0000000000..e55db41fc4 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js @@ -0,0 +1,25 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toIdentifier; + +var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toIdentifier(name) { + name = name + ""; + name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); + name = name.replace(/^[-0-9]+/, ""); + name = name.replace(/[-\s]+(.)?/g, function (match, c) { + return c ? c.toUpperCase() : ""; + }); + + if (!(0, _isValidIdentifier.default)(name)) { + name = `_${name}`; + } + + return name || "_"; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js b/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js new file mode 100644 index 0000000000..c48fd0e7f3 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toKeyAlias; + +var _generated = require("../validators/generated"); + +var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); + +var _removePropertiesDeep = _interopRequireDefault(require("../modifications/removePropertiesDeep")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toKeyAlias(node, key = node.key) { + let alias; + + if (node.kind === "method") { + return toKeyAlias.increment() + ""; + } else if ((0, _generated.isIdentifier)(key)) { + alias = key.name; + } else if ((0, _generated.isStringLiteral)(key)) { + alias = JSON.stringify(key.value); + } else { + alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); + } + + if (node.computed) { + alias = `[${alias}]`; + } + + if (node.static) { + alias = `static:${alias}`; + } + + return alias; +} + +toKeyAlias.uid = 0; + +toKeyAlias.increment = function () { + if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { + return toKeyAlias.uid = 0; + } else { + return toKeyAlias.uid++; + } +}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js new file mode 100644 index 0000000000..2e221db4e0 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toSequenceExpression; + +var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toSequenceExpression(nodes, scope) { + if (!nodes || !nodes.length) return; + const declars = []; + const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); + if (!result) return; + + for (const declar of declars) { + scope.push(declar); + } + + return result; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toStatement.js b/packages/common/node_modules/@babel/types/lib/converters/toStatement.js new file mode 100644 index 0000000000..69b22ae09c --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/toStatement.js @@ -0,0 +1,44 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toStatement; + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +function toStatement(node, ignore) { + if ((0, _generated.isStatement)(node)) { + return node; + } + + let mustHaveId = false; + let newType; + + if ((0, _generated.isClass)(node)) { + mustHaveId = true; + newType = "ClassDeclaration"; + } else if ((0, _generated.isFunction)(node)) { + mustHaveId = true; + newType = "FunctionDeclaration"; + } else if ((0, _generated.isAssignmentExpression)(node)) { + return (0, _generated2.expressionStatement)(node); + } + + if (mustHaveId && !node.id) { + newType = false; + } + + if (!newType) { + if (ignore) { + return false; + } else { + throw new Error(`cannot turn ${node.type} to a statement`); + } + } + + node.type = newType; + return node; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js b/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js new file mode 100644 index 0000000000..d1118e164b --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js @@ -0,0 +1,88 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = valueToNode; + +var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); + +var _isRegExp = _interopRequireDefault(require("lodash/isRegExp")); + +var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); + +var _generated = require("../builders/generated"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function valueToNode(value) { + if (value === undefined) { + return (0, _generated.identifier)("undefined"); + } + + if (value === true || value === false) { + return (0, _generated.booleanLiteral)(value); + } + + if (value === null) { + return (0, _generated.nullLiteral)(); + } + + if (typeof value === "string") { + return (0, _generated.stringLiteral)(value); + } + + if (typeof value === "number") { + let result; + + if (Number.isFinite(value)) { + result = (0, _generated.numericLiteral)(Math.abs(value)); + } else { + let numerator; + + if (Number.isNaN(value)) { + numerator = (0, _generated.numericLiteral)(0); + } else { + numerator = (0, _generated.numericLiteral)(1); + } + + result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); + } + + if (value < 0 || Object.is(value, -0)) { + result = (0, _generated.unaryExpression)("-", result); + } + + return result; + } + + if ((0, _isRegExp.default)(value)) { + const pattern = value.source; + const flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return (0, _generated.regExpLiteral)(pattern, flags); + } + + if (Array.isArray(value)) { + return (0, _generated.arrayExpression)(value.map(valueToNode)); + } + + if ((0, _isPlainObject.default)(value)) { + const props = []; + + for (const key of Object.keys(value)) { + let nodeKey; + + if ((0, _isValidIdentifier.default)(key)) { + nodeKey = (0, _generated.identifier)(key); + } else { + nodeKey = (0, _generated.stringLiteral)(key); + } + + props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); + } + + return (0, _generated.objectExpression)(props); + } + + throw new Error("don't know how to turn this value into a node"); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/core.js b/packages/common/node_modules/@babel/types/lib/definitions/core.js new file mode 100644 index 0000000000..863536d130 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/core.js @@ -0,0 +1,858 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; + +var _is = _interopRequireDefault(require("../validators/is")); + +var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +var _constants = require("../constants"); + +var _utils = _interopRequireWildcard(require("./utils")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _utils.default)("ArrayExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); +(0, _utils.default)("AssignmentExpression", { + fields: { + operator: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertValueType)("string"); + } + + const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); + const pattern = (0, _utils.assertOneOf)("="); + return function (node, key, val) { + const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; + validator(node, key, val); + }; + }() + }, + left: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] +}); +(0, _utils.default)("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] +}); +(0, _utils.default)("InterpreterDirective", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _utils.assertNodeType)("DirectiveLiteral") + } + } +}); +(0, _utils.default)("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] +}); +(0, _utils.default)("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("CallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments"], + aliases: ["Expression"], + fields: Object.assign({ + callee: { + validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + } + }, !process.env.BABEL_TYPES_8_BREAKING ? { + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } : {}, { + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + }) +}); +(0, _utils.default)("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable", "BlockParent"] +}); +(0, _utils.default)("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] +}); +(0, _utils.default)("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("DebuggerStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] +}); +(0, _utils.default)("EmptyStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Statement", "ExpressionWrapper"] +}); +(0, _utils.default)("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _utils.assertNodeType)("Program") + } + } +}); +(0, _utils.default)("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +const functionCommon = { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) + }, + generator: { + default: false + }, + async: { + default: false + } +}; +exports.functionCommon = functionCommon; +const functionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; +const functionDeclarationCommon = Object.assign({}, functionCommon, { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } +}); +exports.functionDeclarationCommon = functionDeclarationCommon; +(0, _utils.default)("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: Object.assign({}, functionDeclarationCommon, {}, functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) return () => {}; + const identifier = (0, _utils.assertNodeType)("Identifier"); + return function (parent, key, node) { + if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { + identifier(node, "id", node.id); + } + }; + }() +}); +(0, _utils.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +const patternLikeCommon = { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } +}; +exports.patternLikeCommon = patternLikeCommon; +(0, _utils.default)("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation", "decorators"], + aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], + fields: Object.assign({}, patternLikeCommon, { + name: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!(0, _isValidIdentifier.default)(val, false)) { + throw new TypeError(`"${val}" is not a valid identifier name`); + } + }) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }), + + validate(parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const match = /\.(\w+)$/.exec(key); + if (!match) return; + const [, parentKey] = match; + const nonComp = { + computed: false + }; + + if (parentKey === "property") { + if ((0, _is.default)("MemberExpression", parent, nonComp)) return; + if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; + } else if (parentKey === "key") { + if ((0, _is.default)("Property", parent, nonComp)) return; + if ((0, _is.default)("Method", parent, nonComp)) return; + } else if (parentKey === "exported") { + if ((0, _is.default)("ExportSpecifier", parent)) return; + } else if (parentKey === "imported") { + if ((0, _is.default)("ImportSpecifier", parent, { + imported: node + })) return; + } else if (parentKey === "meta") { + if ((0, _is.default)("MetaProperty", parent, { + meta: node + })) return; + } + + if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name)) && node.name !== "this") { + throw new TypeError(`"${node.name}" is not a valid identifier`); + } + } + +}); +(0, _utils.default)("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _utils.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Pureish", "Literal"], + fields: { + pattern: { + validate: (0, _utils.assertValueType)("string") + }, + flags: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const invalid = /[^gimsuy]/.exec(val); + + if (invalid) { + throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); + } + }), + default: "" + } + } +}); +(0, _utils.default)("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("MemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: Object.assign({ + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + } + }, !process.env.BABEL_TYPES_8_BREAKING ? { + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } : {}) +}); +(0, _utils.default)("NewExpression", { + inherits: "CallExpression" +}); +(0, _utils.default)("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives", "sourceType", "interpreter"], + fields: { + sourceFile: { + validate: (0, _utils.assertValueType)("string") + }, + sourceType: { + validate: (0, _utils.assertOneOf)("script", "module"), + default: "script" + }, + interpreter: { + validate: (0, _utils.assertNodeType)("InterpreterDirective"), + default: null, + optional: true + }, + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block"] +}); +(0, _utils.default)("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) + } + } +}); +(0, _utils.default)("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed", "generator", "async"], + fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, { + kind: Object.assign({ + validate: (0, _utils.assertOneOf)("method", "get", "set") + }, !process.env.BABEL_TYPES_8_BREAKING ? { + default: "method" + } : {}), + computed: { + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] +}); +(0, _utils.default)("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])], + fields: { + computed: { + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + value: { + validate: (0, _utils.assertNodeType)("Expression", "PatternLike") + }, + shorthand: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.computed) { + throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); + } + }, function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && !(0, _is.default)("Identifier", node.key)) { + throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); + } + }), + default: false + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"], + validate: function () { + const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); + const expression = (0, _utils.assertNodeType)("Expression"); + return function (parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; + validator(node, "value", node.value); + }; + }() +}); +(0, _utils.default)("RestElement", { + visitor: ["argument", "typeAnnotation"], + builder: ["argument"], + aliases: ["LVal", "PatternLike"], + deprecatedAlias: "RestProperty", + fields: Object.assign({}, patternLikeCommon, { + argument: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression") + } + }), + + validate(parent, key) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + const match = /(\w+)\[(\d+)\]/.exec(key); + if (!match) throw new Error("Internal Babel error: malformed key."); + const [, listKey, index] = match; + + if (parent[listKey].length > index + 1) { + throw new TypeError(`RestElement must be last element of ${listKey}`); + } + } + +}); +(0, _utils.default)("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +(0, _utils.default)("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + } +}); +(0, _utils.default)("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _utils.assertNodeType)("Expression") + }, + cases: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) + } + } +}); +(0, _utils.default)("ThisExpression", { + aliases: ["Expression"] +}); +(0, _utils.default)("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + block: { + validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), function (node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!node.handler && !node.finalizer) { + throw new TypeError("TryStatement expects either a handler or finalizer, or both"); + } + }) + }, + handler: { + optional: true, + validate: (0, _utils.assertNodeType)("CatchClause") + }, + finalizer: { + optional: true, + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] +}); +(0, _utils.default)("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] +}); +(0, _utils.default)("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + kind: { + validate: (0, _utils.assertOneOf)("var", "let", "const") + }, + declarations: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) + } + }, + + validate(parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + if (!(0, _is.default)("ForXStatement", parent, { + left: node + })) return; + + if (node.declarations.length !== 1) { + throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); + } + } + +}); +(0, _utils.default)("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertNodeType)("LVal"); + } + + const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); + const without = (0, _utils.assertNodeType)("Identifier"); + return function (node, key, val) { + const validator = node.init ? normal : without; + validator(node, key, val); + }; + }() + }, + definite: { + optional: true, + validate: (0, _utils.assertValueType)("boolean") + }, + init: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/es2015.js b/packages/common/node_modules/@babel/types/lib/definitions/es2015.js new file mode 100644 index 0000000000..e80a804aa0 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/es2015.js @@ -0,0 +1,467 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _core = require("./core"); + +var _is = _interopRequireDefault(require("../validators/is")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +(0, _utils.default)("AssignmentPattern", { + visitor: ["left", "right", "decorators"], + builder: ["left", "right"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + left: { + validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }) +}); +(0, _utils.default)("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + builder: ["elements"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }) +}); +(0, _utils.default)("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType", "typeParameters"], + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, _core.functionCommon, {}, _core.functionTypeAnnotationCommon, { + expression: { + validate: (0, _utils.assertValueType)("boolean") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") + } + }) +}); +(0, _utils.default)("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) + } + } +}); +(0, _utils.default)("ClassExpression", { + builder: ["id", "superClass", "body", "decorators"], + visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], + aliases: ["Scopable", "Class", "Expression"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("ClassBody") + }, + superClass: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + }, + implements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + } +}); +(0, _utils.default)("ClassDeclaration", { + inherits: "ClassExpression", + aliases: ["Scopable", "Class", "Statement", "Declaration"], + fields: { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }, + validate: function () { + const identifier = (0, _utils.assertNodeType)("Identifier"); + return function (parent, key, node) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { + identifier(node, "id", node.id); + } + }; + }() +}); +(0, _utils.default)("ExportAllDeclaration", { + visitor: ["source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + } + } +}); +(0, _utils.default)("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") + } + } +}); +(0, _utils.default)("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], + fields: { + declaration: { + optional: true, + validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.specifiers.length) { + throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); + } + }, function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && node.source) { + throw new TypeError("Cannot export a declaration from a source"); + } + }) + }, + specifiers: { + default: [], + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () { + const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); + const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); + if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; + return function (node, key, val) { + const validator = node.source ? sourced : sourceless; + validator(node, key, val); + }; + }())) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral"), + optional: true + }, + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) + } +}); +(0, _utils.default)("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ForOfStatement", { + visitor: ["left", "right", "body"], + builder: ["left", "right", "body", "await"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: function () { + if (!process.env.BABEL_TYPES_8_BREAKING) { + return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); + } + + const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); + const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); + return function (node, key, val) { + if ((0, _is.default)("VariableDeclaration", val)) { + declaration(node, key, val); + } else { + lval(node, key, val); + } + }; + }() + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + }, + await: { + default: false + } + } +}); +(0, _utils.default)("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + specifiers: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, _utils.assertNodeType)("StringLiteral") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof", "value"), + optional: true + } + } +}); +(0, _utils.default)("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + imported: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof"), + optional: true + } + } +}); +(0, _utils.default)("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { + validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + let property; + + switch (val.name) { + case "function": + property = "sent"; + break; + + case "new": + property = "target"; + break; + + case "import": + property = "meta"; + break; + } + + if (!(0, _is.default)("Identifier", node.property, { + name: property + })) { + throw new TypeError("Unrecognised MetaProperty"); + } + }) + }, + property: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +const classMethodOrPropertyCommon = { + abstract: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + static: { + default: false + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + key: { + validate: (0, _utils.chain)(function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) + } +}; +exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; +const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, {}, classMethodOrPropertyCommon, { + kind: { + validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), + default: "method" + }, + access: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } +}); +exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; +(0, _utils.default)("ClassMethod", { + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], + builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + fields: Object.assign({}, classMethodOrDeclareMethodCommon, {}, _core.functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +(0, _utils.default)("ObjectPattern", { + visitor: ["properties", "typeAnnotation", "decorators"], + builder: ["properties"], + aliases: ["Pattern", "PatternLike", "LVal"], + fields: Object.assign({}, _core.patternLikeCommon, { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) + } + }) +}); +(0, _utils.default)("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + deprecatedAlias: "SpreadProperty", + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("Super", { + aliases: ["Expression"] +}); +(0, _utils.default)("TaggedTemplateExpression", { + visitor: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { + validate: (0, _utils.assertNodeType)("Expression") + }, + quasi: { + validate: (0, _utils.assertNodeType)("TemplateLiteral") + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: { + validate: (0, _utils.assertShape)({ + raw: { + validate: (0, _utils.assertValueType)("string") + }, + cooked: { + validate: (0, _utils.assertValueType)("string"), + optional: true + } + }) + }, + tail: { + default: false + } + } +}); +(0, _utils.default)("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")), function (node, key, val) { + if (node.quasis.length !== val.length + 1) { + throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`); + } + }) + } + } +}); +(0, _utils.default)("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) { + if (!process.env.BABEL_TYPES_8_BREAKING) return; + + if (val && !node.argument) { + throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); + } + }), + default: false + }, + argument: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/experimental.js b/packages/common/node_modules/@babel/types/lib/definitions/experimental.js new file mode 100644 index 0000000000..31734b5355 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/experimental.js @@ -0,0 +1,241 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _es = require("./es2015"); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +(0, _utils.default)("ArgumentPlaceholder", {}); +(0, _utils.default)("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: !process.env.BABEL_TYPES_8_BREAKING ? {} : { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], + aliases: ["Property"], + fields: Object.assign({}, _es.classMethodOrPropertyCommon, { + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +(0, _utils.default)("OptionalMemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + }, + optional: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) + } + } +}); +(0, _utils.default)("PipelineTopicExpression", { + builder: ["expression"], + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelineBareFunction", { + builder: ["callee"], + visitor: ["callee"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelinePrimaryTopicReference", { + aliases: ["Expression"] +}); +(0, _utils.default)("OptionalCallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments", "optional"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) + }, + optional: { + validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateProperty", { + visitor: ["key", "value", "decorators"], + builder: ["key", "value", "decorators"], + aliases: ["Property", "Private"], + fields: { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateMethod", { + builder: ["kind", "key", "params", "body", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +(0, _utils.default)("Import", { + aliases: ["Expression"] +}); +(0, _utils.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("PrivateName", { + visitor: ["id"], + aliases: ["Private"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("BigIntLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("RecordExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "ObjectMethod", "SpreadElement"))) + } + } +}); +(0, _utils.default)("TupleExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/flow.js b/packages/common/node_modules/@babel/types/lib/definitions/flow.js new file mode 100644 index 0000000000..a6d74d7aa4 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/flow.js @@ -0,0 +1,461 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { + (0, _utils.default)(name, { + builder: ["id", "typeParameters", "extends", "body"], + visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)(typeParameterType), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } + }); +}; + +(0, _utils.default)("AnyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow", "FlowType"], + fields: { + elementType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("BooleanLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("DeclareClass"); +(0, _utils.default)("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") + } +}); +defineInterfaceishType("DeclareInterface"); +(0, _utils.default)("DeclareModule", { + builder: ["id", "body", "kind"], + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)("BlockStatement"), + kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) + } +}); +(0, _utils.default)("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("DeclareOpaqueType", { + visitor: ["id", "typeParameters", "supertype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType") + } +}); +(0, _utils.default)("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("DeclareExportDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + declaration: (0, _utils.validateOptionalType)("Flow"), + specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), + source: (0, _utils.validateOptionalType)("StringLiteral"), + default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("DeclareExportAllDeclaration", { + visitor: ["source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + source: (0, _utils.validateType)("StringLiteral"), + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) + } +}); +(0, _utils.default)("DeclaredPredicate", { + visitor: ["value"], + aliases: ["Flow", "FlowPredicate"], + fields: { + value: (0, _utils.validateType)("Flow") + } +}); +(0, _utils.default)("ExistsTypeAnnotation", { + aliases: ["Flow", "FlowType"] +}); +(0, _utils.default)("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow", "FlowType"], + fields: { + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), + rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), + returnType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: { + name: (0, _utils.validateOptionalType)("Identifier"), + typeAnnotation: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow", "FlowType"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +(0, _utils.default)("InferredPredicate", { + aliases: ["Flow", "FlowPredicate"] +}); +(0, _utils.default)("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("InterfaceDeclaration"); +(0, _utils.default)("InterfaceTypeAnnotation", { + visitor: ["extends", "body"], + aliases: ["Flow", "FlowType"], + fields: { + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } +}); +(0, _utils.default)("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("MixedTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("EmptyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowType"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("NumberLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("number")) + } +}); +(0, _utils.default)("NumberTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties", "internalSlots"], + aliases: ["Flow", "FlowType"], + builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], + fields: { + properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), + indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), + callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), + internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), + exact: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeInternalSlot", { + visitor: ["id", "value", "optional", "static", "method"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateType)("Identifier"), + value: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeIndexer", { + visitor: ["id", "key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateOptionalType)("Identifier"), + key: (0, _utils.validateType)("FlowType"), + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeProperty", { + visitor: ["key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + value: (0, _utils.validateType)("FlowType"), + kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeSpreadProperty", { + visitor: ["argument"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("OpaqueType", { + visitor: ["id", "typeParameters", "supertype", "impltype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType"), + impltype: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) + } +}); +(0, _utils.default)("StringLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("string")) + } +}); +(0, _utils.default)("StringTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("SymbolTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ThisTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow", "FlowType"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAnnotation", { + aliases: ["Flow"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("TypeParameter", { + aliases: ["Flow"], + visitor: ["bound", "default", "variance"], + fields: { + name: (0, _utils.validate)((0, _utils.assertValueType)("string")), + bound: (0, _utils.validateOptionalType)("TypeAnnotation"), + default: (0, _utils.validateOptionalType)("FlowType"), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("TypeParameterDeclaration", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) + } +}); +(0, _utils.default)("TypeParameterInstantiation", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("Variance", { + aliases: ["Flow"], + builder: ["kind"], + fields: { + kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) + } +}); +(0, _utils.default)("VoidTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("EnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + id: (0, _utils.validateType)("Identifier"), + body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) + } +}); +(0, _utils.default)("EnumBooleanBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)("EnumBooleanMember") + } +}); +(0, _utils.default)("EnumNumberBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)("EnumNumberMember") + } +}); +(0, _utils.default)("EnumStringBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]) + } +}); +(0, _utils.default)("EnumSymbolBody", { + aliases: ["EnumBody"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("EnumDefaultedMember") + } +}); +(0, _utils.default)("EnumBooleanMember", { + aliases: ["EnumMember"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("BooleanLiteral") + } +}); +(0, _utils.default)("EnumNumberMember", { + aliases: ["EnumMember"], + visitor: ["id", "init"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("NumericLiteral") + } +}); +(0, _utils.default)("EnumStringMember", { + aliases: ["EnumMember"], + visitor: ["id", "init"], + fields: { + id: (0, _utils.validateType)("Identifier"), + init: (0, _utils.validateType)("StringLiteral") + } +}); +(0, _utils.default)("EnumDefaultedMember", { + aliases: ["EnumMember"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/index.js b/packages/common/node_modules/@babel/types/lib/definitions/index.js new file mode 100644 index 0000000000..84ca38761e --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/index.js @@ -0,0 +1,99 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "VISITOR_KEYS", { + enumerable: true, + get: function () { + return _utils.VISITOR_KEYS; + } +}); +Object.defineProperty(exports, "ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.FLIPPED_ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "NODE_FIELDS", { + enumerable: true, + get: function () { + return _utils.NODE_FIELDS; + } +}); +Object.defineProperty(exports, "BUILDER_KEYS", { + enumerable: true, + get: function () { + return _utils.BUILDER_KEYS; + } +}); +Object.defineProperty(exports, "DEPRECATED_KEYS", { + enumerable: true, + get: function () { + return _utils.DEPRECATED_KEYS; + } +}); +Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", { + enumerable: true, + get: function () { + return _utils.NODE_PARENT_VALIDATIONS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_ALIAS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; + } +}); +exports.TYPES = void 0; + +var _toFastProperties = _interopRequireDefault(require("to-fast-properties")); + +require("./core"); + +require("./es2015"); + +require("./flow"); + +require("./jsx"); + +require("./misc"); + +require("./experimental"); + +require("./typescript"); + +var _utils = require("./utils"); + +var _placeholders = require("./placeholders"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _toFastProperties.default)(_utils.VISITOR_KEYS); +(0, _toFastProperties.default)(_utils.ALIAS_KEYS); +(0, _toFastProperties.default)(_utils.FLIPPED_ALIAS_KEYS); +(0, _toFastProperties.default)(_utils.NODE_FIELDS); +(0, _toFastProperties.default)(_utils.BUILDER_KEYS); +(0, _toFastProperties.default)(_utils.DEPRECATED_KEYS); +(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_ALIAS); +(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); +const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); +exports.TYPES = TYPES; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/jsx.js b/packages/common/node_modules/@babel/types/lib/definitions/jsx.js new file mode 100644 index 0000000000..c7009414d8 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/jsx.js @@ -0,0 +1,161 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +(0, _utils.default)("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") + } + } +}); +(0, _utils.default)("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + } + } +}); +(0, _utils.default)("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _utils.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXEmptyExpression", { + aliases: ["JSX"] +}); +(0, _utils.default)("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") + } + } +}); +(0, _utils.default)("JSXSpreadChild", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + }, + selfClosing: { + default: false + }, + attributes: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXText", { + aliases: ["JSX", "Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXFragment", { + builder: ["openingFragment", "closingFragment", "children"], + visitor: ["openingFragment", "children", "closingFragment"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingFragment: { + validate: (0, _utils.assertNodeType)("JSXOpeningFragment") + }, + closingFragment: { + validate: (0, _utils.assertNodeType)("JSXClosingFragment") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXOpeningFragment", { + aliases: ["JSX", "Immutable"] +}); +(0, _utils.default)("JSXClosingFragment", { + aliases: ["JSX", "Immutable"] +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/misc.js b/packages/common/node_modules/@babel/types/lib/definitions/misc.js new file mode 100644 index 0000000000..f72c651151 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/misc.js @@ -0,0 +1,33 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _placeholders = require("./placeholders"); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +(0, _utils.default)("Noop", { + visitor: [] +}); +(0, _utils.default)("Placeholder", { + visitor: [], + builder: ["expectedNode", "name"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + expectedNode: { + validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) + } + } +}); +(0, _utils.default)("V8IntrinsicIdentifier", { + builder: ["name"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js b/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js new file mode 100644 index 0000000000..0edf7b2e80 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; + +var _utils = require("./utils"); + +const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; +exports.PLACEHOLDERS = PLACEHOLDERS; +const PLACEHOLDERS_ALIAS = { + Declaration: ["Statement"], + Pattern: ["PatternLike", "LVal"] +}; +exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; + +for (const type of PLACEHOLDERS) { + const alias = _utils.ALIAS_KEYS[type]; + if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias; +} + +const PLACEHOLDERS_FLIPPED_ALIAS = {}; +exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; +Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { + PLACEHOLDERS_ALIAS[type].forEach(alias => { + if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { + PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; + } + + PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); + }); +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/typescript.js b/packages/common/node_modules/@babel/types/lib/definitions/typescript.js new file mode 100644 index 0000000000..531338f1fa --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/typescript.js @@ -0,0 +1,417 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _core = require("./core"); + +var _es = require("./es2015"); + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +const bool = (0, _utils.assertValueType)("boolean"); +const tSFunctionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +(0, _utils.default)("TSParameterProperty", { + aliases: ["LVal"], + visitor: ["parameter"], + fields: { + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + parameter: { + validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") + } + } +}); +(0, _utils.default)("TSDeclareFunction", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _core.functionDeclarationCommon, {}, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSDeclareMethod", { + visitor: ["decorators", "key", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, {}, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSQualifiedName", { + aliases: ["TSEntityName"], + visitor: ["left", "right"], + fields: { + left: (0, _utils.validateType)("TSEntityName"), + right: (0, _utils.validateType)("Identifier") + } +}); +const signatureDeclarationCommon = { + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") +}; +const callConstructSignatureDeclaration = { + aliases: ["TSTypeElement"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); +(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); +const namedTypeElementCommon = { + key: (0, _utils.validateType)("Expression"), + computed: (0, _utils.validate)(bool), + optional: (0, _utils.validateOptional)(bool) +}; +(0, _utils.default)("TSPropertySignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeAnnotation", "initializer"], + fields: Object.assign({}, namedTypeElementCommon, { + readonly: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + initializer: (0, _utils.validateOptionalType)("Expression") + }) +}); +(0, _utils.default)("TSMethodSignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], + fields: Object.assign({}, signatureDeclarationCommon, {}, namedTypeElementCommon) +}); +(0, _utils.default)("TSIndexSignature", { + aliases: ["TSTypeElement"], + visitor: ["parameters", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + parameters: (0, _utils.validateArrayOfType)("Identifier"), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") + } +}); +const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; + +for (const type of tsKeywordTypes) { + (0, _utils.default)(type, { + aliases: ["TSType"], + visitor: [], + fields: {} + }); +} + +(0, _utils.default)("TSThisType", { + aliases: ["TSType"], + visitor: [], + fields: {} +}); +const fnOrCtr = { + aliases: ["TSType"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSFunctionType", fnOrCtr); +(0, _utils.default)("TSConstructorType", fnOrCtr); +(0, _utils.default)("TSTypeReference", { + aliases: ["TSType"], + visitor: ["typeName", "typeParameters"], + fields: { + typeName: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSTypePredicate", { + aliases: ["TSType"], + visitor: ["parameterName", "typeAnnotation"], + builder: ["parameterName", "typeAnnotation", "asserts"], + fields: { + parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + asserts: (0, _utils.validateOptional)(bool) + } +}); +(0, _utils.default)("TSTypeQuery", { + aliases: ["TSType"], + visitor: ["exprName"], + fields: { + exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) + } +}); +(0, _utils.default)("TSTypeLiteral", { + aliases: ["TSType"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSArrayType", { + aliases: ["TSType"], + visitor: ["elementType"], + fields: { + elementType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTupleType", { + aliases: ["TSType"], + visitor: ["elementTypes"], + fields: { + elementTypes: (0, _utils.validateArrayOfType)("TSType") + } +}); +(0, _utils.default)("TSOptionalType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSRestType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +const unionOrIntersection = { + aliases: ["TSType"], + visitor: ["types"], + fields: { + types: (0, _utils.validateArrayOfType)("TSType") + } +}; +(0, _utils.default)("TSUnionType", unionOrIntersection); +(0, _utils.default)("TSIntersectionType", unionOrIntersection); +(0, _utils.default)("TSConditionalType", { + aliases: ["TSType"], + visitor: ["checkType", "extendsType", "trueType", "falseType"], + fields: { + checkType: (0, _utils.validateType)("TSType"), + extendsType: (0, _utils.validateType)("TSType"), + trueType: (0, _utils.validateType)("TSType"), + falseType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSInferType", { + aliases: ["TSType"], + visitor: ["typeParameter"], + fields: { + typeParameter: (0, _utils.validateType)("TSTypeParameter") + } +}); +(0, _utils.default)("TSParenthesizedType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeOperator", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSIndexedAccessType", { + aliases: ["TSType"], + visitor: ["objectType", "indexType"], + fields: { + objectType: (0, _utils.validateType)("TSType"), + indexType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSMappedType", { + aliases: ["TSType"], + visitor: ["typeParameter", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + typeParameter: (0, _utils.validateType)("TSTypeParameter"), + optional: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSType") + } +}); +(0, _utils.default)("TSLiteralType", { + aliases: ["TSType"], + visitor: ["literal"], + fields: { + literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) + } +}); +(0, _utils.default)("TSExpressionWithTypeArguments", { + aliases: ["TSType"], + visitor: ["expression", "typeParameters"], + fields: { + expression: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSInterfaceDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "extends", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), + body: (0, _utils.validateType)("TSInterfaceBody") + } +}); +(0, _utils.default)("TSInterfaceBody", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSTypeAliasDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "typeAnnotation"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSAsExpression", { + aliases: ["Expression"], + visitor: ["expression", "typeAnnotation"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeAssertion", { + aliases: ["Expression"], + visitor: ["typeAnnotation", "expression"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType"), + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSEnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "members"], + fields: { + declare: (0, _utils.validateOptional)(bool), + const: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + members: (0, _utils.validateArrayOfType)("TSEnumMember"), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSEnumMember", { + visitor: ["id", "initializer"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSModuleDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + global: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) + } +}); +(0, _utils.default)("TSModuleBlock", { + aliases: ["Scopable", "Block", "BlockParent"], + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("Statement") + } +}); +(0, _utils.default)("TSImportType", { + aliases: ["TSType"], + visitor: ["argument", "qualifier", "typeParameters"], + fields: { + argument: (0, _utils.validateType)("StringLiteral"), + qualifier: (0, _utils.validateOptionalType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSImportEqualsDeclaration", { + aliases: ["Statement"], + visitor: ["id", "moduleReference"], + fields: { + isExport: (0, _utils.validate)(bool), + id: (0, _utils.validateType)("Identifier"), + moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) + } +}); +(0, _utils.default)("TSExternalModuleReference", { + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("StringLiteral") + } +}); +(0, _utils.default)("TSNonNullExpression", { + aliases: ["Expression"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSExportAssignment", { + aliases: ["Statement"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSNamespaceExportDeclaration", { + aliases: ["Statement"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("TSTypeAnnotation", { + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TSType") + } + } +}); +(0, _utils.default)("TSTypeParameterInstantiation", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) + } + } +}); +(0, _utils.default)("TSTypeParameterDeclaration", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) + } + } +}); +(0, _utils.default)("TSTypeParameter", { + builder: ["constraint", "default", "name"], + visitor: ["constraint", "default"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + }, + constraint: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + }, + default: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + } + } +}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/utils.js b/packages/common/node_modules/@babel/types/lib/definitions/utils.js new file mode 100644 index 0000000000..ab1285fa6d --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/definitions/utils.js @@ -0,0 +1,315 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.validate = validate; +exports.typeIs = typeIs; +exports.validateType = validateType; +exports.validateOptional = validateOptional; +exports.validateOptionalType = validateOptionalType; +exports.arrayOf = arrayOf; +exports.arrayOfType = arrayOfType; +exports.validateArrayOfType = validateArrayOfType; +exports.assertEach = assertEach; +exports.assertOneOf = assertOneOf; +exports.assertNodeType = assertNodeType; +exports.assertNodeOrValueType = assertNodeOrValueType; +exports.assertValueType = assertValueType; +exports.assertShape = assertShape; +exports.assertOptionalChainStart = assertOptionalChainStart; +exports.chain = chain; +exports.default = defineType; +exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; + +var _is = _interopRequireDefault(require("../validators/is")); + +var _validate = require("../validators/validate"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const VISITOR_KEYS = {}; +exports.VISITOR_KEYS = VISITOR_KEYS; +const ALIAS_KEYS = {}; +exports.ALIAS_KEYS = ALIAS_KEYS; +const FLIPPED_ALIAS_KEYS = {}; +exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; +const NODE_FIELDS = {}; +exports.NODE_FIELDS = NODE_FIELDS; +const BUILDER_KEYS = {}; +exports.BUILDER_KEYS = BUILDER_KEYS; +const DEPRECATED_KEYS = {}; +exports.DEPRECATED_KEYS = DEPRECATED_KEYS; +const NODE_PARENT_VALIDATIONS = {}; +exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; + +function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else { + return typeof val; + } +} + +function validate(validate) { + return { + validate + }; +} + +function typeIs(typeName) { + return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); +} + +function validateType(typeName) { + return validate(typeIs(typeName)); +} + +function validateOptional(validate) { + return { + validate, + optional: true + }; +} + +function validateOptionalType(typeName) { + return { + validate: typeIs(typeName), + optional: true + }; +} + +function arrayOf(elementType) { + return chain(assertValueType("array"), assertEach(elementType)); +} + +function arrayOfType(typeName) { + return arrayOf(typeIs(typeName)); +} + +function validateArrayOfType(typeName) { + return validate(arrayOfType(typeName)); +} + +function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; + + for (let i = 0; i < val.length; i++) { + const subkey = `${key}[${i}]`; + const v = val[i]; + callback(node, subkey, v); + if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); + } + } + + validator.each = callback; + return validator; +} + +function assertOneOf(...values) { + function validate(node, key, val) { + if (values.indexOf(val) < 0) { + throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); + } + } + + validate.oneOf = values; + return validate; +} + +function assertNodeType(...types) { + function validate(node, key, val) { + for (const type of types) { + if ((0, _is.default)(type, val)) { + (0, _validate.validateChild)(node, key, val); + return; + } + } + + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`); + } + + validate.oneOfNodeTypes = types; + return validate; +} + +function assertNodeOrValueType(...types) { + function validate(node, key, val) { + for (const type of types) { + if (getType(val) === type || (0, _is.default)(type, val)) { + (0, _validate.validateChild)(node, key, val); + return; + } + } + + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`); + } + + validate.oneOfNodeOrValueTypes = types; + return validate; +} + +function assertValueType(type) { + function validate(node, key, val) { + const valid = getType(val) === type; + + if (!valid) { + throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); + } + } + + validate.type = type; + return validate; +} + +function assertShape(shape) { + function validate(node, key, val) { + const errors = []; + + for (const property of Object.keys(shape)) { + try { + (0, _validate.validateField)(node, property, val[property], shape[property]); + } catch (error) { + if (error instanceof TypeError) { + errors.push(error.message); + continue; + } + + throw error; + } + } + + if (errors.length) { + throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`); + } + } + + validate.shapeOf = shape; + return validate; +} + +function assertOptionalChainStart() { + function validate(node) { + var _current; + + let current = node; + + while (node) { + const { + type + } = current; + + if (type === "OptionalCallExpression") { + if (current.optional) return; + current = current.callee; + continue; + } + + if (type === "OptionalMemberExpression") { + if (current.optional) return; + current = current.object; + continue; + } + + break; + } + + throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); + } + + return validate; +} + +function chain(...fns) { + function validate(...args) { + for (const fn of fns) { + fn(...args); + } + } + + validate.chainOf = fns; + return validate; +} + +const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; +const validFieldKeys = ["default", "optional", "validate"]; + +function defineType(type, opts = {}) { + const inherits = opts.inherits && store[opts.inherits] || {}; + let fields = opts.fields; + + if (!fields) { + fields = {}; + + if (inherits.fields) { + const keys = Object.getOwnPropertyNames(inherits.fields); + + for (const key of keys) { + const field = inherits.fields[key]; + fields[key] = { + default: field.default, + optional: field.optional, + validate: field.validate + }; + } + } + } + + const visitor = opts.visitor || inherits.visitor || []; + const aliases = opts.aliases || inherits.aliases || []; + const builder = opts.builder || inherits.builder || opts.visitor || []; + + for (const k of Object.keys(opts)) { + if (validTypeOpts.indexOf(k) === -1) { + throw new Error(`Unknown type option "${k}" on ${type}`); + } + } + + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } + + for (const key of visitor.concat(builder)) { + fields[key] = fields[key] || {}; + } + + for (const key of Object.keys(fields)) { + const field = fields[key]; + + if (field.default !== undefined && builder.indexOf(key) === -1) { + field.optional = true; + } + + if (field.default === undefined) { + field.default = null; + } else if (!field.validate && field.default != null) { + field.validate = assertValueType(getType(field.default)); + } + + for (const k of Object.keys(field)) { + if (validFieldKeys.indexOf(k) === -1) { + throw new Error(`Unknown field key "${k}" on ${type}.${key}`); + } + } + } + + VISITOR_KEYS[type] = opts.visitor = visitor; + BUILDER_KEYS[type] = opts.builder = builder; + NODE_FIELDS[type] = opts.fields = fields; + ALIAS_KEYS[type] = opts.aliases = aliases; + aliases.forEach(alias => { + FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; + FLIPPED_ALIAS_KEYS[alias].push(type); + }); + + if (opts.validate) { + NODE_PARENT_VALIDATIONS[type] = opts.validate; + } + + store[type] = opts; +} + +const store = {}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/index.d.ts b/packages/common/node_modules/@babel/types/lib/index.d.ts new file mode 100644 index 0000000000..6e6a2b572d --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/index.d.ts @@ -0,0 +1,2555 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray | null; + innerComments: ReadonlyArray | null; + trailingComments: ReadonlyArray | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; +} + +export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; + +export interface ArrayExpression extends BaseNode { + type: "ArrayExpression"; + elements: Array; +} + +export interface AssignmentExpression extends BaseNode { + type: "AssignmentExpression"; + operator: string; + left: LVal; + right: Expression; +} + +export interface BinaryExpression extends BaseNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: Expression; + right: Expression; +} + +export interface InterpreterDirective extends BaseNode { + type: "InterpreterDirective"; + value: string; +} + +export interface Directive extends BaseNode { + type: "Directive"; + value: DirectiveLiteral; +} + +export interface DirectiveLiteral extends BaseNode { + type: "DirectiveLiteral"; + value: string; +} + +export interface BlockStatement extends BaseNode { + type: "BlockStatement"; + body: Array; + directives: Array; +} + +export interface BreakStatement extends BaseNode { + type: "BreakStatement"; + label: Identifier | null; +} + +export interface CallExpression extends BaseNode { + type: "CallExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Identifier | ArrayPattern | ObjectPattern | null; + body: BlockStatement; +} + +export interface ConditionalExpression extends BaseNode { + type: "ConditionalExpression"; + test: Expression; + consequent: Expression; + alternate: Expression; +} + +export interface ContinueStatement extends BaseNode { + type: "ContinueStatement"; + label: Identifier | null; +} + +export interface DebuggerStatement extends BaseNode { + type: "DebuggerStatement"; +} + +export interface DoWhileStatement extends BaseNode { + type: "DoWhileStatement"; + test: Expression; + body: Statement; +} + +export interface EmptyStatement extends BaseNode { + type: "EmptyStatement"; +} + +export interface ExpressionStatement extends BaseNode { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface File extends BaseNode { + type: "File"; + program: Program; + comments: any; + tokens: any; +} + +export interface ForInStatement extends BaseNode { + type: "ForInStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; +} + +export interface ForStatement extends BaseNode { + type: "ForStatement"; + init: VariableDeclaration | Expression | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} + +export interface FunctionDeclaration extends BaseNode { + type: "FunctionDeclaration"; + id: Identifier | null; + params: Array; + body: BlockStatement; + generator: boolean; + async: boolean; + declare: boolean | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface FunctionExpression extends BaseNode { + type: "FunctionExpression"; + id: Identifier | null; + params: Array; + body: BlockStatement; + generator: boolean; + async: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface Identifier extends BaseNode { + type: "Identifier"; + name: any; + decorators: Array | null; + optional: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface IfStatement extends BaseNode { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} + +export interface LabeledStatement extends BaseNode { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface StringLiteral extends BaseNode { + type: "StringLiteral"; + value: string; +} + +export interface NumericLiteral extends BaseNode { + type: "NumericLiteral"; + value: number; +} + +export interface NullLiteral extends BaseNode { + type: "NullLiteral"; +} + +export interface BooleanLiteral extends BaseNode { + type: "BooleanLiteral"; + value: boolean; +} + +export interface RegExpLiteral extends BaseNode { + type: "RegExpLiteral"; + pattern: string; + flags: any; +} + +export interface LogicalExpression extends BaseNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: Expression; + right: Expression; +} + +export interface MemberExpression extends BaseNode { + type: "MemberExpression"; + object: Expression; + property: any; + computed: boolean; + optional: true | false | null; +} + +export interface NewExpression extends BaseNode { + type: "NewExpression"; + callee: Expression | V8IntrinsicIdentifier; + arguments: Array; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface Program extends BaseNode { + type: "Program"; + body: Array; + directives: Array; + sourceType: "script" | "module"; + interpreter: InterpreterDirective | null; + sourceFile: string; +} + +export interface ObjectExpression extends BaseNode { + type: "ObjectExpression"; + properties: Array; +} + +export interface ObjectMethod extends BaseNode { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: any; + params: Array; + body: BlockStatement; + computed: boolean; + generator: boolean; + async: boolean; + decorators: Array | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectProperty extends BaseNode { + type: "ObjectProperty"; + key: any; + value: Expression | PatternLike; + computed: boolean; + shorthand: any; + decorators: Array | null; +} + +export interface RestElement extends BaseNode { + type: "RestElement"; + argument: LVal; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ReturnStatement extends BaseNode { + type: "ReturnStatement"; + argument: Expression | null; +} + +export interface SequenceExpression extends BaseNode { + type: "SequenceExpression"; + expressions: Array; +} + +export interface ParenthesizedExpression extends BaseNode { + type: "ParenthesizedExpression"; + expression: Expression; +} + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test: Expression | null; + consequent: Array; +} + +export interface SwitchStatement extends BaseNode { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array; +} + +export interface ThisExpression extends BaseNode { + type: "ThisExpression"; +} + +export interface ThrowStatement extends BaseNode { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseNode { + type: "TryStatement"; + block: any; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} + +export interface UnaryExpression extends BaseNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: Expression; + prefix: boolean; +} + +export interface UpdateExpression extends BaseNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: Expression; + prefix: boolean; +} + +export interface VariableDeclaration extends BaseNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array; + declare: boolean | null; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: LVal; + init: Expression | null; + definite: boolean | null; +} + +export interface WhileStatement extends BaseNode { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface WithStatement extends BaseNode { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface AssignmentPattern extends BaseNode { + type: "AssignmentPattern"; + left: Identifier | ObjectPattern | ArrayPattern | MemberExpression; + right: Expression; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrayPattern extends BaseNode { + type: "ArrayPattern"; + elements: Array; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrowFunctionExpression extends BaseNode { + type: "ArrowFunctionExpression"; + params: Array; + body: BlockStatement | Expression; + async: boolean; + expression: boolean; + generator: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface ClassExpression extends BaseNode { + type: "ClassExpression"; + id: Identifier | null; + superClass: Expression | null; + body: ClassBody; + decorators: Array | null; + implements: Array | null; + mixins: any; + superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassDeclaration extends BaseNode { + type: "ClassDeclaration"; + id: any; + superClass: any; + body: any; + decorators: any; + abstract: boolean | null; + declare: boolean | null; + implements: any; + mixins: any; + superTypeParameters: any; + typeParameters: any; +} + +export interface ExportAllDeclaration extends BaseNode { + type: "ExportAllDeclaration"; + source: StringLiteral; +} + +export interface ExportDefaultDeclaration extends BaseNode { + type: "ExportDefaultDeclaration"; + declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; +} + +export interface ExportNamedDeclaration extends BaseNode { + type: "ExportNamedDeclaration"; + declaration: any | null; + specifiers: Array; + source: StringLiteral | null; + exportKind: "type" | "value" | null; +} + +export interface ExportSpecifier extends BaseNode { + type: "ExportSpecifier"; + local: Identifier; + exported: Identifier; +} + +export interface ForOfStatement extends BaseNode { + type: "ForOfStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; + await: boolean; +} + +export interface ImportDeclaration extends BaseNode { + type: "ImportDeclaration"; + specifiers: Array; + source: StringLiteral; + importKind: "type" | "typeof" | "value" | null; +} + +export interface ImportDefaultSpecifier extends BaseNode { + type: "ImportDefaultSpecifier"; + local: Identifier; +} + +export interface ImportNamespaceSpecifier extends BaseNode { + type: "ImportNamespaceSpecifier"; + local: Identifier; +} + +export interface ImportSpecifier extends BaseNode { + type: "ImportSpecifier"; + local: Identifier; + imported: Identifier; + importKind: "type" | "typeof" | null; +} + +export interface MetaProperty extends BaseNode { + type: "MetaProperty"; + meta: any; + property: Identifier; +} + +export interface ClassMethod extends BaseNode { + type: "ClassMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + params: Array; + body: BlockStatement; + computed: boolean; + static: boolean; + generator: boolean; + async: boolean; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + decorators: Array | null; + optional: boolean | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectPattern extends BaseNode { + type: "ObjectPattern"; + properties: Array; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface TaggedTemplateExpression extends BaseNode { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + value: { raw: string, cooked?: string }; + tail: boolean; +} + +export interface TemplateLiteral extends BaseNode { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +export interface YieldExpression extends BaseNode { + type: "YieldExpression"; + argument: Expression | null; + delegate: any; +} + +export interface AnyTypeAnnotation extends BaseNode { + type: "AnyTypeAnnotation"; +} + +export interface ArrayTypeAnnotation extends BaseNode { + type: "ArrayTypeAnnotation"; + elementType: FlowType; +} + +export interface BooleanTypeAnnotation extends BaseNode { + type: "BooleanTypeAnnotation"; +} + +export interface BooleanLiteralTypeAnnotation extends BaseNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +export interface NullLiteralTypeAnnotation extends BaseNode { + type: "NullLiteralTypeAnnotation"; +} + +export interface ClassImplements extends BaseNode { + type: "ClassImplements"; + id: Identifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface DeclareClass extends BaseNode { + type: "DeclareClass"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface DeclareFunction extends BaseNode { + type: "DeclareFunction"; + id: Identifier; + predicate: DeclaredPredicate | null; +} + +export interface DeclareInterface extends BaseNode { + type: "DeclareInterface"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface DeclareModule extends BaseNode { + type: "DeclareModule"; + id: Identifier | StringLiteral; + body: BlockStatement; + kind: "CommonJS" | "ES" | null; +} + +export interface DeclareModuleExports extends BaseNode { + type: "DeclareModuleExports"; + typeAnnotation: TypeAnnotation; +} + +export interface DeclareTypeAlias extends BaseNode { + type: "DeclareTypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface DeclareOpaqueType extends BaseNode { + type: "DeclareOpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; +} + +export interface DeclareVariable extends BaseNode { + type: "DeclareVariable"; + id: Identifier; +} + +export interface DeclareExportDeclaration extends BaseNode { + type: "DeclareExportDeclaration"; + declaration: Flow | null; + specifiers: Array | null; + source: StringLiteral | null; + default: boolean | null; +} + +export interface DeclareExportAllDeclaration extends BaseNode { + type: "DeclareExportAllDeclaration"; + source: StringLiteral; + exportKind: "type" | "value" | null; +} + +export interface DeclaredPredicate extends BaseNode { + type: "DeclaredPredicate"; + value: Flow; +} + +export interface ExistsTypeAnnotation extends BaseNode { + type: "ExistsTypeAnnotation"; +} + +export interface FunctionTypeAnnotation extends BaseNode { + type: "FunctionTypeAnnotation"; + typeParameters: TypeParameterDeclaration | null; + params: Array; + rest: FunctionTypeParam | null; + returnType: FlowType; +} + +export interface FunctionTypeParam extends BaseNode { + type: "FunctionTypeParam"; + name: Identifier | null; + typeAnnotation: FlowType; + optional: boolean | null; +} + +export interface GenericTypeAnnotation extends BaseNode { + type: "GenericTypeAnnotation"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InferredPredicate extends BaseNode { + type: "InferredPredicate"; +} + +export interface InterfaceExtends extends BaseNode { + type: "InterfaceExtends"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InterfaceDeclaration extends BaseNode { + type: "InterfaceDeclaration"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface InterfaceTypeAnnotation extends BaseNode { + type: "InterfaceTypeAnnotation"; + extends: Array | null; + body: ObjectTypeAnnotation; +} + +export interface IntersectionTypeAnnotation extends BaseNode { + type: "IntersectionTypeAnnotation"; + types: Array; +} + +export interface MixedTypeAnnotation extends BaseNode { + type: "MixedTypeAnnotation"; +} + +export interface EmptyTypeAnnotation extends BaseNode { + type: "EmptyTypeAnnotation"; +} + +export interface NullableTypeAnnotation extends BaseNode { + type: "NullableTypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface NumberLiteralTypeAnnotation extends BaseNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +export interface NumberTypeAnnotation extends BaseNode { + type: "NumberTypeAnnotation"; +} + +export interface ObjectTypeAnnotation extends BaseNode { + type: "ObjectTypeAnnotation"; + properties: Array; + indexers: Array | null; + callProperties: Array | null; + internalSlots: Array | null; + exact: boolean; + inexact: boolean | null; +} + +export interface ObjectTypeInternalSlot extends BaseNode { + type: "ObjectTypeInternalSlot"; + id: Identifier; + value: FlowType; + optional: boolean; + static: boolean; + method: boolean; +} + +export interface ObjectTypeCallProperty extends BaseNode { + type: "ObjectTypeCallProperty"; + value: FlowType; + static: boolean; +} + +export interface ObjectTypeIndexer extends BaseNode { + type: "ObjectTypeIndexer"; + id: Identifier | null; + key: FlowType; + value: FlowType; + variance: Variance | null; + static: boolean; +} + +export interface ObjectTypeProperty extends BaseNode { + type: "ObjectTypeProperty"; + key: Identifier | StringLiteral; + value: FlowType; + variance: Variance | null; + kind: "init" | "get" | "set"; + optional: boolean; + proto: boolean; + static: boolean; +} + +export interface ObjectTypeSpreadProperty extends BaseNode { + type: "ObjectTypeSpreadProperty"; + argument: FlowType; +} + +export interface OpaqueType extends BaseNode { + type: "OpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; + impltype: FlowType; +} + +export interface QualifiedTypeIdentifier extends BaseNode { + type: "QualifiedTypeIdentifier"; + id: Identifier; + qualification: Identifier | QualifiedTypeIdentifier; +} + +export interface StringLiteralTypeAnnotation extends BaseNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +export interface StringTypeAnnotation extends BaseNode { + type: "StringTypeAnnotation"; +} + +export interface SymbolTypeAnnotation extends BaseNode { + type: "SymbolTypeAnnotation"; +} + +export interface ThisTypeAnnotation extends BaseNode { + type: "ThisTypeAnnotation"; +} + +export interface TupleTypeAnnotation extends BaseNode { + type: "TupleTypeAnnotation"; + types: Array; +} + +export interface TypeofTypeAnnotation extends BaseNode { + type: "TypeofTypeAnnotation"; + argument: FlowType; +} + +export interface TypeAlias extends BaseNode { + type: "TypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface TypeAnnotation extends BaseNode { + type: "TypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface TypeCastExpression extends BaseNode { + type: "TypeCastExpression"; + expression: Expression; + typeAnnotation: TypeAnnotation; +} + +export interface TypeParameter extends BaseNode { + type: "TypeParameter"; + bound: TypeAnnotation | null; + default: FlowType | null; + variance: Variance | null; + name: string; +} + +export interface TypeParameterDeclaration extends BaseNode { + type: "TypeParameterDeclaration"; + params: Array; +} + +export interface TypeParameterInstantiation extends BaseNode { + type: "TypeParameterInstantiation"; + params: Array; +} + +export interface UnionTypeAnnotation extends BaseNode { + type: "UnionTypeAnnotation"; + types: Array; +} + +export interface Variance extends BaseNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +export interface VoidTypeAnnotation extends BaseNode { + type: "VoidTypeAnnotation"; +} + +export interface EnumDeclaration extends BaseNode { + type: "EnumDeclaration"; + id: Identifier; + body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +} + +export interface EnumBooleanBody extends BaseNode { + type: "EnumBooleanBody"; + members: Array; + explicit: boolean; +} + +export interface EnumNumberBody extends BaseNode { + type: "EnumNumberBody"; + members: Array; + explicit: boolean; +} + +export interface EnumStringBody extends BaseNode { + type: "EnumStringBody"; + members: Array; + explicit: boolean; +} + +export interface EnumSymbolBody extends BaseNode { + type: "EnumSymbolBody"; + members: Array; +} + +export interface EnumBooleanMember extends BaseNode { + type: "EnumBooleanMember"; + id: Identifier; + init: BooleanLiteral; +} + +export interface EnumNumberMember extends BaseNode { + type: "EnumNumberMember"; + id: Identifier; + init: NumericLiteral; +} + +export interface EnumStringMember extends BaseNode { + type: "EnumStringMember"; + id: Identifier; + init: StringLiteral; +} + +export interface EnumDefaultedMember extends BaseNode { + type: "EnumDefaultedMember"; + id: Identifier; +} + +export interface JSXAttribute extends BaseNode { + type: "JSXAttribute"; + name: JSXIdentifier | JSXNamespacedName; + value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; +} + +export interface JSXClosingElement extends BaseNode { + type: "JSXClosingElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +} + +export interface JSXElement extends BaseNode { + type: "JSXElement"; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: Array; + selfClosing: any; +} + +export interface JSXEmptyExpression extends BaseNode { + type: "JSXEmptyExpression"; +} + +export interface JSXExpressionContainer extends BaseNode { + type: "JSXExpressionContainer"; + expression: Expression | JSXEmptyExpression; +} + +export interface JSXSpreadChild extends BaseNode { + type: "JSXSpreadChild"; + expression: Expression; +} + +export interface JSXIdentifier extends BaseNode { + type: "JSXIdentifier"; + name: string; +} + +export interface JSXMemberExpression extends BaseNode { + type: "JSXMemberExpression"; + object: JSXMemberExpression | JSXIdentifier; + property: JSXIdentifier; +} + +export interface JSXNamespacedName extends BaseNode { + type: "JSXNamespacedName"; + namespace: JSXIdentifier; + name: JSXIdentifier; +} + +export interface JSXOpeningElement extends BaseNode { + type: "JSXOpeningElement"; + name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; + attributes: Array; + selfClosing: boolean; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface JSXSpreadAttribute extends BaseNode { + type: "JSXSpreadAttribute"; + argument: Expression; +} + +export interface JSXText extends BaseNode { + type: "JSXText"; + value: string; +} + +export interface JSXFragment extends BaseNode { + type: "JSXFragment"; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: Array; +} + +export interface JSXOpeningFragment extends BaseNode { + type: "JSXOpeningFragment"; +} + +export interface JSXClosingFragment extends BaseNode { + type: "JSXClosingFragment"; +} + +export interface Noop extends BaseNode { + type: "Noop"; +} + +export interface Placeholder extends BaseNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: Identifier; +} + +export interface V8IntrinsicIdentifier extends BaseNode { + type: "V8IntrinsicIdentifier"; + name: string; +} + +export interface ArgumentPlaceholder extends BaseNode { + type: "ArgumentPlaceholder"; +} + +export interface AwaitExpression extends BaseNode { + type: "AwaitExpression"; + argument: Expression; +} + +export interface BindExpression extends BaseNode { + type: "BindExpression"; + object: any; + callee: any; +} + +export interface ClassProperty extends BaseNode { + type: "ClassProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + value: Expression | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators: Array | null; + computed: boolean; + static: boolean; + abstract: boolean | null; + accessibility: "public" | "private" | "protected" | null; + declare: boolean | null; + definite: boolean | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface OptionalMemberExpression extends BaseNode { + type: "OptionalMemberExpression"; + object: Expression; + property: any; + computed: boolean; + optional: boolean; +} + +export interface PipelineTopicExpression extends BaseNode { + type: "PipelineTopicExpression"; + expression: Expression; +} + +export interface PipelineBareFunction extends BaseNode { + type: "PipelineBareFunction"; + callee: Expression; +} + +export interface PipelinePrimaryTopicReference extends BaseNode { + type: "PipelinePrimaryTopicReference"; +} + +export interface OptionalCallExpression extends BaseNode { + type: "OptionalCallExpression"; + callee: Expression; + arguments: Array; + optional: boolean; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface ClassPrivateProperty extends BaseNode { + type: "ClassPrivateProperty"; + key: PrivateName; + value: Expression | null; + decorators: Array | null; +} + +export interface ClassPrivateMethod extends BaseNode { + type: "ClassPrivateMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: PrivateName; + params: Array; + body: BlockStatement; + static: boolean; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + decorators: Array | null; + generator: boolean; + optional: boolean | null; + returnType: any; + typeParameters: any; +} + +export interface Import extends BaseNode { + type: "Import"; +} + +export interface Decorator extends BaseNode { + type: "Decorator"; + expression: Expression; +} + +export interface DoExpression extends BaseNode { + type: "DoExpression"; + body: BlockStatement; +} + +export interface ExportDefaultSpecifier extends BaseNode { + type: "ExportDefaultSpecifier"; + exported: Identifier; +} + +export interface ExportNamespaceSpecifier extends BaseNode { + type: "ExportNamespaceSpecifier"; + exported: Identifier; +} + +export interface PrivateName extends BaseNode { + type: "PrivateName"; + id: Identifier; +} + +export interface BigIntLiteral extends BaseNode { + type: "BigIntLiteral"; + value: string; +} + +export interface RecordExpression extends BaseNode { + type: "RecordExpression"; + properties: Array; +} + +export interface TupleExpression extends BaseNode { + type: "TupleExpression"; + elements: Array; +} + +export interface TSParameterProperty extends BaseNode { + type: "TSParameterProperty"; + parameter: Identifier | AssignmentPattern; + accessibility: "public" | "private" | "protected" | null; + readonly: boolean | null; +} + +export interface TSDeclareFunction extends BaseNode { + type: "TSDeclareFunction"; + id: Identifier | null; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array; + returnType: TSTypeAnnotation | Noop | null; + async: boolean; + declare: boolean | null; + generator: boolean; +} + +export interface TSDeclareMethod extends BaseNode { + type: "TSDeclareMethod"; + decorators: Array | null; + key: Identifier | StringLiteral | NumericLiteral | Expression; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array; + returnType: TSTypeAnnotation | Noop | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + generator: boolean; + kind: "get" | "set" | "method" | "constructor"; + optional: boolean | null; + static: boolean; +} + +export interface TSQualifiedName extends BaseNode { + type: "TSQualifiedName"; + left: TSEntityName; + right: Identifier; +} + +export interface TSCallSignatureDeclaration extends BaseNode { + type: "TSCallSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructSignatureDeclaration extends BaseNode { + type: "TSConstructSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSPropertySignature extends BaseNode { + type: "TSPropertySignature"; + key: Expression; + typeAnnotation: TSTypeAnnotation | null; + initializer: Expression | null; + computed: boolean | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSMethodSignature extends BaseNode { + type: "TSMethodSignature"; + key: Expression; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; + computed: boolean | null; + optional: boolean | null; +} + +export interface TSIndexSignature extends BaseNode { + type: "TSIndexSignature"; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; + readonly: boolean | null; +} + +export interface TSAnyKeyword extends BaseNode { + type: "TSAnyKeyword"; +} + +export interface TSBooleanKeyword extends BaseNode { + type: "TSBooleanKeyword"; +} + +export interface TSBigIntKeyword extends BaseNode { + type: "TSBigIntKeyword"; +} + +export interface TSNeverKeyword extends BaseNode { + type: "TSNeverKeyword"; +} + +export interface TSNullKeyword extends BaseNode { + type: "TSNullKeyword"; +} + +export interface TSNumberKeyword extends BaseNode { + type: "TSNumberKeyword"; +} + +export interface TSObjectKeyword extends BaseNode { + type: "TSObjectKeyword"; +} + +export interface TSStringKeyword extends BaseNode { + type: "TSStringKeyword"; +} + +export interface TSSymbolKeyword extends BaseNode { + type: "TSSymbolKeyword"; +} + +export interface TSUndefinedKeyword extends BaseNode { + type: "TSUndefinedKeyword"; +} + +export interface TSUnknownKeyword extends BaseNode { + type: "TSUnknownKeyword"; +} + +export interface TSVoidKeyword extends BaseNode { + type: "TSVoidKeyword"; +} + +export interface TSThisType extends BaseNode { + type: "TSThisType"; +} + +export interface TSFunctionType extends BaseNode { + type: "TSFunctionType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructorType extends BaseNode { + type: "TSConstructorType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSTypeReference extends BaseNode { + type: "TSTypeReference"; + typeName: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSTypePredicate extends BaseNode { + type: "TSTypePredicate"; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; + asserts: boolean | null; +} + +export interface TSTypeQuery extends BaseNode { + type: "TSTypeQuery"; + exprName: TSEntityName | TSImportType; +} + +export interface TSTypeLiteral extends BaseNode { + type: "TSTypeLiteral"; + members: Array; +} + +export interface TSArrayType extends BaseNode { + type: "TSArrayType"; + elementType: TSType; +} + +export interface TSTupleType extends BaseNode { + type: "TSTupleType"; + elementTypes: Array; +} + +export interface TSOptionalType extends BaseNode { + type: "TSOptionalType"; + typeAnnotation: TSType; +} + +export interface TSRestType extends BaseNode { + type: "TSRestType"; + typeAnnotation: TSType; +} + +export interface TSUnionType extends BaseNode { + type: "TSUnionType"; + types: Array; +} + +export interface TSIntersectionType extends BaseNode { + type: "TSIntersectionType"; + types: Array; +} + +export interface TSConditionalType extends BaseNode { + type: "TSConditionalType"; + checkType: TSType; + extendsType: TSType; + trueType: TSType; + falseType: TSType; +} + +export interface TSInferType extends BaseNode { + type: "TSInferType"; + typeParameter: TSTypeParameter; +} + +export interface TSParenthesizedType extends BaseNode { + type: "TSParenthesizedType"; + typeAnnotation: TSType; +} + +export interface TSTypeOperator extends BaseNode { + type: "TSTypeOperator"; + typeAnnotation: TSType; + operator: string; +} + +export interface TSIndexedAccessType extends BaseNode { + type: "TSIndexedAccessType"; + objectType: TSType; + indexType: TSType; +} + +export interface TSMappedType extends BaseNode { + type: "TSMappedType"; + typeParameter: TSTypeParameter; + typeAnnotation: TSType | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSLiteralType extends BaseNode { + type: "TSLiteralType"; + literal: NumericLiteral | StringLiteral | BooleanLiteral; +} + +export interface TSExpressionWithTypeArguments extends BaseNode { + type: "TSExpressionWithTypeArguments"; + expression: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSInterfaceDeclaration extends BaseNode { + type: "TSInterfaceDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + extends: Array | null; + body: TSInterfaceBody; + declare: boolean | null; +} + +export interface TSInterfaceBody extends BaseNode { + type: "TSInterfaceBody"; + body: Array; +} + +export interface TSTypeAliasDeclaration extends BaseNode { + type: "TSTypeAliasDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + typeAnnotation: TSType; + declare: boolean | null; +} + +export interface TSAsExpression extends BaseNode { + type: "TSAsExpression"; + expression: Expression; + typeAnnotation: TSType; +} + +export interface TSTypeAssertion extends BaseNode { + type: "TSTypeAssertion"; + typeAnnotation: TSType; + expression: Expression; +} + +export interface TSEnumDeclaration extends BaseNode { + type: "TSEnumDeclaration"; + id: Identifier; + members: Array; + const: boolean | null; + declare: boolean | null; + initializer: Expression | null; +} + +export interface TSEnumMember extends BaseNode { + type: "TSEnumMember"; + id: Identifier | StringLiteral; + initializer: Expression | null; +} + +export interface TSModuleDeclaration extends BaseNode { + type: "TSModuleDeclaration"; + id: Identifier | StringLiteral; + body: TSModuleBlock | TSModuleDeclaration; + declare: boolean | null; + global: boolean | null; +} + +export interface TSModuleBlock extends BaseNode { + type: "TSModuleBlock"; + body: Array; +} + +export interface TSImportType extends BaseNode { + type: "TSImportType"; + argument: StringLiteral; + qualifier: TSEntityName | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSImportEqualsDeclaration extends BaseNode { + type: "TSImportEqualsDeclaration"; + id: Identifier; + moduleReference: TSEntityName | TSExternalModuleReference; + isExport: boolean; +} + +export interface TSExternalModuleReference extends BaseNode { + type: "TSExternalModuleReference"; + expression: StringLiteral; +} + +export interface TSNonNullExpression extends BaseNode { + type: "TSNonNullExpression"; + expression: Expression; +} + +export interface TSExportAssignment extends BaseNode { + type: "TSExportAssignment"; + expression: Expression; +} + +export interface TSNamespaceExportDeclaration extends BaseNode { + type: "TSNamespaceExportDeclaration"; + id: Identifier; +} + +export interface TSTypeAnnotation extends BaseNode { + type: "TSTypeAnnotation"; + typeAnnotation: TSType; +} + +export interface TSTypeParameterInstantiation extends BaseNode { + type: "TSTypeParameterInstantiation"; + params: Array; +} + +export interface TSTypeParameterDeclaration extends BaseNode { + type: "TSTypeParameterDeclaration"; + params: Array; +} + +export interface TSTypeParameter extends BaseNode { + type: "TSTypeParameter"; + constraint: TSType | null; + default: TSType | null; + name: string; +} + +/** + * @deprecated Use `NumericLiteral` + */ +export type NumberLiteral = NumericLiteral; + +/** + * @deprecated Use `RegExpLiteral` + */ +export type RegexLiteral = RegExpLiteral; + +/** + * @deprecated Use `RestElement` + */ +export type RestProperty = RestElement; + +/** + * @deprecated Use `SpreadElement` + */ +export type SpreadProperty = SpreadElement; + +export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | AwaitExpression | BindExpression | OptionalMemberExpression | PipelinePrimaryTopicReference | OptionalCallExpression | Import | DoExpression | BigIntLiteral | RecordExpression | TupleExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression; +export type Binary = BinaryExpression | LogicalExpression; +export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; +export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; +export type Block = BlockStatement | Program | TSModuleBlock; +export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; +export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; +export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; +export type Conditional = ConditionalExpression | IfStatement; +export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; +export type While = DoWhileStatement | WhileStatement; +export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; +export type For = ForInStatement | ForStatement | ForOfStatement; +export type ForXStatement = ForInStatement | ForOfStatement; +export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral; +export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; +export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; +export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; +export type TSEntityName = Identifier | TSQualifiedName; +export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral; +export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | BigIntLiteral; +export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; +export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; +export type ObjectMember = ObjectMethod | ObjectProperty; +export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty; +export type UnaryLike = UnaryExpression | SpreadElement; +export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; +export type Class = ClassExpression | ClassDeclaration; +export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; +export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; +export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; +export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation; +export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; +export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; +export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; +export type FlowPredicate = DeclaredPredicate | InferredPredicate; +export type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; +export type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember; +export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; +export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; +export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; +export type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; + +export interface Aliases { + Expression: Expression; + Binary: Binary; + Scopable: Scopable; + BlockParent: BlockParent; + Block: Block; + Statement: Statement; + Terminatorless: Terminatorless; + CompletionStatement: CompletionStatement; + Conditional: Conditional; + Loop: Loop; + While: While; + ExpressionWrapper: ExpressionWrapper; + For: For; + ForXStatement: ForXStatement; + Function: Function; + FunctionParent: FunctionParent; + Pureish: Pureish; + Declaration: Declaration; + PatternLike: PatternLike; + LVal: LVal; + TSEntityName: TSEntityName; + Literal: Literal; + Immutable: Immutable; + UserWhitespacable: UserWhitespacable; + Method: Method; + ObjectMember: ObjectMember; + Property: Property; + UnaryLike: UnaryLike; + Pattern: Pattern; + Class: Class; + ModuleDeclaration: ModuleDeclaration; + ExportDeclaration: ExportDeclaration; + ModuleSpecifier: ModuleSpecifier; + Flow: Flow; + FlowType: FlowType; + FlowBaseAnnotation: FlowBaseAnnotation; + FlowDeclaration: FlowDeclaration; + FlowPredicate: FlowPredicate; + EnumBody: EnumBody; + EnumMember: EnumMember; + JSX: JSX; + Private: Private; + TSTypeElement: TSTypeElement; + TSType: TSType; +} + +export function arrayExpression(elements?: Array): ArrayExpression; +export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; +export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression; +export function interpreterDirective(value: string): InterpreterDirective; +export function directive(value: DirectiveLiteral): Directive; +export function directiveLiteral(value: string): DirectiveLiteral; +export function blockStatement(body: Array, directives?: Array): BlockStatement; +export function breakStatement(label?: Identifier | null): BreakStatement; +export function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array): CallExpression; +export function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause; +export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; +export function continueStatement(label?: Identifier | null): ContinueStatement; +export function debuggerStatement(): DebuggerStatement; +export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; +export function emptyStatement(): EmptyStatement; +export function expressionStatement(expression: Expression): ExpressionStatement; +export function file(program: Program, comments: any, tokens: any): File; +export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; +export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; +export function functionDeclaration(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration; +export function functionExpression(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression; +export function identifier(name: any): Identifier; +export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; +export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; +export function stringLiteral(value: string): StringLiteral; +export function numericLiteral(value: number): NumericLiteral; +export function nullLiteral(): NullLiteral; +export function booleanLiteral(value: boolean): BooleanLiteral; +export function regExpLiteral(pattern: string, flags?: any): RegExpLiteral; +export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; +export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression; +export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array): NewExpression; +export function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; +export function objectExpression(properties: Array): ObjectExpression; +export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod; +export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: any, decorators?: Array | null): ObjectProperty; +export function restElement(argument: LVal): RestElement; +export function returnStatement(argument?: Expression | null): ReturnStatement; +export function sequenceExpression(expressions: Array): SequenceExpression; +export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; +export function switchCase(test: Expression | null | undefined, consequent: Array): SwitchCase; +export function switchStatement(discriminant: Expression, cases: Array): SwitchStatement; +export function thisExpression(): ThisExpression; +export function throwStatement(argument: Expression): ThrowStatement; +export function tryStatement(block: any, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; +export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; +export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; +export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array): VariableDeclaration; +export function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator; +export function whileStatement(test: Expression, body: Statement): WhileStatement; +export function withStatement(object: Expression, body: Statement): WithStatement; +export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern; +export function arrayPattern(elements: Array): ArrayPattern; +export function arrowFunctionExpression(params: Array, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression; +export function classBody(body: Array): ClassBody; +export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null): ClassExpression; +export function classDeclaration(id: any, superClass: any, body: any, decorators: any): ClassDeclaration; +export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; +export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; +export function exportNamedDeclaration(declaration?: any | null, specifiers?: Array, source?: StringLiteral | null): ExportNamedDeclaration; +export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier; +export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; +export function importDeclaration(specifiers: Array, source: StringLiteral): ImportDeclaration; +export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; +export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; +export function importSpecifier(local: Identifier, imported: Identifier): ImportSpecifier; +export function metaProperty(meta: any, property: Identifier): MetaProperty; +export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod; +export function objectPattern(properties: Array): ObjectPattern; +export function spreadElement(argument: Expression): SpreadElement; +declare function _super(): Super; +export { _super as super} +export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression; +export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): TemplateElement; +export function templateLiteral(quasis: Array, expressions: Array): TemplateLiteral; +export function yieldExpression(argument?: Expression | null, delegate?: any): YieldExpression; +export function anyTypeAnnotation(): AnyTypeAnnotation; +export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; +export function booleanTypeAnnotation(): BooleanTypeAnnotation; +export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; +export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; +export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; +export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): DeclareClass; +export function declareFunction(id: Identifier): DeclareFunction; +export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): DeclareInterface; +export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; +export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; +export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; +export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; +export function declareVariable(id: Identifier): DeclareVariable; +export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array | null, source?: StringLiteral | null): DeclareExportDeclaration; +export function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; +export function declaredPredicate(value: Flow): DeclaredPredicate; +export function existsTypeAnnotation(): ExistsTypeAnnotation; +export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; +export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam; +export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; +export function inferredPredicate(): InferredPredicate; +export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; +export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration; +export function interfaceTypeAnnotation(_extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; +export function intersectionTypeAnnotation(types: Array): IntersectionTypeAnnotation; +export function mixedTypeAnnotation(): MixedTypeAnnotation; +export function emptyTypeAnnotation(): EmptyTypeAnnotation; +export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; +export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; +export function numberTypeAnnotation(): NumberTypeAnnotation; +export function objectTypeAnnotation(properties: Array, indexers?: Array | null, callProperties?: Array | null, internalSlots?: Array | null, exact?: boolean): ObjectTypeAnnotation; +export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; +export function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty; +export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer; +export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty; +export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; +export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; +export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; +export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; +export function stringTypeAnnotation(): StringTypeAnnotation; +export function symbolTypeAnnotation(): SymbolTypeAnnotation; +export function thisTypeAnnotation(): ThisTypeAnnotation; +export function tupleTypeAnnotation(types: Array): TupleTypeAnnotation; +export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; +export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; +export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; +export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; +export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter; +export function typeParameterDeclaration(params: Array): TypeParameterDeclaration; +export function typeParameterInstantiation(params: Array): TypeParameterInstantiation; +export function unionTypeAnnotation(types: Array): UnionTypeAnnotation; +export function variance(kind: "minus" | "plus"): Variance; +export function voidTypeAnnotation(): VoidTypeAnnotation; +export function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration; +export function enumBooleanBody(members: Array): EnumBooleanBody; +export function enumNumberBody(members: Array): EnumNumberBody; +export function enumStringBody(members: Array): EnumStringBody; +export function enumSymbolBody(members: Array): EnumSymbolBody; +export function enumBooleanMember(id: Identifier): EnumBooleanMember; +export function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember; +export function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember; +export function enumDefaultedMember(id: Identifier): EnumDefaultedMember; +export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; +export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement; +export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array, selfClosing: any): JSXElement; +export function jsxEmptyExpression(): JSXEmptyExpression; +export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; +export function jsxSpreadChild(expression: Expression): JSXSpreadChild; +export function jsxIdentifier(name: string): JSXIdentifier; +export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; +export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; +export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array, selfClosing?: boolean): JSXOpeningElement; +export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; +export function jsxText(value: string): JSXText; +export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array): JSXFragment; +export function jsxOpeningFragment(): JSXOpeningFragment; +export function jsxClosingFragment(): JSXClosingFragment; +export function noop(): Noop; +export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; +export function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier; +export function argumentPlaceholder(): ArgumentPlaceholder; +export function awaitExpression(argument: Expression): AwaitExpression; +export function bindExpression(object: any, callee: any): BindExpression; +export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array | null, computed?: boolean, _static?: boolean): ClassProperty; +export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; +export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; +export function pipelineBareFunction(callee: Expression): PipelineBareFunction; +export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; +export function optionalCallExpression(callee: Expression, _arguments: Array, optional: boolean): OptionalCallExpression; +export function classPrivateProperty(key: PrivateName, value?: Expression | null, decorators?: Array | null): ClassPrivateProperty; +export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array, body: BlockStatement, _static?: boolean): ClassPrivateMethod; +declare function _import(): Import; +export { _import as import} +export function decorator(expression: Expression): Decorator; +export function doExpression(body: BlockStatement): DoExpression; +export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; +export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; +export function privateName(id: Identifier): PrivateName; +export function bigIntLiteral(value: string): BigIntLiteral; +export function recordExpression(properties: Array): RecordExpression; +export function tupleExpression(elements?: Array): TupleExpression; +export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty; +export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction; +export function tsDeclareMethod(decorators: Array | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod; +export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; +export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; +export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; +export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature; +export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature; +export function tsIndexSignature(parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature; +export function tsAnyKeyword(): TSAnyKeyword; +export function tsBooleanKeyword(): TSBooleanKeyword; +export function tsBigIntKeyword(): TSBigIntKeyword; +export function tsNeverKeyword(): TSNeverKeyword; +export function tsNullKeyword(): TSNullKeyword; +export function tsNumberKeyword(): TSNumberKeyword; +export function tsObjectKeyword(): TSObjectKeyword; +export function tsStringKeyword(): TSStringKeyword; +export function tsSymbolKeyword(): TSSymbolKeyword; +export function tsUndefinedKeyword(): TSUndefinedKeyword; +export function tsUnknownKeyword(): TSUnknownKeyword; +export function tsVoidKeyword(): TSVoidKeyword; +export function tsThisType(): TSThisType; +export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; +export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; +export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; +export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate; +export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; +export function tsTypeLiteral(members: Array): TSTypeLiteral; +export function tsArrayType(elementType: TSType): TSArrayType; +export function tsTupleType(elementTypes: Array): TSTupleType; +export function tsOptionalType(typeAnnotation: TSType): TSOptionalType; +export function tsRestType(typeAnnotation: TSType): TSRestType; +export function tsUnionType(types: Array): TSUnionType; +export function tsIntersectionType(types: Array): TSIntersectionType; +export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; +export function tsInferType(typeParameter: TSTypeParameter): TSInferType; +export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; +export function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator; +export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; +export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null): TSMappedType; +export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType; +export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; +export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration; +export function tsInterfaceBody(body: Array): TSInterfaceBody; +export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration; +export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; +export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; +export function tsEnumDeclaration(id: Identifier, members: Array): TSEnumDeclaration; +export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; +export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration; +export function tsModuleBlock(body: Array): TSModuleBlock; +export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; +export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration; +export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; +export function tsNonNullExpression(expression: Expression): TSNonNullExpression; +export function tsExportAssignment(expression: Expression): TSExportAssignment; +export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; +export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; +export function tsTypeParameterInstantiation(params: Array): TSTypeParameterInstantiation; +export function tsTypeParameterDeclaration(params: Array): TSTypeParameterDeclaration; +export function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter; +export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; +// export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is AnyTypeAnnotation; +export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; +// export function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is ArgumentPlaceholder; +export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; +// export function assertArrayExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrayExpression; +export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; +// export function assertArrayPattern(node: object | null | undefined, opts?: object | null): asserts node is ArrayPattern; +export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; +// export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ArrayTypeAnnotation; +export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; +// export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrowFunctionExpression; +export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; +// export function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): asserts node is AssignmentExpression; +export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; +// export function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): asserts node is AssignmentPattern; +export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; +// export function assertAwaitExpression(node: object | null | undefined, opts?: object | null): asserts node is AwaitExpression; +export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; +// export function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): asserts node is BigIntLiteral; +export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; +// export function assertBinary(node: object | null | undefined, opts?: object | null): asserts node is Binary; +export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; +// export function assertBinaryExpression(node: object | null | undefined, opts?: object | null): asserts node is BinaryExpression; +export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; +// export function assertBindExpression(node: object | null | undefined, opts?: object | null): asserts node is BindExpression; +export function isBlock(node: object | null | undefined, opts?: object | null): node is Block; +// export function assertBlock(node: object | null | undefined, opts?: object | null): asserts node is Block; +export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; +// export function assertBlockParent(node: object | null | undefined, opts?: object | null): asserts node is BlockParent; +export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; +// export function assertBlockStatement(node: object | null | undefined, opts?: object | null): asserts node is BlockStatement; +export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; +// export function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteral; +export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; +// export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteralTypeAnnotation; +export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; +// export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanTypeAnnotation; +export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; +// export function assertBreakStatement(node: object | null | undefined, opts?: object | null): asserts node is BreakStatement; +export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; +// export function assertCallExpression(node: object | null | undefined, opts?: object | null): asserts node is CallExpression; +export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; +// export function assertCatchClause(node: object | null | undefined, opts?: object | null): asserts node is CatchClause; +export function isClass(node: object | null | undefined, opts?: object | null): node is Class; +// export function assertClass(node: object | null | undefined, opts?: object | null): asserts node is Class; +export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; +// export function assertClassBody(node: object | null | undefined, opts?: object | null): asserts node is ClassBody; +export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; +// export function assertClassDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ClassDeclaration; +export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; +// export function assertClassExpression(node: object | null | undefined, opts?: object | null): asserts node is ClassExpression; +export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; +// export function assertClassImplements(node: object | null | undefined, opts?: object | null): asserts node is ClassImplements; +export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; +// export function assertClassMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassMethod; +export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; +// export function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateMethod; +export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; +// export function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateProperty; +export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; +// export function assertClassProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassProperty; +export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; +// export function assertCompletionStatement(node: object | null | undefined, opts?: object | null): asserts node is CompletionStatement; +export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; +// export function assertConditional(node: object | null | undefined, opts?: object | null): asserts node is Conditional; +export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; +// export function assertConditionalExpression(node: object | null | undefined, opts?: object | null): asserts node is ConditionalExpression; +export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; +// export function assertContinueStatement(node: object | null | undefined, opts?: object | null): asserts node is ContinueStatement; +export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; +// export function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): asserts node is DebuggerStatement; +export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; +// export function assertDeclaration(node: object | null | undefined, opts?: object | null): asserts node is Declaration; +export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; +// export function assertDeclareClass(node: object | null | undefined, opts?: object | null): asserts node is DeclareClass; +export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; +// export function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportAllDeclaration; +export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; +// export function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportDeclaration; +export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; +// export function assertDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is DeclareFunction; +export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; +// export function assertDeclareInterface(node: object | null | undefined, opts?: object | null): asserts node is DeclareInterface; +export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; +// export function assertDeclareModule(node: object | null | undefined, opts?: object | null): asserts node is DeclareModule; +export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; +// export function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): asserts node is DeclareModuleExports; +export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; +// export function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is DeclareOpaqueType; +export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; +// export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is DeclareTypeAlias; +export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; +// export function assertDeclareVariable(node: object | null | undefined, opts?: object | null): asserts node is DeclareVariable; +export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; +// export function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): asserts node is DeclaredPredicate; +export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; +// export function assertDecorator(node: object | null | undefined, opts?: object | null): asserts node is Decorator; +export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; +// export function assertDirective(node: object | null | undefined, opts?: object | null): asserts node is Directive; +export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; +// export function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): asserts node is DirectiveLiteral; +export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; +// export function assertDoExpression(node: object | null | undefined, opts?: object | null): asserts node is DoExpression; +export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; +// export function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is DoWhileStatement; +export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; +// export function assertEmptyStatement(node: object | null | undefined, opts?: object | null): asserts node is EmptyStatement; +export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; +// export function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is EmptyTypeAnnotation; +export function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody; +// export function assertEnumBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBody; +export function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody; +// export function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanBody; +export function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember; +// export function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanMember; +export function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration; +// export function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is EnumDeclaration; +export function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember; +// export function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): asserts node is EnumDefaultedMember; +export function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember; +// export function assertEnumMember(node: object | null | undefined, opts?: object | null): asserts node is EnumMember; +export function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody; +// export function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberBody; +export function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember; +// export function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberMember; +export function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody; +// export function assertEnumStringBody(node: object | null | undefined, opts?: object | null): asserts node is EnumStringBody; +export function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember; +// export function assertEnumStringMember(node: object | null | undefined, opts?: object | null): asserts node is EnumStringMember; +export function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody; +// export function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): asserts node is EnumSymbolBody; +export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; +// export function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ExistsTypeAnnotation; +export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; +// export function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportAllDeclaration; +export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; +// export function assertExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDeclaration; +export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; +// export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultDeclaration; +export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; +// export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultSpecifier; +export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; +// export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportNamedDeclaration; +export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; +// export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportNamespaceSpecifier; +export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; +// export function assertExportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportSpecifier; +export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; +// export function assertExpression(node: object | null | undefined, opts?: object | null): asserts node is Expression; +export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; +// export function assertExpressionStatement(node: object | null | undefined, opts?: object | null): asserts node is ExpressionStatement; +export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; +// export function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): asserts node is ExpressionWrapper; +export function isFile(node: object | null | undefined, opts?: object | null): node is File; +// export function assertFile(node: object | null | undefined, opts?: object | null): asserts node is File; +export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; +// export function assertFlow(node: object | null | undefined, opts?: object | null): asserts node is Flow; +export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; +// export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FlowBaseAnnotation; +export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; +// export function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FlowDeclaration; +export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; +// export function assertFlowPredicate(node: object | null | undefined, opts?: object | null): asserts node is FlowPredicate; +export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; +// export function assertFlowType(node: object | null | undefined, opts?: object | null): asserts node is FlowType; +export function isFor(node: object | null | undefined, opts?: object | null): node is For; +// export function assertFor(node: object | null | undefined, opts?: object | null): asserts node is For; +export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; +// export function assertForInStatement(node: object | null | undefined, opts?: object | null): asserts node is ForInStatement; +export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; +// export function assertForOfStatement(node: object | null | undefined, opts?: object | null): asserts node is ForOfStatement; +export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; +// export function assertForStatement(node: object | null | undefined, opts?: object | null): asserts node is ForStatement; +export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; +// export function assertForXStatement(node: object | null | undefined, opts?: object | null): asserts node is ForXStatement; +export function isFunction(node: object | null | undefined, opts?: object | null): node is Function; +// export function assertFunction(node: object | null | undefined, opts?: object | null): asserts node is Function; +export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; +// export function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FunctionDeclaration; +export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; +// export function assertFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is FunctionExpression; +export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; +// export function assertFunctionParent(node: object | null | undefined, opts?: object | null): asserts node is FunctionParent; +export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; +// export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeAnnotation; +export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; +// export function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeParam; +export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; +// export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is GenericTypeAnnotation; +export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; +// export function assertIdentifier(node: object | null | undefined, opts?: object | null): asserts node is Identifier; +export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; +// export function assertIfStatement(node: object | null | undefined, opts?: object | null): asserts node is IfStatement; +export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable; +// export function assertImmutable(node: object | null | undefined, opts?: object | null): asserts node is Immutable; +export function isImport(node: object | null | undefined, opts?: object | null): node is Import; +// export function assertImport(node: object | null | undefined, opts?: object | null): asserts node is Import; +export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; +// export function assertImportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ImportDeclaration; +export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; +// export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportDefaultSpecifier; +export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; +// export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportNamespaceSpecifier; +export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; +// export function assertImportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportSpecifier; +export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; +// export function assertInferredPredicate(node: object | null | undefined, opts?: object | null): asserts node is InferredPredicate; +export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; +// export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is InterfaceDeclaration; +export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; +// export function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): asserts node is InterfaceExtends; +export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; +// export function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is InterfaceTypeAnnotation; +export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; +// export function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): asserts node is InterpreterDirective; +export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; +// export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is IntersectionTypeAnnotation; +export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; +// export function assertJSX(node: object | null | undefined, opts?: object | null): asserts node is JSX; +export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; +// export function assertJSXAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXAttribute; +export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; +// export function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingElement; +export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; +// export function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingFragment; +export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; +// export function assertJSXElement(node: object | null | undefined, opts?: object | null): asserts node is JSXElement; +export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; +// export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXEmptyExpression; +export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; +// export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): asserts node is JSXExpressionContainer; +export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; +// export function assertJSXFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXFragment; +export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; +// export function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): asserts node is JSXIdentifier; +export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; +// export function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXMemberExpression; +export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; +// export function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): asserts node is JSXNamespacedName; +export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; +// export function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningElement; +export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; +// export function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningFragment; +export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; +// export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadAttribute; +export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; +// export function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadChild; +export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; +// export function assertJSXText(node: object | null | undefined, opts?: object | null): asserts node is JSXText; +export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; +// export function assertLVal(node: object | null | undefined, opts?: object | null): asserts node is LVal; +export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; +// export function assertLabeledStatement(node: object | null | undefined, opts?: object | null): asserts node is LabeledStatement; +export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; +// export function assertLiteral(node: object | null | undefined, opts?: object | null): asserts node is Literal; +export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; +// export function assertLogicalExpression(node: object | null | undefined, opts?: object | null): asserts node is LogicalExpression; +export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; +// export function assertLoop(node: object | null | undefined, opts?: object | null): asserts node is Loop; +export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; +// export function assertMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is MemberExpression; +export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; +// export function assertMetaProperty(node: object | null | undefined, opts?: object | null): asserts node is MetaProperty; +export function isMethod(node: object | null | undefined, opts?: object | null): node is Method; +// export function assertMethod(node: object | null | undefined, opts?: object | null): asserts node is Method; +export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; +// export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is MixedTypeAnnotation; +export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; +// export function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ModuleDeclaration; +export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; +// export function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ModuleSpecifier; +export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; +// export function assertNewExpression(node: object | null | undefined, opts?: object | null): asserts node is NewExpression; +export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; +// export function assertNoop(node: object | null | undefined, opts?: object | null): asserts node is Noop; +export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; +// export function assertNullLiteral(node: object | null | undefined, opts?: object | null): asserts node is NullLiteral; +export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; +// export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullLiteralTypeAnnotation; +export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; +// export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullableTypeAnnotation; +export function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean; +// export function assertNumberLiteral(node: object | null | undefined, opts?: object | null): asserts node; +export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; +// export function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberLiteralTypeAnnotation; +export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; +// export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberTypeAnnotation; +export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; +// export function assertNumericLiteral(node: object | null | undefined, opts?: object | null): asserts node is NumericLiteral; +export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; +// export function assertObjectExpression(node: object | null | undefined, opts?: object | null): asserts node is ObjectExpression; +export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; +// export function assertObjectMember(node: object | null | undefined, opts?: object | null): asserts node is ObjectMember; +export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; +// export function assertObjectMethod(node: object | null | undefined, opts?: object | null): asserts node is ObjectMethod; +export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; +// export function assertObjectPattern(node: object | null | undefined, opts?: object | null): asserts node is ObjectPattern; +export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; +// export function assertObjectProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectProperty; +export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; +// export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeAnnotation; +export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; +// export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeCallProperty; +export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; +// export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeIndexer; +export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; +// export function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeInternalSlot; +export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; +// export function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeProperty; +export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; +// export function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeSpreadProperty; +export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; +// export function assertOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is OpaqueType; +export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; +// export function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalCallExpression; +export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; +// export function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalMemberExpression; +export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; +// export function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): asserts node is ParenthesizedExpression; +export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; +// export function assertPattern(node: object | null | undefined, opts?: object | null): asserts node is Pattern; +export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; +// export function assertPatternLike(node: object | null | undefined, opts?: object | null): asserts node is PatternLike; +export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; +// export function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): asserts node is PipelineBareFunction; +export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; +// export function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): asserts node is PipelinePrimaryTopicReference; +export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; +// export function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): asserts node is PipelineTopicExpression; +export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; +// export function assertPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is Placeholder; +export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; +// export function assertPrivate(node: object | null | undefined, opts?: object | null): asserts node is Private; +export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; +// export function assertPrivateName(node: object | null | undefined, opts?: object | null): asserts node is PrivateName; +export function isProgram(node: object | null | undefined, opts?: object | null): node is Program; +// export function assertProgram(node: object | null | undefined, opts?: object | null): asserts node is Program; +export function isProperty(node: object | null | undefined, opts?: object | null): node is Property; +// export function assertProperty(node: object | null | undefined, opts?: object | null): asserts node is Property; +export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; +// export function assertPureish(node: object | null | undefined, opts?: object | null): asserts node is Pureish; +export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; +// export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): asserts node is QualifiedTypeIdentifier; +export function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression; +// export function assertRecordExpression(node: object | null | undefined, opts?: object | null): asserts node is RecordExpression; +export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; +// export function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): asserts node is RegExpLiteral; +export function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean; +// export function assertRegexLiteral(node: object | null | undefined, opts?: object | null): asserts node; +export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; +// export function assertRestElement(node: object | null | undefined, opts?: object | null): asserts node is RestElement; +export function isRestProperty(node: object | null | undefined, opts?: object | null): boolean; +// export function assertRestProperty(node: object | null | undefined, opts?: object | null): asserts node; +export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; +// export function assertReturnStatement(node: object | null | undefined, opts?: object | null): asserts node is ReturnStatement; +export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; +// export function assertScopable(node: object | null | undefined, opts?: object | null): asserts node is Scopable; +export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; +// export function assertSequenceExpression(node: object | null | undefined, opts?: object | null): asserts node is SequenceExpression; +export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; +// export function assertSpreadElement(node: object | null | undefined, opts?: object | null): asserts node is SpreadElement; +export function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean; +// export function assertSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node; +export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; +// export function assertStatement(node: object | null | undefined, opts?: object | null): asserts node is Statement; +export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; +// export function assertStringLiteral(node: object | null | undefined, opts?: object | null): asserts node is StringLiteral; +export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; +// export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringLiteralTypeAnnotation; +export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; +// export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringTypeAnnotation; +export function isSuper(node: object | null | undefined, opts?: object | null): node is Super; +// export function assertSuper(node: object | null | undefined, opts?: object | null): asserts node is Super; +export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; +// export function assertSwitchCase(node: object | null | undefined, opts?: object | null): asserts node is SwitchCase; +export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; +// export function assertSwitchStatement(node: object | null | undefined, opts?: object | null): asserts node is SwitchStatement; +export function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation; +// export function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is SymbolTypeAnnotation; +export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; +// export function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSAnyKeyword; +export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; +// export function assertTSArrayType(node: object | null | undefined, opts?: object | null): asserts node is TSArrayType; +export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; +// export function assertTSAsExpression(node: object | null | undefined, opts?: object | null): asserts node is TSAsExpression; +export function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword; +// export function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBigIntKeyword; +export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; +// export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBooleanKeyword; +export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; +// export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSCallSignatureDeclaration; +export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; +// export function assertTSConditionalType(node: object | null | undefined, opts?: object | null): asserts node is TSConditionalType; +export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; +// export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSConstructSignatureDeclaration; +export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; +// export function assertTSConstructorType(node: object | null | undefined, opts?: object | null): asserts node is TSConstructorType; +export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; +// export function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareFunction; +export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; +// export function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareMethod; +export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; +// export function assertTSEntityName(node: object | null | undefined, opts?: object | null): asserts node is TSEntityName; +export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; +// export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSEnumDeclaration; +export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; +// export function assertTSEnumMember(node: object | null | undefined, opts?: object | null): asserts node is TSEnumMember; +export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; +// export function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): asserts node is TSExportAssignment; +export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; +// export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): asserts node is TSExpressionWithTypeArguments; +export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; +// export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): asserts node is TSExternalModuleReference; +export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; +// export function assertTSFunctionType(node: object | null | undefined, opts?: object | null): asserts node is TSFunctionType; +export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; +// export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSImportEqualsDeclaration; +export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; +// export function assertTSImportType(node: object | null | undefined, opts?: object | null): asserts node is TSImportType; +export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; +// export function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): asserts node is TSIndexSignature; +export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; +// export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is TSIndexedAccessType; +export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; +// export function assertTSInferType(node: object | null | undefined, opts?: object | null): asserts node is TSInferType; +export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; +// export function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceBody; +export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; +// export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceDeclaration; +export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; +// export function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): asserts node is TSIntersectionType; +export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; +// export function assertTSLiteralType(node: object | null | undefined, opts?: object | null): asserts node is TSLiteralType; +export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; +// export function assertTSMappedType(node: object | null | undefined, opts?: object | null): asserts node is TSMappedType; +export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; +// export function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): asserts node is TSMethodSignature; +export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; +// export function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): asserts node is TSModuleBlock; +export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; +// export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSModuleDeclaration; +export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; +// export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSNamespaceExportDeclaration; +export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; +// export function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNeverKeyword; +export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; +// export function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): asserts node is TSNonNullExpression; +export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; +// export function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNullKeyword; +export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; +// export function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNumberKeyword; +export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; +// export function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSObjectKeyword; +export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; +// export function assertTSOptionalType(node: object | null | undefined, opts?: object | null): asserts node is TSOptionalType; +export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; +// export function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): asserts node is TSParameterProperty; +export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; +// export function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): asserts node is TSParenthesizedType; +export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; +// export function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): asserts node is TSPropertySignature; +export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; +// export function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): asserts node is TSQualifiedName; +export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; +// export function assertTSRestType(node: object | null | undefined, opts?: object | null): asserts node is TSRestType; +export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; +// export function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSStringKeyword; +export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; +// export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSSymbolKeyword; +export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; +// export function assertTSThisType(node: object | null | undefined, opts?: object | null): asserts node is TSThisType; +export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; +// export function assertTSTupleType(node: object | null | undefined, opts?: object | null): asserts node is TSTupleType; +export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; +// export function assertTSType(node: object | null | undefined, opts?: object | null): asserts node is TSType; +export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; +// export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAliasDeclaration; +export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; +// export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAnnotation; +export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; +// export function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAssertion; +export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; +// export function assertTSTypeElement(node: object | null | undefined, opts?: object | null): asserts node is TSTypeElement; +export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; +// export function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): asserts node is TSTypeLiteral; +export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; +// export function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): asserts node is TSTypeOperator; +export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; +// export function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameter; +export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; +// export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterDeclaration; +export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; +// export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterInstantiation; +export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; +// export function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): asserts node is TSTypePredicate; +export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; +// export function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): asserts node is TSTypeQuery; +export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; +// export function assertTSTypeReference(node: object | null | undefined, opts?: object | null): asserts node is TSTypeReference; +export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; +// export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUndefinedKeyword; +export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; +// export function assertTSUnionType(node: object | null | undefined, opts?: object | null): asserts node is TSUnionType; +export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; +// export function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUnknownKeyword; +export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; +// export function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSVoidKeyword; +export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; +// export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): asserts node is TaggedTemplateExpression; +export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; +// export function assertTemplateElement(node: object | null | undefined, opts?: object | null): asserts node is TemplateElement; +export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; +// export function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): asserts node is TemplateLiteral; +export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; +// export function assertTerminatorless(node: object | null | undefined, opts?: object | null): asserts node is Terminatorless; +export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; +// export function assertThisExpression(node: object | null | undefined, opts?: object | null): asserts node is ThisExpression; +export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; +// export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ThisTypeAnnotation; +export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; +// export function assertThrowStatement(node: object | null | undefined, opts?: object | null): asserts node is ThrowStatement; +export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; +// export function assertTryStatement(node: object | null | undefined, opts?: object | null): asserts node is TryStatement; +export function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression; +// export function assertTupleExpression(node: object | null | undefined, opts?: object | null): asserts node is TupleExpression; +export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; +// export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TupleTypeAnnotation; +export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; +// export function assertTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is TypeAlias; +export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; +// export function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeAnnotation; +export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; +// export function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): asserts node is TypeCastExpression; +export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; +// export function assertTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TypeParameter; +export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; +// export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterDeclaration; +export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; +// export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterInstantiation; +export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; +// export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeofTypeAnnotation; +export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; +// export function assertUnaryExpression(node: object | null | undefined, opts?: object | null): asserts node is UnaryExpression; +export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; +// export function assertUnaryLike(node: object | null | undefined, opts?: object | null): asserts node is UnaryLike; +export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; +// export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is UnionTypeAnnotation; +export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; +// export function assertUpdateExpression(node: object | null | undefined, opts?: object | null): asserts node is UpdateExpression; +export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; +// export function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): asserts node is UserWhitespacable; +export function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier; +// export function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): asserts node is V8IntrinsicIdentifier; +export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; +// export function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclaration; +export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; +// export function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclarator; +export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; +// export function assertVariance(node: object | null | undefined, opts?: object | null): asserts node is Variance; +export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; +// export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is VoidTypeAnnotation; +export function isWhile(node: object | null | undefined, opts?: object | null): node is While; +// export function assertWhile(node: object | null | undefined, opts?: object | null): asserts node is While; +export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; +// export function assertWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is WhileStatement; +export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; +// export function assertWithStatement(node: object | null | undefined, opts?: object | null): asserts node is WithStatement; +export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; +// export function assertYieldExpression(node: object | null | undefined, opts?: object | null): asserts node is YieldExpression; +// export function assertNode(obj: any): asserts obj is Node +export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation +export function createUnionTypeAnnotation(types: [T]): T +export function createUnionTypeAnnotation(types: ReadonlyArray): UnionTypeAnnotation +export function buildChildren(node: { children: ReadonlyArray }): JSXElement['children'] +export function clone(n: T): T; +export function cloneDeep(n: T): T; +export function cloneDeepWithoutLoc(n: T): T; +export function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T; +export function cloneWithoutLoc(n: T): T; +export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' +export function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T +export function addComments(node: T, type: CommentTypeShorthand, comments: ReadonlyArray): T +export function inheritInnerComments(node: Node, parent: Node): void +export function inheritLeadingComments(node: Node, parent: Node): void +export function inheritsComments(node: T, parent: Node): void +export function inheritTrailingComments(node: Node, parent: Node): void +export function removeComments(node: T): T +export function ensureBlock(node: Extract): BlockStatement +export function ensureBlock = 'body'>(node: Extract>, key: K): BlockStatement +export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string +export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement +export function toComputedKey>(node: T, key?: Expression | Identifier): Expression +export function toExpression(node: Function): FunctionExpression +export function toExpression(node: Class): ClassExpression +export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression +export function toIdentifier(name: { toString(): string } | null | undefined): string +export function toKeyAlias(node: Method | Property, key?: Node): string +export function toSequenceExpression(nodes: ReadonlyArray, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined +export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement +export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement +export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined +export function toStatement(node: Class, ignore?: boolean): ClassDeclaration +export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined +export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration +export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined +export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement +export function valueToNode(value: undefined): Identifier +export function valueToNode(value: boolean): BooleanLiteral +export function valueToNode(value: null): NullLiteral +export function valueToNode(value: string): StringLiteral +export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression +export function valueToNode(value: RegExp): RegExpLiteral +export function valueToNode(value: ReadonlyArray): ArrayExpression +export function valueToNode(value: object): ObjectExpression +export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression +export function removeTypeDuplicates(types: ReadonlyArray): FlowType[] +export function appendToMemberExpression>(member: T, append: MemberExpression['property'], computed?: boolean): T +export function inherits(child: T, parent: Node | null | undefined): T +export function prependToMemberExpression>(member: T, prepend: MemberExpression['object']): T +export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void; +export function removePropertiesDeep( + n: T, + opts?: { preserveComments: boolean } | null +): T; +export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record> +export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record +export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record> +export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record> +export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record +export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record> +export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, +}>; +export type TraversalHandler = ( + this: undefined, node: Node, parent: TraversalAncestors, type: T +) => void; +export type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, +}; +export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void; +export function traverseFast(n: Node, h: TraversalHandler, state?: T): void; +export function shallowEqual(actual: object, expected: T): actual is T +export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression +export function is(type: T, n: Node | null | undefined, required?: undefined): n is Extract +export function is>(type: T, n: Node | null | undefined, required: Partial

): n is P +export function is

(type: string, n: Node | null | undefined, required: Partial

): n is P +export function is(type: string, n: Node | null | undefined, required?: Partial): n is Node +export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean +export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration +export function isImmutable(node: Node): node is Immutable +export function isLet(node: Node): node is VariableDeclaration +export function isNode(node: object | null | undefined): node is Node +export function isNodesEquivalent>(a: T, b: any): b is T +export function isNodesEquivalent(a: any, b: any): boolean +export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean +export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean +export function isScope(node: Node, parent: Node): node is Scopable +export function isSpecifierDefault(specifier: ModuleSpecifier): boolean +export function isType(nodetype: string, targetType: T): nodetype is T +export function isType(nodetype: string | null | undefined, targetType: string): boolean +export function isValidES3Identifier(name: string): boolean +export function isValidIdentifier(name: string): boolean +export function isVar(node: Node): node is VariableDeclaration +export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray, allowPartial?: boolean): node is MemberExpression +export function validate(n: Node | null | undefined, key: K, value: T[K]): void +export function validate(n: Node, key: string, value: any): void; diff --git a/packages/common/node_modules/@babel/types/lib/index.js b/packages/common/node_modules/@babel/types/lib/index.js new file mode 100644 index 0000000000..94bdf85a3e --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/index.js @@ -0,0 +1,588 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + react: true, + assertNode: true, + createTypeAnnotationBasedOnTypeof: true, + createUnionTypeAnnotation: true, + cloneNode: true, + clone: true, + cloneDeep: true, + cloneDeepWithoutLoc: true, + cloneWithoutLoc: true, + addComment: true, + addComments: true, + inheritInnerComments: true, + inheritLeadingComments: true, + inheritsComments: true, + inheritTrailingComments: true, + removeComments: true, + ensureBlock: true, + toBindingIdentifierName: true, + toBlock: true, + toComputedKey: true, + toExpression: true, + toIdentifier: true, + toKeyAlias: true, + toSequenceExpression: true, + toStatement: true, + valueToNode: true, + appendToMemberExpression: true, + inherits: true, + prependToMemberExpression: true, + removeProperties: true, + removePropertiesDeep: true, + removeTypeDuplicates: true, + getBindingIdentifiers: true, + getOuterBindingIdentifiers: true, + traverse: true, + traverseFast: true, + shallowEqual: true, + is: true, + isBinding: true, + isBlockScoped: true, + isImmutable: true, + isLet: true, + isNode: true, + isNodesEquivalent: true, + isPlaceholderType: true, + isReferenced: true, + isScope: true, + isSpecifierDefault: true, + isType: true, + isValidES3Identifier: true, + isValidIdentifier: true, + isVar: true, + matchesPattern: true, + validate: true, + buildMatchMemberExpression: true +}; +Object.defineProperty(exports, "assertNode", { + enumerable: true, + get: function () { + return _assertNode.default; + } +}); +Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function () { + return _createTypeAnnotationBasedOnTypeof.default; + } +}); +Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function () { + return _createUnionTypeAnnotation.default; + } +}); +Object.defineProperty(exports, "cloneNode", { + enumerable: true, + get: function () { + return _cloneNode.default; + } +}); +Object.defineProperty(exports, "clone", { + enumerable: true, + get: function () { + return _clone.default; + } +}); +Object.defineProperty(exports, "cloneDeep", { + enumerable: true, + get: function () { + return _cloneDeep.default; + } +}); +Object.defineProperty(exports, "cloneDeepWithoutLoc", { + enumerable: true, + get: function () { + return _cloneDeepWithoutLoc.default; + } +}); +Object.defineProperty(exports, "cloneWithoutLoc", { + enumerable: true, + get: function () { + return _cloneWithoutLoc.default; + } +}); +Object.defineProperty(exports, "addComment", { + enumerable: true, + get: function () { + return _addComment.default; + } +}); +Object.defineProperty(exports, "addComments", { + enumerable: true, + get: function () { + return _addComments.default; + } +}); +Object.defineProperty(exports, "inheritInnerComments", { + enumerable: true, + get: function () { + return _inheritInnerComments.default; + } +}); +Object.defineProperty(exports, "inheritLeadingComments", { + enumerable: true, + get: function () { + return _inheritLeadingComments.default; + } +}); +Object.defineProperty(exports, "inheritsComments", { + enumerable: true, + get: function () { + return _inheritsComments.default; + } +}); +Object.defineProperty(exports, "inheritTrailingComments", { + enumerable: true, + get: function () { + return _inheritTrailingComments.default; + } +}); +Object.defineProperty(exports, "removeComments", { + enumerable: true, + get: function () { + return _removeComments.default; + } +}); +Object.defineProperty(exports, "ensureBlock", { + enumerable: true, + get: function () { + return _ensureBlock.default; + } +}); +Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function () { + return _toBindingIdentifierName.default; + } +}); +Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function () { + return _toBlock.default; + } +}); +Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function () { + return _toComputedKey.default; + } +}); +Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function () { + return _toExpression.default; + } +}); +Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function () { + return _toIdentifier.default; + } +}); +Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function () { + return _toKeyAlias.default; + } +}); +Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function () { + return _toSequenceExpression.default; + } +}); +Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function () { + return _toStatement.default; + } +}); +Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function () { + return _valueToNode.default; + } +}); +Object.defineProperty(exports, "appendToMemberExpression", { + enumerable: true, + get: function () { + return _appendToMemberExpression.default; + } +}); +Object.defineProperty(exports, "inherits", { + enumerable: true, + get: function () { + return _inherits.default; + } +}); +Object.defineProperty(exports, "prependToMemberExpression", { + enumerable: true, + get: function () { + return _prependToMemberExpression.default; + } +}); +Object.defineProperty(exports, "removeProperties", { + enumerable: true, + get: function () { + return _removeProperties.default; + } +}); +Object.defineProperty(exports, "removePropertiesDeep", { + enumerable: true, + get: function () { + return _removePropertiesDeep.default; + } +}); +Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function () { + return _removeTypeDuplicates.default; + } +}); +Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function () { + return _getBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function () { + return _getOuterBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "traverse", { + enumerable: true, + get: function () { + return _traverse.default; + } +}); +Object.defineProperty(exports, "traverseFast", { + enumerable: true, + get: function () { + return _traverseFast.default; + } +}); +Object.defineProperty(exports, "shallowEqual", { + enumerable: true, + get: function () { + return _shallowEqual.default; + } +}); +Object.defineProperty(exports, "is", { + enumerable: true, + get: function () { + return _is.default; + } +}); +Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function () { + return _isBinding.default; + } +}); +Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function () { + return _isBlockScoped.default; + } +}); +Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function () { + return _isImmutable.default; + } +}); +Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function () { + return _isLet.default; + } +}); +Object.defineProperty(exports, "isNode", { + enumerable: true, + get: function () { + return _isNode.default; + } +}); +Object.defineProperty(exports, "isNodesEquivalent", { + enumerable: true, + get: function () { + return _isNodesEquivalent.default; + } +}); +Object.defineProperty(exports, "isPlaceholderType", { + enumerable: true, + get: function () { + return _isPlaceholderType.default; + } +}); +Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function () { + return _isReferenced.default; + } +}); +Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function () { + return _isScope.default; + } +}); +Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function () { + return _isSpecifierDefault.default; + } +}); +Object.defineProperty(exports, "isType", { + enumerable: true, + get: function () { + return _isType.default; + } +}); +Object.defineProperty(exports, "isValidES3Identifier", { + enumerable: true, + get: function () { + return _isValidES3Identifier.default; + } +}); +Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function () { + return _isValidIdentifier.default; + } +}); +Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function () { + return _isVar.default; + } +}); +Object.defineProperty(exports, "matchesPattern", { + enumerable: true, + get: function () { + return _matchesPattern.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "buildMatchMemberExpression", { + enumerable: true, + get: function () { + return _buildMatchMemberExpression.default; + } +}); +exports.react = void 0; + +var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); + +var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); + +var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); + +var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); + +var _generated = require("./asserts/generated"); + +Object.keys(_generated).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated[key]; + } + }); +}); + +var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); + +var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); + +var _generated2 = require("./builders/generated"); + +Object.keys(_generated2).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated2[key]; + } + }); +}); + +var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); + +var _clone = _interopRequireDefault(require("./clone/clone")); + +var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); + +var _cloneDeepWithoutLoc = _interopRequireDefault(require("./clone/cloneDeepWithoutLoc")); + +var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); + +var _addComment = _interopRequireDefault(require("./comments/addComment")); + +var _addComments = _interopRequireDefault(require("./comments/addComments")); + +var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); + +var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); + +var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); + +var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); + +var _removeComments = _interopRequireDefault(require("./comments/removeComments")); + +var _generated3 = require("./constants/generated"); + +Object.keys(_generated3).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated3[key]; + } + }); +}); + +var _constants = require("./constants"); + +Object.keys(_constants).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _constants[key]; + } + }); +}); + +var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); + +var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); + +var _toBlock = _interopRequireDefault(require("./converters/toBlock")); + +var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); + +var _toExpression = _interopRequireDefault(require("./converters/toExpression")); + +var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); + +var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); + +var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); + +var _toStatement = _interopRequireDefault(require("./converters/toStatement")); + +var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); + +var _definitions = require("./definitions"); + +Object.keys(_definitions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _definitions[key]; + } + }); +}); + +var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); + +var _inherits = _interopRequireDefault(require("./modifications/inherits")); + +var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); + +var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); + +var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); + +var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); + +var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); + +var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); + +var _traverse = _interopRequireDefault(require("./traverse/traverse")); + +var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); + +var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); + +var _is = _interopRequireDefault(require("./validators/is")); + +var _isBinding = _interopRequireDefault(require("./validators/isBinding")); + +var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); + +var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); + +var _isLet = _interopRequireDefault(require("./validators/isLet")); + +var _isNode = _interopRequireDefault(require("./validators/isNode")); + +var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); + +var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType")); + +var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); + +var _isScope = _interopRequireDefault(require("./validators/isScope")); + +var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); + +var _isType = _interopRequireDefault(require("./validators/isType")); + +var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); + +var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); + +var _isVar = _interopRequireDefault(require("./validators/isVar")); + +var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); + +var _validate = _interopRequireDefault(require("./validators/validate")); + +var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); + +var _generated4 = require("./validators/generated"); + +Object.keys(_generated4).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated4[key]; + } + }); +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const react = { + isReactComponent: _isReactComponent.default, + isCompatTag: _isCompatTag.default, + buildChildren: _buildChildren.default +}; +exports.react = react; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/index.js.flow b/packages/common/node_modules/@babel/types/lib/index.js.flow new file mode 100644 index 0000000000..c536937f80 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/index.js.flow @@ -0,0 +1,2138 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class BabelNodeComment { + value: string; + start: number; + end: number; + loc: BabelNodeSourceLocation; +} + +declare class BabelNodeCommentBlock extends BabelNodeComment { + type: "CommentBlock"; +} + +declare class BabelNodeCommentLine extends BabelNodeComment { + type: "CommentLine"; +} + +declare class BabelNodeSourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class BabelNode { + leadingComments?: Array; + innerComments?: Array; + trailingComments?: Array; + start: ?number; + end: ?number; + loc: ?BabelNodeSourceLocation; +} + +declare class BabelNodeArrayExpression extends BabelNode { + type: "ArrayExpression"; + elements?: Array; +} + +declare class BabelNodeAssignmentExpression extends BabelNode { + type: "AssignmentExpression"; + operator: string; + left: BabelNodeLVal; + right: BabelNodeExpression; +} + +declare class BabelNodeBinaryExpression extends BabelNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: BabelNodeExpression; + right: BabelNodeExpression; +} + +declare class BabelNodeInterpreterDirective extends BabelNode { + type: "InterpreterDirective"; + value: string; +} + +declare class BabelNodeDirective extends BabelNode { + type: "Directive"; + value: BabelNodeDirectiveLiteral; +} + +declare class BabelNodeDirectiveLiteral extends BabelNode { + type: "DirectiveLiteral"; + value: string; +} + +declare class BabelNodeBlockStatement extends BabelNode { + type: "BlockStatement"; + body: Array; + directives?: Array; +} + +declare class BabelNodeBreakStatement extends BabelNode { + type: "BreakStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeCallExpression extends BabelNode { + type: "CallExpression"; + callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; + arguments: Array; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeCatchClause extends BabelNode { + type: "CatchClause"; + param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern; + body: BabelNodeBlockStatement; +} + +declare class BabelNodeConditionalExpression extends BabelNode { + type: "ConditionalExpression"; + test: BabelNodeExpression; + consequent: BabelNodeExpression; + alternate: BabelNodeExpression; +} + +declare class BabelNodeContinueStatement extends BabelNode { + type: "ContinueStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeDebuggerStatement extends BabelNode { + type: "DebuggerStatement"; +} + +declare class BabelNodeDoWhileStatement extends BabelNode { + type: "DoWhileStatement"; + test: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeEmptyStatement extends BabelNode { + type: "EmptyStatement"; +} + +declare class BabelNodeExpressionStatement extends BabelNode { + type: "ExpressionStatement"; + expression: BabelNodeExpression; +} + +declare class BabelNodeFile extends BabelNode { + type: "File"; + program: BabelNodeProgram; + comments: any; + tokens: any; +} + +declare class BabelNodeForInStatement extends BabelNode { + type: "ForInStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeForStatement extends BabelNode { + type: "ForStatement"; + init?: BabelNodeVariableDeclaration | BabelNodeExpression; + test?: BabelNodeExpression; + update?: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeFunctionDeclaration extends BabelNode { + type: "FunctionDeclaration"; + id?: BabelNodeIdentifier; + params: Array; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + declare?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeFunctionExpression extends BabelNode { + type: "FunctionExpression"; + id?: BabelNodeIdentifier; + params: Array; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeIdentifier extends BabelNode { + type: "Identifier"; + name: any; + decorators?: Array; + optional?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeIfStatement extends BabelNode { + type: "IfStatement"; + test: BabelNodeExpression; + consequent: BabelNodeStatement; + alternate?: BabelNodeStatement; +} + +declare class BabelNodeLabeledStatement extends BabelNode { + type: "LabeledStatement"; + label: BabelNodeIdentifier; + body: BabelNodeStatement; +} + +declare class BabelNodeStringLiteral extends BabelNode { + type: "StringLiteral"; + value: string; +} + +declare class BabelNodeNumericLiteral extends BabelNode { + type: "NumericLiteral"; + value: number; +} + +declare class BabelNodeNullLiteral extends BabelNode { + type: "NullLiteral"; +} + +declare class BabelNodeBooleanLiteral extends BabelNode { + type: "BooleanLiteral"; + value: boolean; +} + +declare class BabelNodeRegExpLiteral extends BabelNode { + type: "RegExpLiteral"; + pattern: string; + flags?: any; +} + +declare class BabelNodeLogicalExpression extends BabelNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: BabelNodeExpression; + right: BabelNodeExpression; +} + +declare class BabelNodeMemberExpression extends BabelNode { + type: "MemberExpression"; + object: BabelNodeExpression; + property: any; + computed?: boolean; + optional?: true | false; +} + +declare class BabelNodeNewExpression extends BabelNode { + type: "NewExpression"; + callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; + arguments: Array; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeProgram extends BabelNode { + type: "Program"; + body: Array; + directives?: Array; + sourceType?: "script" | "module"; + interpreter?: BabelNodeInterpreterDirective; + sourceFile: string; +} + +declare class BabelNodeObjectExpression extends BabelNode { + type: "ObjectExpression"; + properties: Array; +} + +declare class BabelNodeObjectMethod extends BabelNode { + type: "ObjectMethod"; + kind?: "method" | "get" | "set"; + key: any; + params: Array; + body: BabelNodeBlockStatement; + computed?: boolean; + generator?: boolean; + async?: boolean; + decorators?: Array; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectProperty extends BabelNode { + type: "ObjectProperty"; + key: any; + value: BabelNodeExpression | BabelNodePatternLike; + computed?: boolean; + shorthand?: any; + decorators?: Array; +} + +declare class BabelNodeRestElement extends BabelNode { + type: "RestElement"; + argument: BabelNodeLVal; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeReturnStatement extends BabelNode { + type: "ReturnStatement"; + argument?: BabelNodeExpression; +} + +declare class BabelNodeSequenceExpression extends BabelNode { + type: "SequenceExpression"; + expressions: Array; +} + +declare class BabelNodeParenthesizedExpression extends BabelNode { + type: "ParenthesizedExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeSwitchCase extends BabelNode { + type: "SwitchCase"; + test?: BabelNodeExpression; + consequent: Array; +} + +declare class BabelNodeSwitchStatement extends BabelNode { + type: "SwitchStatement"; + discriminant: BabelNodeExpression; + cases: Array; +} + +declare class BabelNodeThisExpression extends BabelNode { + type: "ThisExpression"; +} + +declare class BabelNodeThrowStatement extends BabelNode { + type: "ThrowStatement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeTryStatement extends BabelNode { + type: "TryStatement"; + block: any; + handler?: BabelNodeCatchClause; + finalizer?: BabelNodeBlockStatement; +} + +declare class BabelNodeUnaryExpression extends BabelNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeUpdateExpression extends BabelNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeVariableDeclaration extends BabelNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array; + declare?: boolean; +} + +declare class BabelNodeVariableDeclarator extends BabelNode { + type: "VariableDeclarator"; + id: BabelNodeLVal; + init?: BabelNodeExpression; + definite?: boolean; +} + +declare class BabelNodeWhileStatement extends BabelNode { + type: "WhileStatement"; + test: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeWithStatement extends BabelNode { + type: "WithStatement"; + object: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeAssignmentPattern extends BabelNode { + type: "AssignmentPattern"; + left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression; + right: BabelNodeExpression; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrayPattern extends BabelNode { + type: "ArrayPattern"; + elements: Array; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrowFunctionExpression extends BabelNode { + type: "ArrowFunctionExpression"; + params: Array; + body: BabelNodeBlockStatement | BabelNodeExpression; + async?: boolean; + expression: boolean; + generator?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassBody extends BabelNode { + type: "ClassBody"; + body: Array; +} + +declare class BabelNodeClassExpression extends BabelNode { + type: "ClassExpression"; + id?: BabelNodeIdentifier; + superClass?: BabelNodeExpression; + body: BabelNodeClassBody; + decorators?: Array; + mixins: any; + superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassDeclaration extends BabelNode { + type: "ClassDeclaration"; + id: any; + superClass: any; + body: any; + decorators: any; + abstract?: boolean; + declare?: boolean; + mixins: any; + superTypeParameters: any; + typeParameters: any; +} + +declare class BabelNodeExportAllDeclaration extends BabelNode { + type: "ExportAllDeclaration"; + source: BabelNodeStringLiteral; +} + +declare class BabelNodeExportDefaultDeclaration extends BabelNode { + type: "ExportDefaultDeclaration"; + declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; +} + +declare class BabelNodeExportNamedDeclaration extends BabelNode { + type: "ExportNamedDeclaration"; + declaration?: any; + specifiers?: Array; + source?: BabelNodeStringLiteral; + exportKind?: "type" | "value"; +} + +declare class BabelNodeExportSpecifier extends BabelNode { + type: "ExportSpecifier"; + local: BabelNodeIdentifier; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeForOfStatement extends BabelNode { + type: "ForOfStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeImportDeclaration extends BabelNode { + type: "ImportDeclaration"; + specifiers: Array; + source: BabelNodeStringLiteral; + importKind?: "type" | "typeof" | "value"; +} + +declare class BabelNodeImportDefaultSpecifier extends BabelNode { + type: "ImportDefaultSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportNamespaceSpecifier extends BabelNode { + type: "ImportNamespaceSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportSpecifier extends BabelNode { + type: "ImportSpecifier"; + local: BabelNodeIdentifier; + imported: BabelNodeIdentifier; + importKind?: "type" | "typeof"; +} + +declare class BabelNodeMetaProperty extends BabelNode { + type: "MetaProperty"; + meta: any; + property: BabelNodeIdentifier; +} + +declare class BabelNodeClassMethod extends BabelNode { + type: "ClassMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + params: Array; + body: BabelNodeBlockStatement; + computed?: boolean; + generator?: boolean; + async?: boolean; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + decorators?: Array; + optional?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectPattern extends BabelNode { + type: "ObjectPattern"; + properties: Array; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeSpreadElement extends BabelNode { + type: "SpreadElement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeSuper extends BabelNode { + type: "Super"; +} + +declare class BabelNodeTaggedTemplateExpression extends BabelNode { + type: "TaggedTemplateExpression"; + tag: BabelNodeExpression; + quasi: BabelNodeTemplateLiteral; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTemplateElement extends BabelNode { + type: "TemplateElement"; + value: { raw: string, cooked?: string }; + tail?: boolean; +} + +declare class BabelNodeTemplateLiteral extends BabelNode { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +declare class BabelNodeYieldExpression extends BabelNode { + type: "YieldExpression"; + argument?: BabelNodeExpression; + delegate?: any; +} + +declare class BabelNodeAnyTypeAnnotation extends BabelNode { + type: "AnyTypeAnnotation"; +} + +declare class BabelNodeArrayTypeAnnotation extends BabelNode { + type: "ArrayTypeAnnotation"; + elementType: BabelNodeFlowType; +} + +declare class BabelNodeBooleanTypeAnnotation extends BabelNode { + type: "BooleanTypeAnnotation"; +} + +declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { + type: "NullLiteralTypeAnnotation"; +} + +declare class BabelNodeClassImplements extends BabelNode { + type: "ClassImplements"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeDeclareClass extends BabelNode { + type: "DeclareClass"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeDeclareFunction extends BabelNode { + type: "DeclareFunction"; + id: BabelNodeIdentifier; + predicate?: BabelNodeDeclaredPredicate; +} + +declare class BabelNodeDeclareInterface extends BabelNode { + type: "DeclareInterface"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeDeclareModule extends BabelNode { + type: "DeclareModule"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeBlockStatement; + kind?: "CommonJS" | "ES"; +} + +declare class BabelNodeDeclareModuleExports extends BabelNode { + type: "DeclareModuleExports"; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeDeclareTypeAlias extends BabelNode { + type: "DeclareTypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeDeclareOpaqueType extends BabelNode { + type: "DeclareOpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; +} + +declare class BabelNodeDeclareVariable extends BabelNode { + type: "DeclareVariable"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeDeclareExportDeclaration extends BabelNode { + type: "DeclareExportDeclaration"; + declaration?: BabelNodeFlow; + specifiers?: Array; + source?: BabelNodeStringLiteral; +} + +declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { + type: "DeclareExportAllDeclaration"; + source: BabelNodeStringLiteral; + exportKind?: "type" | "value"; +} + +declare class BabelNodeDeclaredPredicate extends BabelNode { + type: "DeclaredPredicate"; + value: BabelNodeFlow; +} + +declare class BabelNodeExistsTypeAnnotation extends BabelNode { + type: "ExistsTypeAnnotation"; +} + +declare class BabelNodeFunctionTypeAnnotation extends BabelNode { + type: "FunctionTypeAnnotation"; + typeParameters?: BabelNodeTypeParameterDeclaration; + params: Array; + rest?: BabelNodeFunctionTypeParam; + returnType: BabelNodeFlowType; +} + +declare class BabelNodeFunctionTypeParam extends BabelNode { + type: "FunctionTypeParam"; + name?: BabelNodeIdentifier; + typeAnnotation: BabelNodeFlowType; + optional?: boolean; +} + +declare class BabelNodeGenericTypeAnnotation extends BabelNode { + type: "GenericTypeAnnotation"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInferredPredicate extends BabelNode { + type: "InferredPredicate"; +} + +declare class BabelNodeInterfaceExtends extends BabelNode { + type: "InterfaceExtends"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInterfaceDeclaration extends BabelNode { + type: "InterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { + type: "InterfaceTypeAnnotation"; + body: BabelNodeObjectTypeAnnotation; +} + +declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { + type: "IntersectionTypeAnnotation"; + types: Array; +} + +declare class BabelNodeMixedTypeAnnotation extends BabelNode { + type: "MixedTypeAnnotation"; +} + +declare class BabelNodeEmptyTypeAnnotation extends BabelNode { + type: "EmptyTypeAnnotation"; +} + +declare class BabelNodeNullableTypeAnnotation extends BabelNode { + type: "NullableTypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +declare class BabelNodeNumberTypeAnnotation extends BabelNode { + type: "NumberTypeAnnotation"; +} + +declare class BabelNodeObjectTypeAnnotation extends BabelNode { + type: "ObjectTypeAnnotation"; + properties: Array; + indexers?: Array; + callProperties?: Array; + internalSlots?: Array; + exact?: boolean; + inexact?: boolean; +} + +declare class BabelNodeObjectTypeInternalSlot extends BabelNode { + type: "ObjectTypeInternalSlot"; + id: BabelNodeIdentifier; + value: BabelNodeFlowType; + optional: boolean; + method: boolean; +} + +declare class BabelNodeObjectTypeCallProperty extends BabelNode { + type: "ObjectTypeCallProperty"; + value: BabelNodeFlowType; +} + +declare class BabelNodeObjectTypeIndexer extends BabelNode { + type: "ObjectTypeIndexer"; + id?: BabelNodeIdentifier; + key: BabelNodeFlowType; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; +} + +declare class BabelNodeObjectTypeProperty extends BabelNode { + type: "ObjectTypeProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; + kind: "init" | "get" | "set"; + optional: boolean; + proto: boolean; +} + +declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { + type: "ObjectTypeSpreadProperty"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeOpaqueType extends BabelNode { + type: "OpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; + impltype: BabelNodeFlowType; +} + +declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { + type: "QualifiedTypeIdentifier"; + id: BabelNodeIdentifier; + qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; +} + +declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +declare class BabelNodeStringTypeAnnotation extends BabelNode { + type: "StringTypeAnnotation"; +} + +declare class BabelNodeSymbolTypeAnnotation extends BabelNode { + type: "SymbolTypeAnnotation"; +} + +declare class BabelNodeThisTypeAnnotation extends BabelNode { + type: "ThisTypeAnnotation"; +} + +declare class BabelNodeTupleTypeAnnotation extends BabelNode { + type: "TupleTypeAnnotation"; + types: Array; +} + +declare class BabelNodeTypeofTypeAnnotation extends BabelNode { + type: "TypeofTypeAnnotation"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeTypeAlias extends BabelNode { + type: "TypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeTypeAnnotation extends BabelNode { + type: "TypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeTypeCastExpression extends BabelNode { + type: "TypeCastExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeTypeParameter extends BabelNode { + type: "TypeParameter"; + bound?: BabelNodeTypeAnnotation; + variance?: BabelNodeVariance; + name: string; +} + +declare class BabelNodeTypeParameterDeclaration extends BabelNode { + type: "TypeParameterDeclaration"; + params: Array; +} + +declare class BabelNodeTypeParameterInstantiation extends BabelNode { + type: "TypeParameterInstantiation"; + params: Array; +} + +declare class BabelNodeUnionTypeAnnotation extends BabelNode { + type: "UnionTypeAnnotation"; + types: Array; +} + +declare class BabelNodeVariance extends BabelNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +declare class BabelNodeVoidTypeAnnotation extends BabelNode { + type: "VoidTypeAnnotation"; +} + +declare class BabelNodeEnumDeclaration extends BabelNode { + type: "EnumDeclaration"; + id: BabelNodeIdentifier; + body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; +} + +declare class BabelNodeEnumBooleanBody extends BabelNode { + type: "EnumBooleanBody"; + members: Array; + explicit: boolean; +} + +declare class BabelNodeEnumNumberBody extends BabelNode { + type: "EnumNumberBody"; + members: Array; + explicit: boolean; +} + +declare class BabelNodeEnumStringBody extends BabelNode { + type: "EnumStringBody"; + members: Array; + explicit: boolean; +} + +declare class BabelNodeEnumSymbolBody extends BabelNode { + type: "EnumSymbolBody"; + members: Array; +} + +declare class BabelNodeEnumBooleanMember extends BabelNode { + type: "EnumBooleanMember"; + id: BabelNodeIdentifier; + init: BabelNodeBooleanLiteral; +} + +declare class BabelNodeEnumNumberMember extends BabelNode { + type: "EnumNumberMember"; + id: BabelNodeIdentifier; + init: BabelNodeNumericLiteral; +} + +declare class BabelNodeEnumStringMember extends BabelNode { + type: "EnumStringMember"; + id: BabelNodeIdentifier; + init: BabelNodeStringLiteral; +} + +declare class BabelNodeEnumDefaultedMember extends BabelNode { + type: "EnumDefaultedMember"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeJSXAttribute extends BabelNode { + type: "JSXAttribute"; + name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; + value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; +} + +declare class BabelNodeJSXClosingElement extends BabelNode { + type: "JSXClosingElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; +} + +declare class BabelNodeJSXElement extends BabelNode { + type: "JSXElement"; + openingElement: BabelNodeJSXOpeningElement; + closingElement?: BabelNodeJSXClosingElement; + children: Array; + selfClosing: any; +} + +declare class BabelNodeJSXEmptyExpression extends BabelNode { + type: "JSXEmptyExpression"; +} + +declare class BabelNodeJSXExpressionContainer extends BabelNode { + type: "JSXExpressionContainer"; + expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; +} + +declare class BabelNodeJSXSpreadChild extends BabelNode { + type: "JSXSpreadChild"; + expression: BabelNodeExpression; +} + +declare class BabelNodeJSXIdentifier extends BabelNode { + type: "JSXIdentifier"; + name: string; +} + +declare class BabelNodeJSXMemberExpression extends BabelNode { + type: "JSXMemberExpression"; + object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; + property: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXNamespacedName extends BabelNode { + type: "JSXNamespacedName"; + namespace: BabelNodeJSXIdentifier; + name: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXOpeningElement extends BabelNode { + type: "JSXOpeningElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; + attributes: Array; + selfClosing?: boolean; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeJSXSpreadAttribute extends BabelNode { + type: "JSXSpreadAttribute"; + argument: BabelNodeExpression; +} + +declare class BabelNodeJSXText extends BabelNode { + type: "JSXText"; + value: string; +} + +declare class BabelNodeJSXFragment extends BabelNode { + type: "JSXFragment"; + openingFragment: BabelNodeJSXOpeningFragment; + closingFragment: BabelNodeJSXClosingFragment; + children: Array; +} + +declare class BabelNodeJSXOpeningFragment extends BabelNode { + type: "JSXOpeningFragment"; +} + +declare class BabelNodeJSXClosingFragment extends BabelNode { + type: "JSXClosingFragment"; +} + +declare class BabelNodeNoop extends BabelNode { + type: "Noop"; +} + +declare class BabelNodePlaceholder extends BabelNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: BabelNodeIdentifier; +} + +declare class BabelNodeV8IntrinsicIdentifier extends BabelNode { + type: "V8IntrinsicIdentifier"; + name: string; +} + +declare class BabelNodeArgumentPlaceholder extends BabelNode { + type: "ArgumentPlaceholder"; +} + +declare class BabelNodeAwaitExpression extends BabelNode { + type: "AwaitExpression"; + argument: BabelNodeExpression; +} + +declare class BabelNodeBindExpression extends BabelNode { + type: "BindExpression"; + object: any; + callee: any; +} + +declare class BabelNodeClassProperty extends BabelNode { + type: "ClassProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + value?: BabelNodeExpression; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + decorators?: Array; + computed?: boolean; + abstract?: boolean; + accessibility?: "public" | "private" | "protected"; + declare?: boolean; + definite?: boolean; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeOptionalMemberExpression extends BabelNode { + type: "OptionalMemberExpression"; + object: BabelNodeExpression; + property: any; + computed?: boolean; + optional: boolean; +} + +declare class BabelNodePipelineTopicExpression extends BabelNode { + type: "PipelineTopicExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodePipelineBareFunction extends BabelNode { + type: "PipelineBareFunction"; + callee: BabelNodeExpression; +} + +declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { + type: "PipelinePrimaryTopicReference"; +} + +declare class BabelNodeOptionalCallExpression extends BabelNode { + type: "OptionalCallExpression"; + callee: BabelNodeExpression; + arguments: Array; + optional: boolean; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeClassPrivateProperty extends BabelNode { + type: "ClassPrivateProperty"; + key: BabelNodePrivateName; + value?: BabelNodeExpression; + decorators?: Array; +} + +declare class BabelNodeClassPrivateMethod extends BabelNode { + type: "ClassPrivateMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodePrivateName; + params: Array; + body: BabelNodeBlockStatement; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + decorators?: Array; + generator?: boolean; + optional?: boolean; + returnType: any; + typeParameters: any; +} + +declare class BabelNodeImport extends BabelNode { + type: "Import"; +} + +declare class BabelNodeDecorator extends BabelNode { + type: "Decorator"; + expression: BabelNodeExpression; +} + +declare class BabelNodeDoExpression extends BabelNode { + type: "DoExpression"; + body: BabelNodeBlockStatement; +} + +declare class BabelNodeExportDefaultSpecifier extends BabelNode { + type: "ExportDefaultSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeExportNamespaceSpecifier extends BabelNode { + type: "ExportNamespaceSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodePrivateName extends BabelNode { + type: "PrivateName"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeBigIntLiteral extends BabelNode { + type: "BigIntLiteral"; + value: string; +} + +declare class BabelNodeRecordExpression extends BabelNode { + type: "RecordExpression"; + properties: Array; +} + +declare class BabelNodeTupleExpression extends BabelNode { + type: "TupleExpression"; + elements?: Array; +} + +declare class BabelNodeTSParameterProperty extends BabelNode { + type: "TSParameterProperty"; + parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; + accessibility?: "public" | "private" | "protected"; + readonly?: boolean; +} + +declare class BabelNodeTSDeclareFunction extends BabelNode { + type: "TSDeclareFunction"; + id?: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + async?: boolean; + declare?: boolean; + generator?: boolean; +} + +declare class BabelNodeTSDeclareMethod extends BabelNode { + type: "TSDeclareMethod"; + decorators?: Array; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + generator?: boolean; + kind?: "get" | "set" | "method" | "constructor"; + optional?: boolean; +} + +declare class BabelNodeTSQualifiedName extends BabelNode { + type: "TSQualifiedName"; + left: BabelNodeTSEntityName; + right: BabelNodeIdentifier; +} + +declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { + type: "TSCallSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { + type: "TSConstructSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSPropertySignature extends BabelNode { + type: "TSPropertySignature"; + key: BabelNodeExpression; + typeAnnotation?: BabelNodeTSTypeAnnotation; + initializer?: BabelNodeExpression; + computed?: boolean; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSMethodSignature extends BabelNode { + type: "TSMethodSignature"; + key: BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; + computed?: boolean; + optional?: boolean; +} + +declare class BabelNodeTSIndexSignature extends BabelNode { + type: "TSIndexSignature"; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; + readonly?: boolean; +} + +declare class BabelNodeTSAnyKeyword extends BabelNode { + type: "TSAnyKeyword"; +} + +declare class BabelNodeTSBooleanKeyword extends BabelNode { + type: "TSBooleanKeyword"; +} + +declare class BabelNodeTSBigIntKeyword extends BabelNode { + type: "TSBigIntKeyword"; +} + +declare class BabelNodeTSNeverKeyword extends BabelNode { + type: "TSNeverKeyword"; +} + +declare class BabelNodeTSNullKeyword extends BabelNode { + type: "TSNullKeyword"; +} + +declare class BabelNodeTSNumberKeyword extends BabelNode { + type: "TSNumberKeyword"; +} + +declare class BabelNodeTSObjectKeyword extends BabelNode { + type: "TSObjectKeyword"; +} + +declare class BabelNodeTSStringKeyword extends BabelNode { + type: "TSStringKeyword"; +} + +declare class BabelNodeTSSymbolKeyword extends BabelNode { + type: "TSSymbolKeyword"; +} + +declare class BabelNodeTSUndefinedKeyword extends BabelNode { + type: "TSUndefinedKeyword"; +} + +declare class BabelNodeTSUnknownKeyword extends BabelNode { + type: "TSUnknownKeyword"; +} + +declare class BabelNodeTSVoidKeyword extends BabelNode { + type: "TSVoidKeyword"; +} + +declare class BabelNodeTSThisType extends BabelNode { + type: "TSThisType"; +} + +declare class BabelNodeTSFunctionType extends BabelNode { + type: "TSFunctionType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructorType extends BabelNode { + type: "TSConstructorType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSTypeReference extends BabelNode { + type: "TSTypeReference"; + typeName: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSTypePredicate extends BabelNode { + type: "TSTypePredicate"; + parameterName: BabelNodeIdentifier | BabelNodeTSThisType; + typeAnnotation?: BabelNodeTSTypeAnnotation; + asserts?: boolean; +} + +declare class BabelNodeTSTypeQuery extends BabelNode { + type: "TSTypeQuery"; + exprName: BabelNodeTSEntityName | BabelNodeTSImportType; +} + +declare class BabelNodeTSTypeLiteral extends BabelNode { + type: "TSTypeLiteral"; + members: Array; +} + +declare class BabelNodeTSArrayType extends BabelNode { + type: "TSArrayType"; + elementType: BabelNodeTSType; +} + +declare class BabelNodeTSTupleType extends BabelNode { + type: "TSTupleType"; + elementTypes: Array; +} + +declare class BabelNodeTSOptionalType extends BabelNode { + type: "TSOptionalType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSRestType extends BabelNode { + type: "TSRestType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSUnionType extends BabelNode { + type: "TSUnionType"; + types: Array; +} + +declare class BabelNodeTSIntersectionType extends BabelNode { + type: "TSIntersectionType"; + types: Array; +} + +declare class BabelNodeTSConditionalType extends BabelNode { + type: "TSConditionalType"; + checkType: BabelNodeTSType; + extendsType: BabelNodeTSType; + trueType: BabelNodeTSType; + falseType: BabelNodeTSType; +} + +declare class BabelNodeTSInferType extends BabelNode { + type: "TSInferType"; + typeParameter: BabelNodeTSTypeParameter; +} + +declare class BabelNodeTSParenthesizedType extends BabelNode { + type: "TSParenthesizedType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeOperator extends BabelNode { + type: "TSTypeOperator"; + typeAnnotation: BabelNodeTSType; + operator: string; +} + +declare class BabelNodeTSIndexedAccessType extends BabelNode { + type: "TSIndexedAccessType"; + objectType: BabelNodeTSType; + indexType: BabelNodeTSType; +} + +declare class BabelNodeTSMappedType extends BabelNode { + type: "TSMappedType"; + typeParameter: BabelNodeTSTypeParameter; + typeAnnotation?: BabelNodeTSType; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSLiteralType extends BabelNode { + type: "TSLiteralType"; + literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; +} + +declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { + type: "TSExpressionWithTypeArguments"; + expression: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSInterfaceDeclaration extends BabelNode { + type: "TSInterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + body: BabelNodeTSInterfaceBody; + declare?: boolean; +} + +declare class BabelNodeTSInterfaceBody extends BabelNode { + type: "TSInterfaceBody"; + body: Array; +} + +declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { + type: "TSTypeAliasDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + typeAnnotation: BabelNodeTSType; + declare?: boolean; +} + +declare class BabelNodeTSAsExpression extends BabelNode { + type: "TSAsExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeAssertion extends BabelNode { + type: "TSTypeAssertion"; + typeAnnotation: BabelNodeTSType; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSEnumDeclaration extends BabelNode { + type: "TSEnumDeclaration"; + id: BabelNodeIdentifier; + members: Array; + declare?: boolean; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSEnumMember extends BabelNode { + type: "TSEnumMember"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSModuleDeclaration extends BabelNode { + type: "TSModuleDeclaration"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; + declare?: boolean; + global?: boolean; +} + +declare class BabelNodeTSModuleBlock extends BabelNode { + type: "TSModuleBlock"; + body: Array; +} + +declare class BabelNodeTSImportType extends BabelNode { + type: "TSImportType"; + argument: BabelNodeStringLiteral; + qualifier?: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { + type: "TSImportEqualsDeclaration"; + id: BabelNodeIdentifier; + moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; + isExport: boolean; +} + +declare class BabelNodeTSExternalModuleReference extends BabelNode { + type: "TSExternalModuleReference"; + expression: BabelNodeStringLiteral; +} + +declare class BabelNodeTSNonNullExpression extends BabelNode { + type: "TSNonNullExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSExportAssignment extends BabelNode { + type: "TSExportAssignment"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { + type: "TSNamespaceExportDeclaration"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeTSTypeAnnotation extends BabelNode { + type: "TSTypeAnnotation"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { + type: "TSTypeParameterInstantiation"; + params: Array; +} + +declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { + type: "TSTypeParameterDeclaration"; + params: Array; +} + +declare class BabelNodeTSTypeParameter extends BabelNode { + type: "TSTypeParameter"; + constraint?: BabelNodeTSType; + name: string; +} + +type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeRecordExpression | BabelNodeTupleExpression | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; +type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; +type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; +type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; +type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock; +type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; +type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; +type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; +type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; +type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; +type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; +type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; +type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; +type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; +type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeArrowFunctionExpression | BabelNodeBigIntLiteral; +type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; +type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; +type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; +type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral; +type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral; +type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; +type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; +type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; +type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; +type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration; +type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; +type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; +type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; +type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; +type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; +type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; +type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember; +type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; +type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; +type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; +type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; + +declare module "@babel/types" { + declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; + declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; + declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; + declare function interpreterDirective(value: string): BabelNodeInterpreterDirective; + declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; + declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; + declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; + declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; + declare function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array): BabelNodeCallExpression; + declare function catchClause(param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause; + declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; + declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; + declare function debuggerStatement(): BabelNodeDebuggerStatement; + declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; + declare function emptyStatement(): BabelNodeEmptyStatement; + declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; + declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; + declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; + declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; + declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionDeclaration; + declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionExpression; + declare function identifier(name: any): BabelNodeIdentifier; + declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; + declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; + declare function stringLiteral(value: string): BabelNodeStringLiteral; + declare function numericLiteral(value: number): BabelNodeNumericLiteral; + declare function nullLiteral(): BabelNodeNullLiteral; + declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; + declare function regExpLiteral(pattern: string, flags?: any): BabelNodeRegExpLiteral; + declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; + declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; + declare function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array): BabelNodeNewExpression; + declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram; + declare function objectExpression(properties: Array): BabelNodeObjectExpression; + declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, generator?: boolean, async?: boolean): BabelNodeObjectMethod; + declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: any, decorators?: Array): BabelNodeObjectProperty; + declare function restElement(argument: BabelNodeLVal): BabelNodeRestElement; + declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; + declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; + declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; + declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; + declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; + declare function thisExpression(): BabelNodeThisExpression; + declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; + declare function tryStatement(block: any, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; + declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; + declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; + declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array): BabelNodeVariableDeclaration; + declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression): BabelNodeVariableDeclarator; + declare function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement; + declare function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement; + declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern; + declare function arrayPattern(elements: Array): BabelNodeArrayPattern; + declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean): BabelNodeArrowFunctionExpression; + declare function classBody(body: Array): BabelNodeClassBody; + declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array): BabelNodeClassExpression; + declare function classDeclaration(id: any, superClass: any, body: any, decorators: any): BabelNodeClassDeclaration; + declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; + declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; + declare function exportNamedDeclaration(declaration?: any, specifiers?: Array, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration; + declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; + declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; + declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral): BabelNodeImportDeclaration; + declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; + declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; + declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier): BabelNodeImportSpecifier; + declare function metaProperty(meta: any, property: BabelNodeIdentifier): BabelNodeMetaProperty; + declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): BabelNodeClassMethod; + declare function objectPattern(properties: Array): BabelNodeObjectPattern; + declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; + declare function _super(): BabelNodeSuper; + declare export { _super as super } + declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression; + declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement; + declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; + declare function yieldExpression(argument?: BabelNodeExpression, delegate?: any): BabelNodeYieldExpression; + declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; + declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; + declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; + declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; + declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; + declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; + declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass; + declare function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction; + declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface; + declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; + declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; + declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; + declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; + declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; + declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration; + declare function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration; + declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; + declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; + declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; + declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam; + declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; + declare function inferredPredicate(): BabelNodeInferredPredicate; + declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; + declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration; + declare function interfaceTypeAnnotation(_extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; + declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; + declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; + declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; + declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; + declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; + declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; + declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, internalSlots?: Array, exact?: boolean): BabelNodeObjectTypeAnnotation; + declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; + declare function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty; + declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeIndexer; + declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeProperty; + declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; + declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; + declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; + declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; + declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; + declare function symbolTypeAnnotation(): BabelNodeSymbolTypeAnnotation; + declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; + declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; + declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; + declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; + declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; + declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; + declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeTypeParameter; + declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; + declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; + declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; + declare function variance(kind: "minus" | "plus"): BabelNodeVariance; + declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; + declare function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration; + declare function enumBooleanBody(members: Array): BabelNodeEnumBooleanBody; + declare function enumNumberBody(members: Array): BabelNodeEnumNumberBody; + declare function enumStringBody(members: Array): BabelNodeEnumStringBody; + declare function enumSymbolBody(members: Array): BabelNodeEnumSymbolBody; + declare function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember; + declare function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember; + declare function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember; + declare function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember; + declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; + declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement; + declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; + declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; + declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; + declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; + declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; + declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; + declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; + declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: Array, selfClosing?: boolean): BabelNodeJSXOpeningElement; + declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; + declare function jsxText(value: string): BabelNodeJSXText; + declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; + declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; + declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; + declare function noop(): BabelNodeNoop; + declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; + declare function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier; + declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder; + declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; + declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; + declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, _static?: boolean): BabelNodeClassProperty; + declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; + declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; + declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; + declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; + declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean): BabelNodeOptionalCallExpression; + declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression, decorators?: Array): BabelNodeClassPrivateProperty; + declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array, body: BabelNodeBlockStatement, _static?: boolean): BabelNodeClassPrivateMethod; + declare function _import(): BabelNodeImport; + declare export { _import as import } + declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator; + declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; + declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; + declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; + declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; + declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral; + declare function recordExpression(properties: Array): BabelNodeRecordExpression; + declare function tupleExpression(elements?: Array): BabelNodeTupleExpression; + declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty; + declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction; + declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod; + declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; + declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; + declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; + declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression): BabelNodeTSPropertySignature; + declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature; + declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature; + declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; + declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; + declare function tsBigIntKeyword(): BabelNodeTSBigIntKeyword; + declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; + declare function tsNullKeyword(): BabelNodeTSNullKeyword; + declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; + declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; + declare function tsStringKeyword(): BabelNodeTSStringKeyword; + declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; + declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; + declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; + declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; + declare function tsThisType(): BabelNodeTSThisType; + declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; + declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; + declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; + declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: BabelNodeTSTypeAnnotation, asserts?: boolean): BabelNodeTSTypePredicate; + declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; + declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; + declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; + declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; + declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; + declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; + declare function tsUnionType(types: Array): BabelNodeTSUnionType; + declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; + declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; + declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; + declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; + declare function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator; + declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; + declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType): BabelNodeTSMappedType; + declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; + declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; + declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration; + declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; + declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration; + declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; + declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; + declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array): BabelNodeTSEnumDeclaration; + declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; + declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration; + declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; + declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; + declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration; + declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; + declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; + declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; + declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; + declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; + declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; + declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; + declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter; + declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) + declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) + declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) + declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) + declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) + declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) + declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) + declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) + declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) + declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) + declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) + declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) + declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) + declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) + declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) + declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) + declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) + declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) + declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) + declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) + declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) + declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) + declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) + declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) + declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) + declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) + declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) + declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) + declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) + declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) + declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) + declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) + declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) + declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) + declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) + declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) + declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) + declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) + declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) + declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) + declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) + declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) + declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) + declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) + declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) + declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) + declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) + declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) + declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) + declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) + declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) + declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) + declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) + declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) + declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) + declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) + declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) + declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) + declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) + declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) + declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) + declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) + declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) + declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) + declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) + declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) + declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) + declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) + declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) + declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) + declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) + declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) + declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) + declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) + declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) + declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) + declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) + declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) + declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) + declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) + declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) + declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) + declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) + declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) + declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) + declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) + declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) + declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) + declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) + declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) + declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) + declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) + declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) + declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) + declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) + declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) + declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) + declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) + declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) + declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) + declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) + declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) + declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) + declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) + declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) + declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) + declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) + declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) + declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) + declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) + declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) + declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) + declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) + declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) + declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) + declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) + declare function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSymbolTypeAnnotation) + declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) + declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) + declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) + declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) + declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) + declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) + declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) + declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) + declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) + declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) + declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) + declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) + declare function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration) + declare function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody) + declare function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody) + declare function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody) + declare function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody) + declare function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember) + declare function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember) + declare function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember) + declare function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember) + declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) + declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) + declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) + declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) + declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) + declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) + declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) + declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) + declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) + declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) + declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) + declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) + declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) + declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) + declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) + declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) + declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) + declare function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier) + declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) + declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) + declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) + declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) + declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) + declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) + declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) + declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) + declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) + declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) + declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) + declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) + declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) + declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) + declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) + declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) + declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) + declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) + declare function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRecordExpression) + declare function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleExpression) + declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) + declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) + declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) + declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) + declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) + declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) + declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) + declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) + declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) + declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) + declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) + declare function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword) + declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) + declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) + declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) + declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) + declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) + declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) + declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) + declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) + declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) + declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) + declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) + declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) + declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) + declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) + declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) + declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) + declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) + declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) + declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) + declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) + declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) + declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) + declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) + declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) + declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) + declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) + declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) + declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) + declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) + declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) + declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) + declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) + declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) + declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) + declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) + declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) + declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) + declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) + declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) + declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) + declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) + declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) + declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) + declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) + declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) + declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) + declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) + declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) + declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) + declare function isExpression(node: ?Object, opts?: ?Object): boolean + declare function isBinary(node: ?Object, opts?: ?Object): boolean + declare function isScopable(node: ?Object, opts?: ?Object): boolean + declare function isBlockParent(node: ?Object, opts?: ?Object): boolean + declare function isBlock(node: ?Object, opts?: ?Object): boolean + declare function isStatement(node: ?Object, opts?: ?Object): boolean + declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean + declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean + declare function isConditional(node: ?Object, opts?: ?Object): boolean + declare function isLoop(node: ?Object, opts?: ?Object): boolean + declare function isWhile(node: ?Object, opts?: ?Object): boolean + declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean + declare function isFor(node: ?Object, opts?: ?Object): boolean + declare function isForXStatement(node: ?Object, opts?: ?Object): boolean + declare function isFunction(node: ?Object, opts?: ?Object): boolean + declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean + declare function isPureish(node: ?Object, opts?: ?Object): boolean + declare function isDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isPatternLike(node: ?Object, opts?: ?Object): boolean + declare function isLVal(node: ?Object, opts?: ?Object): boolean + declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean + declare function isLiteral(node: ?Object, opts?: ?Object): boolean + declare function isImmutable(node: ?Object, opts?: ?Object): boolean + declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean + declare function isMethod(node: ?Object, opts?: ?Object): boolean + declare function isObjectMember(node: ?Object, opts?: ?Object): boolean + declare function isProperty(node: ?Object, opts?: ?Object): boolean + declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean + declare function isPattern(node: ?Object, opts?: ?Object): boolean + declare function isClass(node: ?Object, opts?: ?Object): boolean + declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean + declare function isFlow(node: ?Object, opts?: ?Object): boolean + declare function isFlowType(node: ?Object, opts?: ?Object): boolean + declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean + declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean + declare function isEnumBody(node: ?Object, opts?: ?Object): boolean + declare function isEnumMember(node: ?Object, opts?: ?Object): boolean + declare function isJSX(node: ?Object, opts?: ?Object): boolean + declare function isPrivate(node: ?Object, opts?: ?Object): boolean + declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean + declare function isTSType(node: ?Object, opts?: ?Object): boolean + declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean + declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean + declare function isRestProperty(node: ?Object, opts?: ?Object): boolean + declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean + declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation + declare function createUnionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation + declare function buildChildren(node: { children: Array }): Array + declare function clone(n: T): T; + declare function cloneDeep(n: T): T; + declare function cloneDeepWithoutLoc(n: T): T; + declare function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T; + declare function cloneWithoutLoc(n: T): T; + declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' + declare function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T + declare function addComments(node: T, type: CommentTypeShorthand, comments: Array): T + declare function inheritInnerComments(node: Node, parent: Node): void + declare function inheritLeadingComments(node: Node, parent: Node): void + declare function inheritsComments(node: T, parent: Node): void + declare function inheritTrailingComments(node: Node, parent: Node): void + declare function removeComments(node: T): T + declare function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement + declare function toBindingIdentifierName(name?: ?string): string + declare function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement + declare function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression + declare function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression | BabelNodeClass | BabelNodeFunction): BabelNodeExpression + declare function toIdentifier(name?: ?string): string + declare function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string + declare function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void + declare function valueToNode(value: any): BabelNodeExpression + declare function removeTypeDuplicates(types: Array): Array + declare function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression + declare function inherits(child: T, parent: BabelNode | null | void): T + declare function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression + declare function removeProperties(n: T, opts: ?{}): void; + declare function removePropertiesDeep(n: T, opts: ?{}): T; + declare function getBindingIdentifiers(node: BabelNode, duplicates: boolean, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array } + declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: BabelNodeIdentifier | Array } + declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + }; + declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; + declare function traverseFast(n: Node, h: TraversalHandler, state?: T): void; + declare function shallowEqual(actual: Object, expected: Object): boolean + declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean + declare function is(type: string, n: BabelNode, opts: Object): boolean; + declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean + declare function isBlockScoped(node: BabelNode): boolean + declare function isImmutable(node: BabelNode): boolean + declare function isLet(node: BabelNode): boolean + declare function isNode(node: ?Object): boolean + declare function isNodesEquivalent(a: any, b: any): boolean + declare function isPlaceholderType(placeholderType: string, targetType: string): boolean + declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean + declare function isScope(node: BabelNode, parent: BabelNode): boolean + declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean + declare function isType(nodetype: ?string, targetType: string): boolean + declare function isValidES3Identifier(name: string): boolean + declare function isValidES3Identifier(name: string): boolean + declare function isValidIdentifier(name: string): boolean + declare function isVar(node: BabelNode): boolean + declare function matchesPattern(node: ?BabelNode, match: string | Array, allowPartial?: boolean): boolean + declare function validate(n: BabelNode, key: string, value: mixed): void; +} diff --git a/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js new file mode 100644 index 0000000000..6a0ac93c5c --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = appendToMemberExpression; + +var _generated = require("../builders/generated"); + +function appendToMemberExpression(member, append, computed = false) { + member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js new file mode 100644 index 0000000000..5802683995 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js @@ -0,0 +1,74 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeTypeDuplicates; + +var _generated = require("../../validators/generated"); + +function removeTypeDuplicates(nodes) { + const generics = {}; + const bases = {}; + const typeGroups = []; + const types = []; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (!node) continue; + + if (types.indexOf(node) >= 0) { + continue; + } + + if ((0, _generated.isAnyTypeAnnotation)(node)) { + return [node]; + } + + if ((0, _generated.isFlowBaseAnnotation)(node)) { + bases[node.type] = node; + continue; + } + + if ((0, _generated.isUnionTypeAnnotation)(node)) { + if (typeGroups.indexOf(node.types) < 0) { + nodes = nodes.concat(node.types); + typeGroups.push(node.types); + } + + continue; + } + + if ((0, _generated.isGenericTypeAnnotation)(node)) { + const name = node.id.name; + + if (generics[name]) { + let existing = generics[name]; + + if (existing.typeParameters) { + if (node.typeParameters) { + existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); + } + } else { + existing = node.typeParameters; + } + } else { + generics[name] = node; + } + + continue; + } + + types.push(node); + } + + for (const type of Object.keys(bases)) { + types.push(bases[type]); + } + + for (const name of Object.keys(generics)) { + types.push(generics[name]); + } + + return types; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/inherits.js b/packages/common/node_modules/@babel/types/lib/modifications/inherits.js new file mode 100644 index 0000000000..64d72fcf2f --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/inherits.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherits; + +var _constants = require("../constants"); + +var _inheritsComments = _interopRequireDefault(require("../comments/inheritsComments")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inherits(child, parent) { + if (!child || !parent) return child; + + for (const key of _constants.INHERIT_KEYS.optional) { + if (child[key] == null) { + child[key] = parent[key]; + } + } + + for (const key of Object.keys(parent)) { + if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; + } + + for (const key of _constants.INHERIT_KEYS.force) { + child[key] = parent[key]; + } + + (0, _inheritsComments.default)(child, parent); + return child; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js new file mode 100644 index 0000000000..ee6de0ec33 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js @@ -0,0 +1,13 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = prependToMemberExpression; + +var _generated = require("../builders/generated"); + +function prependToMemberExpression(member, prepend) { + member.object = (0, _generated.memberExpression)(prepend, member.object); + return member; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js b/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js new file mode 100644 index 0000000000..f9cf8e6065 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeProperties; + +var _constants = require("../constants"); + +const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; + +const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); + +function removeProperties(node, opts = {}) { + const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + + for (const key of map) { + if (node[key] != null) node[key] = undefined; + } + + for (const key of Object.keys(node)) { + if (key[0] === "_" && node[key] != null) node[key] = undefined; + } + + const symbols = Object.getOwnPropertySymbols(node); + + for (const sym of symbols) { + node[sym] = null; + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js new file mode 100644 index 0000000000..d11a84a832 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removePropertiesDeep; + +var _traverseFast = _interopRequireDefault(require("../traverse/traverseFast")); + +var _removeProperties = _interopRequireDefault(require("./removeProperties")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function removePropertiesDeep(tree, opts) { + (0, _traverseFast.default)(tree, _removeProperties.default, opts); + return tree; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js new file mode 100644 index 0000000000..189f4b8eb3 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js @@ -0,0 +1,103 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getBindingIdentifiers; + +var _generated = require("../validators/generated"); + +function getBindingIdentifiers(node, duplicates, outerOnly) { + let search = [].concat(node); + const ids = Object.create(null); + + while (search.length) { + const id = search.shift(); + if (!id) continue; + const keys = getBindingIdentifiers.keys[id.type]; + + if ((0, _generated.isIdentifier)(id)) { + if (duplicates) { + const _ids = ids[id.name] = ids[id.name] || []; + + _ids.push(id); + } else { + ids[id.name] = id; + } + + continue; + } + + if ((0, _generated.isExportDeclaration)(id)) { + if ((0, _generated.isDeclaration)(id.declaration)) { + search.push(id.declaration); + } + + continue; + } + + if (outerOnly) { + if ((0, _generated.isFunctionDeclaration)(id)) { + search.push(id.id); + continue; + } + + if ((0, _generated.isFunctionExpression)(id)) { + continue; + } + } + + if (keys) { + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + + if (id[key]) { + search = search.concat(id[key]); + } + } + } + } + + return ids; +} + +getBindingIdentifiers.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + DeclareInterface: ["id"], + DeclareTypeAlias: ["id"], + DeclareOpaqueType: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + OpaqueType: ["id"], + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], + ArrowFunctionExpression: ["params"], + ObjectMethod: ["params"], + ClassMethod: ["params"], + ForInStatement: ["left"], + ForOfStatement: ["left"], + ClassDeclaration: ["id"], + ClassExpression: ["id"], + RestElement: ["argument"], + UpdateExpression: ["argument"], + ObjectProperty: ["value"], + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] +}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js new file mode 100644 index 0000000000..8e1e3cb200 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getOuterBindingIdentifiers; + +var _getBindingIdentifiers = _interopRequireDefault(require("./getBindingIdentifiers")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getOuterBindingIdentifiers(node, duplicates) { + return (0, _getBindingIdentifiers.default)(node, duplicates, true); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/traverse/traverse.js b/packages/common/node_modules/@babel/types/lib/traverse/traverse.js new file mode 100644 index 0000000000..775aed1eed --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/traverse/traverse.js @@ -0,0 +1,55 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; + +var _definitions = require("../definitions"); + +function traverse(node, handlers, state) { + if (typeof handlers === "function") { + handlers = { + enter: handlers + }; + } + + const { + enter, + exit + } = handlers; + traverseSimpleImpl(node, enter, exit, state, []); +} + +function traverseSimpleImpl(node, enter, exit, state, ancestors) { + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + if (enter) enter(node, ancestors, state); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (let i = 0; i < subNode.length; i++) { + const child = subNode[i]; + if (!child) continue; + ancestors.push({ + node, + key, + index: i + }); + traverseSimpleImpl(child, enter, exit, state, ancestors); + ancestors.pop(); + } + } else if (subNode) { + ancestors.push({ + node, + key + }); + traverseSimpleImpl(subNode, enter, exit, state, ancestors); + ancestors.pop(); + } + } + + if (exit) exit(node, ancestors, state); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js b/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js new file mode 100644 index 0000000000..f038dd835e --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverseFast; + +var _definitions = require("../definitions"); + +function traverseFast(node, enter, opts) { + if (!node) return; + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + opts = opts || {}; + enter(node, opts); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (const node of subNode) { + traverseFast(node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/inherit.js b/packages/common/node_modules/@babel/types/lib/utils/inherit.js new file mode 100644 index 0000000000..f6691c7034 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/utils/inherit.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherit; + +var _uniq = _interopRequireDefault(require("lodash/uniq")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inherit(key, child, parent) { + if (child && parent) { + child[key] = (0, _uniq.default)([].concat(child[key], parent[key]).filter(Boolean)); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js new file mode 100644 index 0000000000..f0ca13369b --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cleanJSXElementLiteralChild; + +var _generated = require("../../builders/generated"); + +function cleanJSXElementLiteralChild(child, args) { + const lines = child.value.split(/\r\n|\n|\r/); + let lastNonEmptyLine = 0; + + for (let i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; + } + } + + let str = ""; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + const isFirstLine = i === 0; + const isLastLine = i === lines.length - 1; + const isLastNonEmptyLine = i === lastNonEmptyLine; + let trimmedLine = line.replace(/\t/g, " "); + + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + } + + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + } + + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } + + str += trimmedLine; + } + } + + if (str) args.push((0, _generated.stringLiteral)(str)); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js b/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js new file mode 100644 index 0000000000..fae259e4fc --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = shallowEqual; + +function shallowEqual(actual, expected) { + const keys = Object.keys(expected); + + for (const key of keys) { + if (actual[key] !== expected[key]) { + return false; + } + } + + return true; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js new file mode 100644 index 0000000000..0faa29c5d6 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildMatchMemberExpression; + +var _matchesPattern = _interopRequireDefault(require("./matchesPattern")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function buildMatchMemberExpression(match, allowPartial) { + const parts = match.split("."); + return member => (0, _matchesPattern.default)(member, parts, allowPartial); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/generated/index.js b/packages/common/node_modules/@babel/types/lib/validators/generated/index.js new file mode 100644 index 0000000000..e0dd917f37 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/generated/index.js @@ -0,0 +1,4573 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isArrayExpression = isArrayExpression; +exports.isAssignmentExpression = isAssignmentExpression; +exports.isBinaryExpression = isBinaryExpression; +exports.isInterpreterDirective = isInterpreterDirective; +exports.isDirective = isDirective; +exports.isDirectiveLiteral = isDirectiveLiteral; +exports.isBlockStatement = isBlockStatement; +exports.isBreakStatement = isBreakStatement; +exports.isCallExpression = isCallExpression; +exports.isCatchClause = isCatchClause; +exports.isConditionalExpression = isConditionalExpression; +exports.isContinueStatement = isContinueStatement; +exports.isDebuggerStatement = isDebuggerStatement; +exports.isDoWhileStatement = isDoWhileStatement; +exports.isEmptyStatement = isEmptyStatement; +exports.isExpressionStatement = isExpressionStatement; +exports.isFile = isFile; +exports.isForInStatement = isForInStatement; +exports.isForStatement = isForStatement; +exports.isFunctionDeclaration = isFunctionDeclaration; +exports.isFunctionExpression = isFunctionExpression; +exports.isIdentifier = isIdentifier; +exports.isIfStatement = isIfStatement; +exports.isLabeledStatement = isLabeledStatement; +exports.isStringLiteral = isStringLiteral; +exports.isNumericLiteral = isNumericLiteral; +exports.isNullLiteral = isNullLiteral; +exports.isBooleanLiteral = isBooleanLiteral; +exports.isRegExpLiteral = isRegExpLiteral; +exports.isLogicalExpression = isLogicalExpression; +exports.isMemberExpression = isMemberExpression; +exports.isNewExpression = isNewExpression; +exports.isProgram = isProgram; +exports.isObjectExpression = isObjectExpression; +exports.isObjectMethod = isObjectMethod; +exports.isObjectProperty = isObjectProperty; +exports.isRestElement = isRestElement; +exports.isReturnStatement = isReturnStatement; +exports.isSequenceExpression = isSequenceExpression; +exports.isParenthesizedExpression = isParenthesizedExpression; +exports.isSwitchCase = isSwitchCase; +exports.isSwitchStatement = isSwitchStatement; +exports.isThisExpression = isThisExpression; +exports.isThrowStatement = isThrowStatement; +exports.isTryStatement = isTryStatement; +exports.isUnaryExpression = isUnaryExpression; +exports.isUpdateExpression = isUpdateExpression; +exports.isVariableDeclaration = isVariableDeclaration; +exports.isVariableDeclarator = isVariableDeclarator; +exports.isWhileStatement = isWhileStatement; +exports.isWithStatement = isWithStatement; +exports.isAssignmentPattern = isAssignmentPattern; +exports.isArrayPattern = isArrayPattern; +exports.isArrowFunctionExpression = isArrowFunctionExpression; +exports.isClassBody = isClassBody; +exports.isClassExpression = isClassExpression; +exports.isClassDeclaration = isClassDeclaration; +exports.isExportAllDeclaration = isExportAllDeclaration; +exports.isExportDefaultDeclaration = isExportDefaultDeclaration; +exports.isExportNamedDeclaration = isExportNamedDeclaration; +exports.isExportSpecifier = isExportSpecifier; +exports.isForOfStatement = isForOfStatement; +exports.isImportDeclaration = isImportDeclaration; +exports.isImportDefaultSpecifier = isImportDefaultSpecifier; +exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; +exports.isImportSpecifier = isImportSpecifier; +exports.isMetaProperty = isMetaProperty; +exports.isClassMethod = isClassMethod; +exports.isObjectPattern = isObjectPattern; +exports.isSpreadElement = isSpreadElement; +exports.isSuper = isSuper; +exports.isTaggedTemplateExpression = isTaggedTemplateExpression; +exports.isTemplateElement = isTemplateElement; +exports.isTemplateLiteral = isTemplateLiteral; +exports.isYieldExpression = isYieldExpression; +exports.isAnyTypeAnnotation = isAnyTypeAnnotation; +exports.isArrayTypeAnnotation = isArrayTypeAnnotation; +exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; +exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; +exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; +exports.isClassImplements = isClassImplements; +exports.isDeclareClass = isDeclareClass; +exports.isDeclareFunction = isDeclareFunction; +exports.isDeclareInterface = isDeclareInterface; +exports.isDeclareModule = isDeclareModule; +exports.isDeclareModuleExports = isDeclareModuleExports; +exports.isDeclareTypeAlias = isDeclareTypeAlias; +exports.isDeclareOpaqueType = isDeclareOpaqueType; +exports.isDeclareVariable = isDeclareVariable; +exports.isDeclareExportDeclaration = isDeclareExportDeclaration; +exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; +exports.isDeclaredPredicate = isDeclaredPredicate; +exports.isExistsTypeAnnotation = isExistsTypeAnnotation; +exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; +exports.isFunctionTypeParam = isFunctionTypeParam; +exports.isGenericTypeAnnotation = isGenericTypeAnnotation; +exports.isInferredPredicate = isInferredPredicate; +exports.isInterfaceExtends = isInterfaceExtends; +exports.isInterfaceDeclaration = isInterfaceDeclaration; +exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; +exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; +exports.isMixedTypeAnnotation = isMixedTypeAnnotation; +exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; +exports.isNullableTypeAnnotation = isNullableTypeAnnotation; +exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; +exports.isNumberTypeAnnotation = isNumberTypeAnnotation; +exports.isObjectTypeAnnotation = isObjectTypeAnnotation; +exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; +exports.isObjectTypeCallProperty = isObjectTypeCallProperty; +exports.isObjectTypeIndexer = isObjectTypeIndexer; +exports.isObjectTypeProperty = isObjectTypeProperty; +exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; +exports.isOpaqueType = isOpaqueType; +exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; +exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; +exports.isStringTypeAnnotation = isStringTypeAnnotation; +exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation; +exports.isThisTypeAnnotation = isThisTypeAnnotation; +exports.isTupleTypeAnnotation = isTupleTypeAnnotation; +exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; +exports.isTypeAlias = isTypeAlias; +exports.isTypeAnnotation = isTypeAnnotation; +exports.isTypeCastExpression = isTypeCastExpression; +exports.isTypeParameter = isTypeParameter; +exports.isTypeParameterDeclaration = isTypeParameterDeclaration; +exports.isTypeParameterInstantiation = isTypeParameterInstantiation; +exports.isUnionTypeAnnotation = isUnionTypeAnnotation; +exports.isVariance = isVariance; +exports.isVoidTypeAnnotation = isVoidTypeAnnotation; +exports.isEnumDeclaration = isEnumDeclaration; +exports.isEnumBooleanBody = isEnumBooleanBody; +exports.isEnumNumberBody = isEnumNumberBody; +exports.isEnumStringBody = isEnumStringBody; +exports.isEnumSymbolBody = isEnumSymbolBody; +exports.isEnumBooleanMember = isEnumBooleanMember; +exports.isEnumNumberMember = isEnumNumberMember; +exports.isEnumStringMember = isEnumStringMember; +exports.isEnumDefaultedMember = isEnumDefaultedMember; +exports.isJSXAttribute = isJSXAttribute; +exports.isJSXClosingElement = isJSXClosingElement; +exports.isJSXElement = isJSXElement; +exports.isJSXEmptyExpression = isJSXEmptyExpression; +exports.isJSXExpressionContainer = isJSXExpressionContainer; +exports.isJSXSpreadChild = isJSXSpreadChild; +exports.isJSXIdentifier = isJSXIdentifier; +exports.isJSXMemberExpression = isJSXMemberExpression; +exports.isJSXNamespacedName = isJSXNamespacedName; +exports.isJSXOpeningElement = isJSXOpeningElement; +exports.isJSXSpreadAttribute = isJSXSpreadAttribute; +exports.isJSXText = isJSXText; +exports.isJSXFragment = isJSXFragment; +exports.isJSXOpeningFragment = isJSXOpeningFragment; +exports.isJSXClosingFragment = isJSXClosingFragment; +exports.isNoop = isNoop; +exports.isPlaceholder = isPlaceholder; +exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; +exports.isArgumentPlaceholder = isArgumentPlaceholder; +exports.isAwaitExpression = isAwaitExpression; +exports.isBindExpression = isBindExpression; +exports.isClassProperty = isClassProperty; +exports.isOptionalMemberExpression = isOptionalMemberExpression; +exports.isPipelineTopicExpression = isPipelineTopicExpression; +exports.isPipelineBareFunction = isPipelineBareFunction; +exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; +exports.isOptionalCallExpression = isOptionalCallExpression; +exports.isClassPrivateProperty = isClassPrivateProperty; +exports.isClassPrivateMethod = isClassPrivateMethod; +exports.isImport = isImport; +exports.isDecorator = isDecorator; +exports.isDoExpression = isDoExpression; +exports.isExportDefaultSpecifier = isExportDefaultSpecifier; +exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; +exports.isPrivateName = isPrivateName; +exports.isBigIntLiteral = isBigIntLiteral; +exports.isRecordExpression = isRecordExpression; +exports.isTupleExpression = isTupleExpression; +exports.isTSParameterProperty = isTSParameterProperty; +exports.isTSDeclareFunction = isTSDeclareFunction; +exports.isTSDeclareMethod = isTSDeclareMethod; +exports.isTSQualifiedName = isTSQualifiedName; +exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; +exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; +exports.isTSPropertySignature = isTSPropertySignature; +exports.isTSMethodSignature = isTSMethodSignature; +exports.isTSIndexSignature = isTSIndexSignature; +exports.isTSAnyKeyword = isTSAnyKeyword; +exports.isTSBooleanKeyword = isTSBooleanKeyword; +exports.isTSBigIntKeyword = isTSBigIntKeyword; +exports.isTSNeverKeyword = isTSNeverKeyword; +exports.isTSNullKeyword = isTSNullKeyword; +exports.isTSNumberKeyword = isTSNumberKeyword; +exports.isTSObjectKeyword = isTSObjectKeyword; +exports.isTSStringKeyword = isTSStringKeyword; +exports.isTSSymbolKeyword = isTSSymbolKeyword; +exports.isTSUndefinedKeyword = isTSUndefinedKeyword; +exports.isTSUnknownKeyword = isTSUnknownKeyword; +exports.isTSVoidKeyword = isTSVoidKeyword; +exports.isTSThisType = isTSThisType; +exports.isTSFunctionType = isTSFunctionType; +exports.isTSConstructorType = isTSConstructorType; +exports.isTSTypeReference = isTSTypeReference; +exports.isTSTypePredicate = isTSTypePredicate; +exports.isTSTypeQuery = isTSTypeQuery; +exports.isTSTypeLiteral = isTSTypeLiteral; +exports.isTSArrayType = isTSArrayType; +exports.isTSTupleType = isTSTupleType; +exports.isTSOptionalType = isTSOptionalType; +exports.isTSRestType = isTSRestType; +exports.isTSUnionType = isTSUnionType; +exports.isTSIntersectionType = isTSIntersectionType; +exports.isTSConditionalType = isTSConditionalType; +exports.isTSInferType = isTSInferType; +exports.isTSParenthesizedType = isTSParenthesizedType; +exports.isTSTypeOperator = isTSTypeOperator; +exports.isTSIndexedAccessType = isTSIndexedAccessType; +exports.isTSMappedType = isTSMappedType; +exports.isTSLiteralType = isTSLiteralType; +exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; +exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; +exports.isTSInterfaceBody = isTSInterfaceBody; +exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; +exports.isTSAsExpression = isTSAsExpression; +exports.isTSTypeAssertion = isTSTypeAssertion; +exports.isTSEnumDeclaration = isTSEnumDeclaration; +exports.isTSEnumMember = isTSEnumMember; +exports.isTSModuleDeclaration = isTSModuleDeclaration; +exports.isTSModuleBlock = isTSModuleBlock; +exports.isTSImportType = isTSImportType; +exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; +exports.isTSExternalModuleReference = isTSExternalModuleReference; +exports.isTSNonNullExpression = isTSNonNullExpression; +exports.isTSExportAssignment = isTSExportAssignment; +exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; +exports.isTSTypeAnnotation = isTSTypeAnnotation; +exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; +exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; +exports.isTSTypeParameter = isTSTypeParameter; +exports.isExpression = isExpression; +exports.isBinary = isBinary; +exports.isScopable = isScopable; +exports.isBlockParent = isBlockParent; +exports.isBlock = isBlock; +exports.isStatement = isStatement; +exports.isTerminatorless = isTerminatorless; +exports.isCompletionStatement = isCompletionStatement; +exports.isConditional = isConditional; +exports.isLoop = isLoop; +exports.isWhile = isWhile; +exports.isExpressionWrapper = isExpressionWrapper; +exports.isFor = isFor; +exports.isForXStatement = isForXStatement; +exports.isFunction = isFunction; +exports.isFunctionParent = isFunctionParent; +exports.isPureish = isPureish; +exports.isDeclaration = isDeclaration; +exports.isPatternLike = isPatternLike; +exports.isLVal = isLVal; +exports.isTSEntityName = isTSEntityName; +exports.isLiteral = isLiteral; +exports.isImmutable = isImmutable; +exports.isUserWhitespacable = isUserWhitespacable; +exports.isMethod = isMethod; +exports.isObjectMember = isObjectMember; +exports.isProperty = isProperty; +exports.isUnaryLike = isUnaryLike; +exports.isPattern = isPattern; +exports.isClass = isClass; +exports.isModuleDeclaration = isModuleDeclaration; +exports.isExportDeclaration = isExportDeclaration; +exports.isModuleSpecifier = isModuleSpecifier; +exports.isFlow = isFlow; +exports.isFlowType = isFlowType; +exports.isFlowBaseAnnotation = isFlowBaseAnnotation; +exports.isFlowDeclaration = isFlowDeclaration; +exports.isFlowPredicate = isFlowPredicate; +exports.isEnumBody = isEnumBody; +exports.isEnumMember = isEnumMember; +exports.isJSX = isJSX; +exports.isPrivate = isPrivate; +exports.isTSTypeElement = isTSTypeElement; +exports.isTSType = isTSType; +exports.isNumberLiteral = isNumberLiteral; +exports.isRegexLiteral = isRegexLiteral; +exports.isRestProperty = isRestProperty; +exports.isSpreadProperty = isSpreadProperty; + +var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isArrayExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BinaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterpreterDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterpreterDirective") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Directive") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirectiveLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DirectiveLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BlockStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBreakStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BreakStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCatchClause(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CatchClause") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditionalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ConditionalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isContinueStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ContinueStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDebuggerStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DebuggerStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoWhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExpressionStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "File") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForInStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForInStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Identifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLabeledStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LabeledStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumericLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumericLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegExpLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegExpLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLogicalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LogicalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNewExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NewExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProgram(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Program") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isReturnStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ReturnStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSequenceExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SequenceExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isParenthesizedExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ParenthesizedExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchCase(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchCase") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThrowStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThrowStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTryStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TryStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUpdateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UpdateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclarator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclarator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWithStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WithStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrowFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrowFunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamedDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamedDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForOfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForOfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMetaProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MetaProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSuper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Super") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTaggedTemplateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TaggedTemplateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isYieldExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "YieldExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAnyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AnyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassImplements(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassImplements") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareClass") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareInterface(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareInterface") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModule(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModule") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModuleExports(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModuleExports") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareTypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareOpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareVariable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareVariable") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclaredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExistsTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExistsTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeParam(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeParam") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isGenericTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "GenericTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInferredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InferredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceExtends(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceExtends") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIntersectionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IntersectionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMixedTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MixedTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullableTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullableTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeInternalSlot(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeInternalSlot") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeCallProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeCallProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeIndexer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeIndexer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeSpreadProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeSpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isQualifiedTypeIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "QualifiedTypeIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSymbolTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SymbolTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TupleTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeofTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeofTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeCastExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeCastExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariance(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Variance") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVoidTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VoidTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBooleanBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumBooleanBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumNumberBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumNumberBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumStringBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumStringBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumSymbolBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumSymbolBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBooleanMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumBooleanMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumNumberMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumNumberMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumStringMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumStringMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumDefaultedMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumDefaultedMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXEmptyExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXEmptyExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXExpressionContainer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXExpressionContainer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadChild(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadChild") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXNamespacedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXNamespacedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXText(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXText") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Noop") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Placeholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isV8IntrinsicIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "V8IntrinsicIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArgumentPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArgumentPlaceholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAwaitExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AwaitExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBindExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BindExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineTopicExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineTopicExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineBareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineBareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelinePrimaryTopicReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelinePrimaryTopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalCallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImport(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Import") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDecorator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Decorator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivateName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PrivateName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBigIntLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BigIntLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRecordExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RecordExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TupleExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParameterProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParameterProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSQualifiedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSQualifiedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSCallSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSCallSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSPropertySignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSPropertySignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMethodSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMethodSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAnyKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAnyKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBooleanKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSBooleanKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBigIntKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSBigIntKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNeverKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNeverKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNullKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNullKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNumberKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNumberKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSObjectKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSObjectKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSStringKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSStringKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSSymbolKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSSymbolKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUndefinedKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUndefinedKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnknownKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnknownKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSVoidKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSVoidKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSThisType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSThisType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSFunctionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSFunctionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructorType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructorType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypePredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypePredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeQuery(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeQuery") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSArrayType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSArrayType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTupleType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTupleType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSOptionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSOptionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSRestType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSRestType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIntersectionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIntersectionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConditionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConditionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInferType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInferType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParenthesizedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParenthesizedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeOperator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeOperator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexedAccessType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMappedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMappedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSLiteralType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSLiteralType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExpressionWithTypeArguments(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExpressionWithTypeArguments") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAliasDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAliasDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAsExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAsExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAssertion(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAssertion") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleBlock") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportEqualsDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportEqualsDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExternalModuleReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExternalModuleReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNonNullExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNonNullExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExportAssignment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExportAssignment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNamespaceExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNamespaceExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinary(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isScopable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTerminatorless(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCompletionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditional(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionWrapper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFor(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForXStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPureish(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPatternLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLVal(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEntityName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImmutable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUserWhitespacable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Class" || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlow(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowBaseAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumBody" || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEnumMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EnumMember" || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSX(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegexLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/is.js b/packages/common/node_modules/@babel/types/lib/validators/is.js new file mode 100644 index 0000000000..a68c108861 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/is.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = is; + +var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual")); + +var _isType = _interopRequireDefault(require("./isType")); + +var _isPlaceholderType = _interopRequireDefault(require("./isPlaceholderType")); + +var _definitions = require("../definitions"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function is(type, node, opts) { + if (!node) return false; + const matches = (0, _isType.default)(node.type, type); + + if (!matches) { + if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { + return (0, _isPlaceholderType.default)(node.expectedNode, type); + } + + return false; + } + + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isBinding.js b/packages/common/node_modules/@babel/types/lib/validators/isBinding.js new file mode 100644 index 0000000000..e18ad19760 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isBinding.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBinding; + +var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBinding(node, parent, grandparent) { + if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { + return false; + } + + const keys = _getBindingIdentifiers.default.keys[parent.type]; + + if (keys) { + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = parent[key]; + + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } + + return false; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js b/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js new file mode 100644 index 0000000000..7e6549e03b --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBlockScoped; + +var _generated = require("./generated"); + +var _isLet = _interopRequireDefault(require("./isLet")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBlockScoped(node) { + return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js b/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js new file mode 100644 index 0000000000..b00b23d4ce --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isImmutable; + +var _isType = _interopRequireDefault(require("./isType")); + +var _generated = require("./generated"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isImmutable(node) { + if ((0, _isType.default)(node.type, "Immutable")) return true; + + if ((0, _generated.isIdentifier)(node)) { + if (node.name === "undefined") { + return true; + } else { + return false; + } + } + + return false; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isLet.js b/packages/common/node_modules/@babel/types/lib/validators/isLet.js new file mode 100644 index 0000000000..93d7562808 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isLet.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLet; + +var _generated = require("./generated"); + +var _constants = require("../constants"); + +function isLet(node) { + return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isNode.js b/packages/common/node_modules/@babel/types/lib/validators/isNode.js new file mode 100644 index 0000000000..e88a47aac4 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isNode.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNode; + +var _definitions = require("../definitions"); + +function isNode(node) { + return !!(node && _definitions.VISITOR_KEYS[node.type]); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js new file mode 100644 index 0000000000..0c3b8ac437 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNodesEquivalent; + +var _definitions = require("../definitions"); + +function isNodesEquivalent(a, b) { + if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { + return a === b; + } + + if (a.type !== b.type) { + return false; + } + + const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); + const visitorKeys = _definitions.VISITOR_KEYS[a.type]; + + for (const field of fields) { + if (typeof a[field] !== typeof b[field]) { + return false; + } + + if (a[field] == null && b[field] == null) { + continue; + } else if (a[field] == null || b[field] == null) { + return false; + } + + if (Array.isArray(a[field])) { + if (!Array.isArray(b[field])) { + return false; + } + + if (a[field].length !== b[field].length) { + return false; + } + + for (let i = 0; i < a[field].length; i++) { + if (!isNodesEquivalent(a[field][i], b[field][i])) { + return false; + } + } + + continue; + } + + if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) { + for (const key of Object.keys(a[field])) { + if (a[field][key] !== b[field][key]) { + return false; + } + } + + continue; + } + + if (!isNodesEquivalent(a[field], b[field])) { + return false; + } + } + + return true; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js new file mode 100644 index 0000000000..e8271de0b1 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPlaceholderType; + +var _definitions = require("../definitions"); + +function isPlaceholderType(placeholderType, targetType) { + if (placeholderType === targetType) return true; + const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; + + if (aliases) { + for (const alias of aliases) { + if (targetType === alias) return true; + } + } + + return false; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js b/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js new file mode 100644 index 0000000000..8fd1662348 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js @@ -0,0 +1,116 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isReferenced; + +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "JSXMemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + + return parent.object === node; + + case "VariableDeclarator": + return parent.init === node; + + case "ArrowFunctionExpression": + return parent.body === node; + + case "ExportSpecifier": + if (parent.source) { + return false; + } + + return parent.local === node; + + case "PrivateName": + return false; + + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.params.includes(node)) { + return false; + } + + case "ObjectProperty": + case "ClassProperty": + case "ClassPrivateProperty": + if (parent.key === node) { + return !!parent.computed; + } + + if (parent.value === node) { + return !grandparent || grandparent.type !== "ObjectPattern"; + } + + return true; + + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + + case "AssignmentExpression": + return parent.right === node; + + case "AssignmentPattern": + return parent.right === node; + + case "LabeledStatement": + return false; + + case "CatchClause": + return false; + + case "RestElement": + return false; + + case "BreakStatement": + case "ContinueStatement": + return false; + + case "FunctionDeclaration": + case "FunctionExpression": + return false; + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + + case "JSXAttribute": + return false; + + case "ObjectPattern": + case "ArrayPattern": + return false; + + case "MetaProperty": + return false; + + case "ObjectTypeProperty": + return parent.key !== node; + + case "TSEnumMember": + return parent.id !== node; + + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + + return true; + } + + return true; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isScope.js b/packages/common/node_modules/@babel/types/lib/validators/isScope.js new file mode 100644 index 0000000000..d4cd46c8c4 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isScope.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isScope; + +var _generated = require("./generated"); + +function isScope(node, parent) { + if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, { + body: node + })) { + return false; + } + + if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, { + body: node + })) { + return false; + } + + if ((0, _generated.isPattern)(node) && (0, _generated.isFunction)(parent)) { + return true; + } + + return (0, _generated.isScopable)(node); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js new file mode 100644 index 0000000000..25431cc273 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSpecifierDefault; + +var _generated = require("./generated"); + +function isSpecifierDefault(specifier) { + return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { + name: "default" + }); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isType.js b/packages/common/node_modules/@babel/types/lib/validators/isType.js new file mode 100644 index 0000000000..59d31dfbbf --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isType.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isType; + +var _definitions = require("../definitions"); + +function isType(nodeType, targetType) { + if (nodeType === targetType) return true; + if (_definitions.ALIAS_KEYS[targetType]) return false; + const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; + + if (aliases) { + if (aliases[0] === nodeType) return true; + + for (const alias of aliases) { + if (nodeType === alias) return true; + } + } + + return false; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js new file mode 100644 index 0000000000..8455cab269 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidES3Identifier; + +var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); + +function isValidES3Identifier(name) { + return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js new file mode 100644 index 0000000000..c1adb9afe0 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidIdentifier; + +var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); + +function isValidIdentifier(name, reserved = true) { + if (typeof name !== "string") return false; + + if (reserved) { + if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name)) { + return false; + } else if (name === "await") { + return false; + } + } + + return (0, _helperValidatorIdentifier.isIdentifierName)(name); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isVar.js b/packages/common/node_modules/@babel/types/lib/validators/isVar.js new file mode 100644 index 0000000000..a34801d18f --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/isVar.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVar; + +var _generated = require("./generated"); + +var _constants = require("../constants"); + +function isVar(node) { + return (0, _generated.isVariableDeclaration)(node, { + kind: "var" + }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js b/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js new file mode 100644 index 0000000000..538e011f4c --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matchesPattern; + +var _generated = require("./generated"); + +function matchesPattern(member, match, allowPartial) { + if (!(0, _generated.isMemberExpression)(member)) return false; + const parts = Array.isArray(match) ? match : match.split("."); + const nodes = []; + let node; + + for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { + nodes.push(node.property); + } + + nodes.push(node); + if (nodes.length < parts.length) return false; + if (!allowPartial && nodes.length > parts.length) return false; + + for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { + const node = nodes[j]; + let value; + + if ((0, _generated.isIdentifier)(node)) { + value = node.name; + } else if ((0, _generated.isStringLiteral)(node)) { + value = node.value; + } else { + return false; + } + + if (parts[i] !== value) return false; + } + + return true; +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js new file mode 100644 index 0000000000..57761c2b1b --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js @@ -0,0 +1,10 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCompatTag; + +function isCompatTag(tagName) { + return !!tagName && /^[a-z]/.test(tagName); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js new file mode 100644 index 0000000000..33b30d71e9 --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); +var _default = isReactComponent; +exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/validate.js b/packages/common/node_modules/@babel/types/lib/validators/validate.js new file mode 100644 index 0000000000..4604f4b2ea --- /dev/null +++ b/packages/common/node_modules/@babel/types/lib/validators/validate.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = validate; +exports.validateField = validateField; +exports.validateChild = validateChild; + +var _definitions = require("../definitions"); + +function validate(node, key, val) { + if (!node) return; + const fields = _definitions.NODE_FIELDS[node.type]; + if (!fields) return; + const field = fields[key]; + validateField(node, key, val, field); + validateChild(node, key, val); +} + +function validateField(node, key, val, field) { + if (!field || !field.validate) return; + if (field.optional && val == null) return; + field.validate(node, key, val); +} + +function validateChild(node, key, val) { + if (val == null) return; + const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type]; + if (!validate) return; + validate(node, key, val); +} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/package.json b/packages/common/node_modules/@babel/types/package.json new file mode 100644 index 0000000000..177e1c90bd --- /dev/null +++ b/packages/common/node_modules/@babel/types/package.json @@ -0,0 +1,24 @@ +{ + "name": "@babel/types", + "version": "7.9.5", + "description": "Babel Types is a Lodash-esque utility library for AST nodes", + "author": "Sebastian McKenzie ", + "homepage": "https://babeljs.io/", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/babel/babel/tree/master/packages/babel-types", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "dependencies": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + }, + "devDependencies": { + "@babel/generator": "^7.9.5", + "@babel/parser": "^7.9.0" + }, + "gitHead": "5b97e77e030cf3853a147fdff81844ea4026219d" +} diff --git a/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js b/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js new file mode 100644 index 0000000000..bf0b036c18 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js @@ -0,0 +1,29 @@ +"use strict"; +const path = require("path"); +const chalk = require("chalk"); +const generateBuilders = require("./generators/generateBuilders"); +const generateValidators = require("./generators/generateValidators"); +const generateAsserts = require("./generators/generateAsserts"); +const generateConstants = require("./generators/generateConstants"); +const format = require("../../../scripts/utils/formatCode"); +const writeFile = require("../../../scripts/utils/writeFileAndMkDir"); + +const baseDir = path.join(__dirname, "../src"); + +console.log("Generating @babel/types dynamic functions"); + +const buildersFile = path.join(baseDir, "builders/generated/index.js"); +writeFile(buildersFile, format(generateBuilders(), buildersFile)); +console.log(` ${chalk.green("✔")} Generated builders`); + +const validatorsFile = path.join(baseDir, "validators/generated/index.js"); +writeFile(validatorsFile, format(generateValidators(), validatorsFile)); +console.log(` ${chalk.green("✔")} Generated validators`); + +const assertsFile = path.join(baseDir, "asserts/generated/index.js"); +writeFile(assertsFile, format(generateAsserts(), assertsFile)); +console.log(` ${chalk.green("✔")} Generated asserts`); + +const constantsFile = path.join(baseDir, "constants/generated/index.js"); +writeFile(constantsFile, format(generateConstants(), constantsFile)); +console.log(` ${chalk.green("✔")} Generated constants`); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/docs.js b/packages/common/node_modules/@babel/types/scripts/generators/docs.js new file mode 100644 index 0000000000..340dbbc113 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/docs.js @@ -0,0 +1,121 @@ +"use strict"; + +const util = require("util"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +const types = require("../../"); + +const readme = [ + `# @babel/types + +> This module contains methods for building ASTs manually and for checking the types of AST nodes. + +## Install + +\`\`\`sh +npm install --save-dev @babel/types +\`\`\` + +## API`, +]; + +const customTypes = { + ClassMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + Identifier: { + name: "`string`", + }, + MemberExpression: { + property: "if computed then `Expression` else `Identifier`", + }, + ObjectMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + ObjectProperty: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, +}; +Object.keys(types.BUILDER_KEYS) + .sort() + .forEach(function(key) { + readme.push("### " + key[0].toLowerCase() + key.substr(1)); + readme.push("```javascript"); + readme.push( + "t." + + toFunctionName(key) + + "(" + + types.BUILDER_KEYS[key].join(", ") + + ")" + ); + readme.push("```"); + readme.push(""); + readme.push( + "See also `t.is" + + key + + "(node, opts)` and `t.assert" + + key + + "(node, opts)`." + ); + readme.push(""); + if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) { + readme.push( + "Aliases: " + + types.ALIAS_KEYS[key] + .map(function(key) { + return "`" + key + "`"; + }) + .join(", ") + ); + readme.push(""); + } + Object.keys(types.NODE_FIELDS[key]) + .sort(function(fieldA, fieldB) { + const indexA = types.BUILDER_KEYS[key].indexOf(fieldA); + const indexB = types.BUILDER_KEYS[key].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(function(field) { + const defaultValue = types.NODE_FIELDS[key][field].default; + const fieldDescription = ["`" + field + "`"]; + const validator = types.NODE_FIELDS[key][field].validate; + if (customTypes[key] && customTypes[key][field]) { + fieldDescription.push(`: ${customTypes[key][field]}`); + } else if (validator) { + try { + fieldDescription.push( + ": `" + stringifyValidator(validator, "") + "`" + ); + } catch (ex) { + if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { + console.log( + "Unrecognised validator type for " + key + "." + field + ); + console.dir(ex.validator, { depth: 10, colors: true }); + } + } + } + if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) { + fieldDescription.push( + " (default: `" + util.inspect(defaultValue) + "`" + ); + if (types.BUILDER_KEYS[key].indexOf(field) < 0) { + fieldDescription.push(", excluded from builder function"); + } + fieldDescription.push(")"); + } else { + fieldDescription.push(" (required)"); + } + readme.push(" - " + fieldDescription.join("")); + }); + + readme.push(""); + readme.push("---"); + readme.push(""); + }); + +process.stdout.write(readme.join("\n")); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/flow.js b/packages/common/node_modules/@babel/types/scripts/generators/flow.js new file mode 100644 index 0000000000..ec664e7fe4 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/flow.js @@ -0,0 +1,249 @@ +"use strict"; + +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +const NODE_PREFIX = "BabelNode"; + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class ${NODE_PREFIX}Comment { + value: string; + start: number; + end: number; + loc: ${NODE_PREFIX}SourceLocation; +} + +declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { + type: "CommentBlock"; +} + +declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { + type: "CommentLine"; +} + +declare class ${NODE_PREFIX}SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class ${NODE_PREFIX} { + leadingComments?: Array<${NODE_PREFIX}Comment>; + innerComments?: Array<${NODE_PREFIX}Comment>; + trailingComments?: Array<${NODE_PREFIX}Comment>; + start: ?number; + end: ?number; + loc: ?${NODE_PREFIX}SourceLocation; +}\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + + const struct = ['type: "' + type + '";']; + const args = []; + const builderNames = t.BUILDER_KEYS[type]; + + Object.keys(t.NODE_FIELDS[type]) + .sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(fieldName => { + const field = fields[fieldName]; + + let suffix = ""; + if (field.optional || field.default != null) suffix += "?"; + + let typeAnnotation = "any"; + + const validate = field.validate; + if (validate) { + typeAnnotation = stringifyValidator(validate, NODE_PREFIX); + } + + if (typeAnnotation) { + suffix += ": " + typeAnnotation; + } + if (builderNames.includes(fieldName)) { + args.push(t.toBindingIdentifierName(fieldName) + suffix); + } + + if (t.isValidIdentifier(fieldName)) { + struct.push(fieldName + suffix + ";"); + } + }); + + code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { + ${struct.join("\n ").trim()} +}\n\n`; + + // Flow chokes on super() and import() :/ + if (type !== "Super" && type !== "Import") { + lines.push( + `declare function ${toFunctionName(type)}(${args.join( + ", " + )}): ${NODE_PREFIX}${type};` + ); + } else { + const functionName = toFunctionName(type); + lines.push( + `declare function _${functionName}(${args.join( + ", " + )}): ${NODE_PREFIX}${type};`, + `declare export { _${functionName} as ${functionName} }` + ); + } +} + +for (let i = 0; i < t.TYPES.length; i++) { + let decl = `declare function is${t.TYPES[i]}(node: ?Object, opts?: ?Object): boolean`; + + if (t.NODE_FIELDS[t.TYPES[i]]) { + decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`; + } + + lines.push(decl); +} + +lines.push( + // builders/ + // eslint-disable-next-line max-len + `declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`, + // eslint-disable-next-line max-len + `declare function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`, + // this smells like "internal API" + // eslint-disable-next-line max-len + `declare function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`, + + // clone/ + `declare function clone(n: T): T;`, + `declare function cloneDeep(n: T): T;`, + `declare function cloneDeepWithoutLoc(n: T): T;`, + `declare function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T;`, + `declare function cloneWithoutLoc(n: T): T;`, + + // comments/ + `declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, + // eslint-disable-next-line max-len + `declare function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, + // eslint-disable-next-line max-len + `declare function addComments(node: T, type: CommentTypeShorthand, comments: Array): T`, + `declare function inheritInnerComments(node: Node, parent: Node): void`, + `declare function inheritLeadingComments(node: Node, parent: Node): void`, + `declare function inheritsComments(node: T, parent: Node): void`, + `declare function inheritTrailingComments(node: Node, parent: Node): void`, + `declare function removeComments(node: T): T`, + + // converters/ + `declare function ensureBlock(node: ${NODE_PREFIX}, key: string): ${NODE_PREFIX}BlockStatement`, + `declare function toBindingIdentifierName(name?: ?string): string`, + // eslint-disable-next-line max-len + `declare function toBlock(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Expression, parent?: ${NODE_PREFIX}Function | null): ${NODE_PREFIX}BlockStatement`, + // eslint-disable-next-line max-len + `declare function toComputedKey(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}Expression | ${NODE_PREFIX}Identifier): ${NODE_PREFIX}Expression`, + // eslint-disable-next-line max-len + `declare function toExpression(node: ${NODE_PREFIX}ExpressionStatement | ${NODE_PREFIX}Expression | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function): ${NODE_PREFIX}Expression`, + `declare function toIdentifier(name?: ?string): string`, + // eslint-disable-next-line max-len + `declare function toKeyAlias(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}): string`, + // toSequenceExpression relies on types that aren't declared in flow + // eslint-disable-next-line max-len + `declare function toStatement(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function | ${NODE_PREFIX}AssignmentExpression, ignore?: boolean): ${NODE_PREFIX}Statement | void`, + `declare function valueToNode(value: any): ${NODE_PREFIX}Expression`, + + // modifications/ + // eslint-disable-next-line max-len + `declare function removeTypeDuplicates(types: Array<${NODE_PREFIX}FlowType>): Array<${NODE_PREFIX}FlowType>`, + // eslint-disable-next-line max-len + `declare function appendToMemberExpression(member: ${NODE_PREFIX}MemberExpression, append: ${NODE_PREFIX}, computed?: boolean): ${NODE_PREFIX}MemberExpression`, + // eslint-disable-next-line max-len + `declare function inherits(child: T, parent: ${NODE_PREFIX} | null | void): T`, + // eslint-disable-next-line max-len + `declare function prependToMemberExpression(member: ${NODE_PREFIX}MemberExpression, prepend: ${NODE_PREFIX}Expression): ${NODE_PREFIX}MemberExpression`, + `declare function removeProperties(n: T, opts: ?{}): void;`, + `declare function removePropertiesDeep(n: T, opts: ?{}): T;`, + + // retrievers/ + // eslint-disable-next-line max-len + `declare function getBindingIdentifiers(node: ${NODE_PREFIX}, duplicates: boolean, outerOnly?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`, + // eslint-disable-next-line max-len + `declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`, + + // traverse/ + `declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void;`, + `declare function traverseFast(n: Node, h: TraversalHandler, state?: T): void;`, + + // utils/ + // cleanJSXElementLiteralChild is not exported + // inherit is not exported + `declare function shallowEqual(actual: Object, expected: Object): boolean`, + + // validators/ + // eslint-disable-next-line max-len + `declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean`, + `declare function is(type: string, n: BabelNode, opts: Object): boolean;`, + `declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, + `declare function isBlockScoped(node: BabelNode): boolean`, + `declare function isImmutable(node: BabelNode): boolean`, + `declare function isLet(node: BabelNode): boolean`, + `declare function isNode(node: ?Object): boolean`, + `declare function isNodesEquivalent(a: any, b: any): boolean`, + `declare function isPlaceholderType(placeholderType: string, targetType: string): boolean`, + `declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, + `declare function isScope(node: BabelNode, parent: BabelNode): boolean`, + `declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean`, + `declare function isType(nodetype: ?string, targetType: string): boolean`, + `declare function isValidES3Identifier(name: string): boolean`, + `declare function isValidES3Identifier(name: string): boolean`, + `declare function isValidIdentifier(name: string): boolean`, + `declare function isVar(node: BabelNode): boolean`, + // eslint-disable-next-line max-len + `declare function matchesPattern(node: ?BabelNode, match: string | Array, allowPartial?: boolean): boolean`, + `declare function validate(n: BabelNode, key: string, value: mixed): void;` +); + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `type ${NODE_PREFIX}${type} = ${types + .map(type => `${NODE_PREFIX}${type}`) + .join(" | ")};\n`; +} + +code += `\ndeclare module "@babel/types" { + ${lines + .join("\n") + .replace(/\n/g, "\n ") + .trim()} +}\n`; + +// + +process.stdout.write(code); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js b/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js new file mode 100644 index 0000000000..26bdb8dccb --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js @@ -0,0 +1,44 @@ +"use strict"; +const definitions = require("../../lib/definitions"); + +function addAssertHelper(type) { + return `export function assert${type}(node: Object, opts?: Object = {}): void { + assert("${type}", node, opts) } + `; +} + +module.exports = function generateAsserts() { + let output = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import is from "../../validators/is"; + +function assert(type: string, node: Object, opts?: Object): void { + if (!is(type, node, opts)) { + throw new Error( + \`Expected type "\${type}" with option \${JSON.stringify((opts: any))}, \` + + \`but instead got "\${node.type}".\`, + ); + } +}\n\n`; + + Object.keys(definitions.VISITOR_KEYS).forEach(type => { + output += addAssertHelper(type); + }); + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += addAssertHelper(type); + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + output += `export function assert${type}(node: Object, opts: Object): void { + console.trace("The node type ${type} has been renamed to ${newType}"); + assert("${type}", node, opts); +}\n`; + }); + + return output; +}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js b/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js new file mode 100644 index 0000000000..08a5b6fc61 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js @@ -0,0 +1,43 @@ +"use strict"; +const definitions = require("../../lib/definitions"); +const formatBuilderName = require("../utils/formatBuilderName"); +const lowerFirst = require("../utils/lowerFirst"); + +module.exports = function generateBuilders() { + let output = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import builder from "../builder";\n\n`; + + Object.keys(definitions.BUILDER_KEYS).forEach(type => { + output += `export function ${type}(...args: Array): Object { return builder("${type}", ...args); } +export { ${type} as ${formatBuilderName(type)} };\n`; + + // This is needed for backwards compatibility. + // It should be removed in the next major version. + // JSXIdentifier -> jSXIdentifier + if (/^[A-Z]{2}/.test(type)) { + output += `export { ${type} as ${lowerFirst(type)} }\n`; + } + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + output += `export function ${type}(...args: Array): Object { + console.trace("The node type ${type} has been renamed to ${newType}"); + return ${type}("${type}", ...args); +} +export { ${type} as ${formatBuilderName(type)} };\n`; + + // This is needed for backwards compatibility. + // It should be removed in the next major version. + // JSXIdentifier -> jSXIdentifier + if (/^[A-Z]{2}/.test(type)) { + output += `export { ${type} as ${lowerFirst(type)} }\n`; + } + }); + + return output; +}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js b/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js new file mode 100644 index 0000000000..1e4d2cabae --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js @@ -0,0 +1,17 @@ +"use strict"; +const definitions = require("../../lib/definitions"); + +module.exports = function generateConstants() { + let output = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import { FLIPPED_ALIAS_KEYS } from "../../definitions";\n\n`; + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += `export const ${type.toUpperCase()}_TYPES = FLIPPED_ALIAS_KEYS["${type}"];\n`; + }); + + return output; +}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js b/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js new file mode 100644 index 0000000000..1455f99e5b --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js @@ -0,0 +1,78 @@ +"use strict"; +const definitions = require("../../lib/definitions"); + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function joinComparisons(leftArr, right) { + return ( + leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}` + ); +} + +function addIsHelper(type, aliasKeys, deprecated) { + const targetType = JSON.stringify(type); + let aliasSource = ""; + if (aliasKeys) { + aliasSource = " || " + joinComparisons(aliasKeys, "nodeType"); + } + + let placeholderSource = ""; + const placeholderTypes = []; + if ( + definitions.PLACEHOLDERS.includes(type) && + has(definitions.FLIPPED_ALIAS_KEYS, type) + ) { + placeholderTypes.push(type); + } + if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) { + placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]); + } + if (placeholderTypes.length > 0) { + placeholderSource = + ' || nodeType === "Placeholder" && (' + + joinComparisons(placeholderTypes, "node.expectedNode") + + ")"; + } + + return `export function is${type}(node: ?Object, opts?: Object): boolean { + ${deprecated || ""} + if (!node) return false; + + const nodeType = node.type; + if (nodeType === ${targetType}${aliasSource}${placeholderSource}) { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; + } + `; +} + +module.exports = function generateValidators() { + let output = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import shallowEqual from "../../utils/shallowEqual";\n\n`; + + Object.keys(definitions.VISITOR_KEYS).forEach(type => { + output += addIsHelper(type); + }); + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; + output += addIsHelper(type, null, deprecated); + }); + + return output; +}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/typescript.js b/packages/common/node_modules/@babel/types/scripts/generators/typescript.js new file mode 100644 index 0000000000..298e22e9ee --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/generators/typescript.js @@ -0,0 +1,362 @@ +"use strict"; + +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray | null; + innerComments: ReadonlyArray | null; + trailingComments: ReadonlyArray | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; +} + +export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); + const builderNames = t.BUILDER_KEYS[type]; + + const struct = ['type: "' + type + '";']; + const args = []; + + fieldNames.forEach(fieldName => { + const field = fields[fieldName]; + // Future / annoying TODO: + // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either: + // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key, + // - declare an alias type for valid keys, detect the case and reuse it here, + // - declare a disjoint union with, for example, ObjectPropertyBase, + // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty + // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)" + let typeAnnotation = stringifyValidator(field.validate, ""); + + if (isNullable(field) && !hasDefault(field)) { + typeAnnotation += " | null"; + } + + if (builderNames.includes(fieldName)) { + if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) { + args.push( + `${t.toBindingIdentifierName(fieldName)}${ + isNullable(field) ? "?:" : ":" + } ${typeAnnotation}` + ); + } else { + args.push( + `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ + isNullable(field) ? " | undefined" : "" + }` + ); + } + } + + const alphaNumeric = /^\w+$/; + + if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { + struct.push(`${fieldName}: ${typeAnnotation};`); + } else { + struct.push(`"${fieldName}": ${typeAnnotation};`); + } + }); + + code += `export interface ${type} extends BaseNode { + ${struct.join("\n ").trim()} +}\n\n`; + + // super and import are reserved words in JavaScript + if (type !== "Super" && type !== "Import") { + lines.push( + `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` + ); + } else { + const functionName = toFunctionName(type); + lines.push( + `declare function _${functionName}(${args.join(", ")}): ${type};`, + `export { _${functionName} as ${functionName}}` + ); + } +} + +for (const typeName of t.TYPES) { + const result = + t.NODE_FIELDS[typeName] || t.FLIPPED_ALIAS_KEYS[typeName] + ? `node is ${typeName}` + : "boolean"; + + lines.push( + `export function is${typeName}(node: object | null | undefined, opts?: object | null): ${result};`, + // TypeScript 3.7: https://github.com/microsoft/TypeScript/pull/32695 will allow assert declarations + // eslint-disable-next-line max-len + `// export function assert${typeName}(node: object | null | undefined, opts?: object | null): asserts ${ + result === "boolean" ? "node" : result + };` + ); +} + +lines.push( + // assert/ + // Commented out as this declaration requires TypeScript 3.7 (what do?) + `// export function assertNode(obj: any): asserts obj is Node`, + + // builders/ + // eslint-disable-next-line max-len + `export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`, + `export function createUnionTypeAnnotation(types: [T]): T`, + // this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1 + // it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0 + `export function createUnionTypeAnnotation(types: ReadonlyArray): UnionTypeAnnotation`, + // this smells like "internal API" + // eslint-disable-next-line max-len + `export function buildChildren(node: { children: ReadonlyArray }): JSXElement['children']`, + + // clone/ + `export function clone(n: T): T;`, + `export function cloneDeep(n: T): T;`, + `export function cloneDeepWithoutLoc(n: T): T;`, + `export function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T;`, + `export function cloneWithoutLoc(n: T): T;`, + + // comments/ + `export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, + // eslint-disable-next-line max-len + `export function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, + // eslint-disable-next-line max-len + `export function addComments(node: T, type: CommentTypeShorthand, comments: ReadonlyArray): T`, + `export function inheritInnerComments(node: Node, parent: Node): void`, + `export function inheritLeadingComments(node: Node, parent: Node): void`, + `export function inheritsComments(node: T, parent: Node): void`, + `export function inheritTrailingComments(node: Node, parent: Node): void`, + `export function removeComments(node: T): T`, + + // converters/ + // eslint-disable-next-line max-len + `export function ensureBlock(node: Extract): BlockStatement`, + // too complex? + // eslint-disable-next-line max-len + `export function ensureBlock = 'body'>(node: Extract>, key: K): BlockStatement`, + // gatherSequenceExpressions is not exported + `export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`, + `export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`, + // it is possible for `node` to be an arbitrary object if `key` is always provided, + // but that doesn't look like intended API + // eslint-disable-next-line max-len + `export function toComputedKey>(node: T, key?: Expression | Identifier): Expression`, + `export function toExpression(node: Function): FunctionExpression`, + `export function toExpression(node: Class): ClassExpression`, + `export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression`, + `export function toIdentifier(name: { toString(): string } | null | undefined): string`, + `export function toKeyAlias(node: Method | Property, key?: Node): string`, + // NOTE: this actually uses Scope from @babel/traverse, but we can't add a dependency on its types, + // as they live in @types. Declare the structural subset that is required. + // eslint-disable-next-line max-len + `export function toSequenceExpression(nodes: ReadonlyArray, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined`, + `export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement`, + `export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement`, + `export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined`, + `export function toStatement(node: Class, ignore?: boolean): ClassDeclaration`, + `export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined`, + `export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration`, + // eslint-disable-next-line max-len + `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined`, + // eslint-disable-next-line max-len + `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement`, + // eslint-disable-next-line max-len + `export function valueToNode(value: undefined): Identifier`, // (should this not be a UnaryExpression to avoid shadowing?) + `export function valueToNode(value: boolean): BooleanLiteral`, + `export function valueToNode(value: null): NullLiteral`, + `export function valueToNode(value: string): StringLiteral`, + // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression + `export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression`, + `export function valueToNode(value: RegExp): RegExpLiteral`, + // eslint-disable-next-line max-len + `export function valueToNode(value: ReadonlyArray): ArrayExpression`, + // this throws with objects that are not PlainObject according to lodash, + // or if there are non-valueToNode-able values + `export function valueToNode(value: object): ObjectExpression`, + // eslint-disable-next-line max-len + `export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression`, + + // modifications/ + // eslint-disable-next-line max-len + `export function removeTypeDuplicates(types: ReadonlyArray): FlowType[]`, + // eslint-disable-next-line max-len + `export function appendToMemberExpression>(member: T, append: MemberExpression['property'], computed?: boolean): T`, + // eslint-disable-next-line max-len + `export function inherits(child: T, parent: Node | null | undefined): T`, + // eslint-disable-next-line max-len + `export function prependToMemberExpression>(member: T, prepend: MemberExpression['object']): T`, + `export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void;`, + `export function removePropertiesDeep( + n: T, + opts?: { preserveComments: boolean } | null +): T;`, + + // retrievers/ + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record>`, + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record`, + // eslint-disable-next-line max-len + `export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record>`, + // eslint-disable-next-line max-len + `export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record>`, + `export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record`, + // eslint-disable-next-line max-len + `export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record>`, + + // traverse/ + `export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, + }>; + export type TraversalHandler = ( + this: undefined, node: Node, parent: TraversalAncestors, type: T + ) => void; + export type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void;`, + `export function traverseFast(n: Node, h: TraversalHandler, state?: T): void;`, + + // utils/ + // cleanJSXElementLiteralChild is not exported + // inherit is not exported + `export function shallowEqual(actual: object, expected: T): actual is T`, + + // validators/ + // eslint-disable-next-line max-len + `export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression`, + // eslint-disable-next-line max-len + `export function is(type: T, n: Node | null | undefined, required?: undefined): n is Extract`, + // eslint-disable-next-line max-len + `export function is>(type: T, n: Node | null | undefined, required: Partial

): n is P`, + // eslint-disable-next-line max-len + `export function is

(type: string, n: Node | null | undefined, required: Partial

): n is P`, + `export function is(type: string, n: Node | null | undefined, required?: Partial): n is Node`, + `export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean`, + // eslint-disable-next-line max-len + `export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration`, + `export function isImmutable(node: Node): node is Immutable`, + `export function isLet(node: Node): node is VariableDeclaration`, + `export function isNode(node: object | null | undefined): node is Node`, + `export function isNodesEquivalent>(a: T, b: any): b is T`, + `export function isNodesEquivalent(a: any, b: any): boolean`, + `export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean`, + `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`, + `export function isScope(node: Node, parent: Node): node is Scopable`, + `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`, + `export function isType(nodetype: string, targetType: T): nodetype is T`, + `export function isType(nodetype: string | null | undefined, targetType: string): boolean`, + `export function isValidES3Identifier(name: string): boolean`, + `export function isValidIdentifier(name: string): boolean`, + `export function isVar(node: Node): node is VariableDeclaration`, + // the MemberExpression implication is incidental, but it follows from the implementation + // eslint-disable-next-line max-len + `export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray, allowPartial?: boolean): node is MemberExpression`, + // TypeScript 3.7: ": asserts n is T" + // eslint-disable-next-line max-len + `export function validate(n: Node | null | undefined, key: K, value: T[K]): void`, + `export function validate(n: Node, key: string, value: any): void;` +); + +for (const type in t.DEPRECATED_KEYS) { + code += `/** + * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` + */ +export type ${type} = ${t.DEPRECATED_KEYS[type]};\n +`; +} + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `export type ${type} = ${types + .map(type => `${type}`) + .join(" | ")};\n`; +} +code += "\n"; + +code += "export interface Aliases {\n"; +for (const type in t.FLIPPED_ALIAS_KEYS) { + code += ` ${type}: ${type};\n`; +} +code += "}\n\n"; + +code += lines.join("\n") + "\n"; + +// + +process.stdout.write(code); + +// + +function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { + const index = fieldNames.indexOf(fieldName); + return fieldNames.slice(index).every(_ => isNullable(fields[_])); +} + +function hasDefault(field) { + return field.default != null; +} + +function isNullable(field) { + return field.optional || hasDefault(field); +} + +function sortFieldNames(fields, type) { + return fields.sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }); +} diff --git a/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js new file mode 100644 index 0000000000..621c468219 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js @@ -0,0 +1,10 @@ +"use strict"; + +const toLowerCase = Function.call.bind("".toLowerCase); + +module.exports = function formatBuilderName(type) { + // FunctionExpression -> functionExpression + // JSXIdentifier -> jsxIdentifier + // V8IntrinsicIdentifier -> v8IntrinsicIdentifier + return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase); +}; diff --git a/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js b/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js new file mode 100644 index 0000000000..9e7b0cee51 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js @@ -0,0 +1,4 @@ +"use strict"; +module.exports = function lowerFirst(string) { + return string[0].toLowerCase() + string.slice(1); +}; diff --git a/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js new file mode 100644 index 0000000000..2ea1e80357 --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js @@ -0,0 +1,66 @@ +module.exports = function stringifyValidator(validator, nodePrefix) { + if (validator === undefined) { + return "any"; + } + + if (validator.each) { + return `Array<${stringifyValidator(validator.each, nodePrefix)}>`; + } + + if (validator.chainOf) { + return stringifyValidator(validator.chainOf[1], nodePrefix); + } + + if (validator.oneOf) { + return validator.oneOf.map(JSON.stringify).join(" | "); + } + + if (validator.oneOfNodeTypes) { + return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | "); + } + + if (validator.oneOfNodeOrValueTypes) { + return validator.oneOfNodeOrValueTypes + .map(_ => { + return isValueType(_) ? _ : nodePrefix + _; + }) + .join(" | "); + } + + if (validator.type) { + return validator.type; + } + + if (validator.shapeOf) { + return ( + "{ " + + Object.keys(validator.shapeOf) + .map(shapeKey => { + const propertyDefinition = validator.shapeOf[shapeKey]; + if (propertyDefinition.validate) { + const isOptional = + propertyDefinition.optional || propertyDefinition.default != null; + return ( + shapeKey + + (isOptional ? "?: " : ": ") + + stringifyValidator(propertyDefinition.validate) + ); + } + return null; + }) + .filter(Boolean) + .join(", ") + + " }" + ); + } + + return ["any"]; +}; + +/** + * Heuristic to decide whether or not the given type is a value type (eg. "null") + * or a Node type (eg. "Expression"). + */ +function isValueType(type) { + return type.charAt(0).toLowerCase() === type.charAt(0); +} diff --git a/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js b/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js new file mode 100644 index 0000000000..627c9a7d8f --- /dev/null +++ b/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js @@ -0,0 +1,4 @@ +module.exports = function toFunctionName(typeName) { + const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); + return _.slice(0, 1).toLowerCase() + _.slice(1); +}; diff --git a/packages/common/node_modules/@jest/transform/LICENSE b/packages/common/node_modules/@jest/transform/LICENSE new file mode 100644 index 0000000000..b96dcb0480 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts new file mode 100644 index 0000000000..61b348bad2 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +import type { Options, TransformResult } from './types'; +export default class ScriptTransformer { + private _cache; + private _config; + private _transformCache; + private _transformConfigCache; + constructor(config: Config.ProjectConfig); + private _getCacheKey; + private _getFileCachePath; + private _getTransformPath; + private _getTransformer; + private _instrumentFile; + private _getRealPath; + preloadTransformer(filepath: Config.Path): void; + transformSource(filepath: Config.Path, content: string, instrument: boolean, supportsDynamicImport?: boolean, supportsStaticESM?: boolean): TransformResult; + private _transformAndBuildScript; + transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult; + transformJson(filename: Config.Path, options: Options, fileSource: string): string; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => void): ModuleType; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => Promise): Promise; + /** + * @deprecated use `this.shouldTransform` instead + */ + private _shouldTransform; + shouldTransform(filename: Config.Path): boolean; +} +export declare function createTranspilingRequire(config: Config.ProjectConfig): (resolverPath: string, applyInteropRequireDefault?: boolean) => TModuleType; +//# sourceMappingURL=ScriptTransformer.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map new file mode 100644 index 0000000000..560c381d0f --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScriptTransformer.d.ts","sourceRoot":"","sources":["../src/ScriptTransformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAaxC,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EAGhB,MAAM,SAAS,CAAC;AAiCjB,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,qBAAqB,CAA4B;gBAE7C,MAAM,EAAE,MAAM,CAAC,aAAa;IAsBxC,OAAO,CAAC,YAAY;IAkCpB,OAAO,CAAC,iBAAiB;IAiCzB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,eAAe;IAgCvB,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,YAAY;IAUpB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI;IAK/C,eAAe,CACb,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,EACnB,qBAAqB,UAAQ,EAC7B,iBAAiB,UAAQ,GACxB,eAAe;IAgHlB,OAAO,CAAC,wBAAwB;IAmDhC,SAAS,CACP,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe;IA6BlB,aAAa,CACX,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM;IAwBT,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,UAAU;IACb,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAC/C,OAAO,CAAC,UAAU,CAAC;IA0DtB;;OAEG;IAEH,OAAO,CAAC,gBAAgB;IAIxB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;CAQhD;AAGD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,CAAC,WAAW,GAAG,OAAO,EACvB,YAAY,EAAE,MAAM,EACpB,0BAA0B,CAAC,EAAE,OAAO,KACjC,WAAW,CAef"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js new file mode 100644 index 0000000000..cf03316d3c --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js @@ -0,0 +1,884 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.createTranspilingRequire = createTranspilingRequire; +exports.default = void 0; + +function _crypto() { + const data = require('crypto'); + + _crypto = function () { + return data; + }; + + return data; +} + +function path() { + const data = _interopRequireWildcard(require('path')); + + path = function () { + return data; + }; + + return data; +} + +function _jestUtil() { + const data = require('jest-util'); + + _jestUtil = function () { + return data; + }; + + return data; +} + +function fs() { + const data = _interopRequireWildcard(require('graceful-fs')); + + fs = function () { + return data; + }; + + return data; +} + +function _core() { + const data = require('@babel/core'); + + _core = function () { + return data; + }; + + return data; +} + +function _babelPluginIstanbul() { + const data = _interopRequireDefault(require('babel-plugin-istanbul')); + + _babelPluginIstanbul = function () { + return data; + }; + + return data; +} + +function _convertSourceMap() { + const data = require('convert-source-map'); + + _convertSourceMap = function () { + return data; + }; + + return data; +} + +function _jestHasteMap() { + const data = _interopRequireDefault(require('jest-haste-map')); + + _jestHasteMap = function () { + return data; + }; + + return data; +} + +function _fastJsonStableStringify() { + const data = _interopRequireDefault(require('fast-json-stable-stringify')); + + _fastJsonStableStringify = function () { + return data; + }; + + return data; +} + +function _slash() { + const data = _interopRequireDefault(require('slash')); + + _slash = function () { + return data; + }; + + return data; +} + +function _writeFileAtomic() { + const data = require('write-file-atomic'); + + _writeFileAtomic = function () { + return data; + }; + + return data; +} + +function _realpathNative() { + const data = require('realpath-native'); + + _realpathNative = function () { + return data; + }; + + return data; +} + +function _pirates() { + const data = require('pirates'); + + _pirates = function () { + return data; + }; + + return data; +} + +var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); + +var _enhanceUnexpectedTokenMessage = _interopRequireDefault( + require('./enhanceUnexpectedTokenMessage') +); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _getRequireWildcardCache() { + if (typeof WeakMap !== 'function') return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function () { + return cache; + }; + return cache; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +// Use `require` to avoid TS rootDir +const {version: VERSION} = require('../package.json'); // This data structure is used to avoid recalculating some data every time that +// we need to transform a file. Since ScriptTransformer is instantiated for each +// file we need to keep this object in the local scope of this module. + +const projectCaches = new Map(); // To reset the cache for specific changesets (rather than package version). + +const CACHE_VERSION = '1'; + +async function waitForPromiseWithCleanup(promise, cleanup) { + try { + await promise; + } finally { + cleanup(); + } +} + +class ScriptTransformer { + constructor(config) { + _defineProperty(this, '_cache', void 0); + + _defineProperty(this, '_config', void 0); + + _defineProperty(this, '_transformCache', void 0); + + _defineProperty(this, '_transformConfigCache', void 0); + + this._config = config; + this._transformCache = new Map(); + this._transformConfigCache = new Map(); + const configString = (0, _fastJsonStableStringify().default)(this._config); + let projectCache = projectCaches.get(configString); + + if (!projectCache) { + projectCache = { + configString, + ignorePatternsRegExp: calcIgnorePatternRegExp(this._config), + transformRegExp: calcTransformRegExp(this._config), + transformedFiles: new Map() + }; + projectCaches.set(configString, projectCache); + } + + this._cache = projectCache; + } + + _getCacheKey( + fileData, + filename, + instrument, + supportsDynamicImport, + supportsStaticESM + ) { + const configString = this._cache.configString; + + const transformer = this._getTransformer(filename); + + if (transformer && typeof transformer.getCacheKey === 'function') { + return (0, _crypto().createHash)('md5') + .update( + transformer.getCacheKey(fileData, filename, configString, { + config: this._config, + instrument, + rootDir: this._config.rootDir, + supportsDynamicImport, + supportsStaticESM + }) + ) + .update(CACHE_VERSION) + .digest('hex'); + } else { + return (0, _crypto().createHash)('md5') + .update(fileData) + .update(configString) + .update(instrument ? 'instrument' : '') + .update(filename) + .update(CACHE_VERSION) + .digest('hex'); + } + } + + _getFileCachePath( + filename, + content, + instrument, + supportsDynamicImport, + supportsStaticESM + ) { + const baseCacheDir = _jestHasteMap().default.getCacheFilePath( + this._config.cacheDirectory, + 'jest-transform-cache-' + this._config.name, + VERSION + ); + + const cacheKey = this._getCacheKey( + content, + filename, + instrument, + supportsDynamicImport, + supportsStaticESM + ); // Create sub folders based on the cacheKey to avoid creating one + // directory with many files. + + const cacheDir = path().join(baseCacheDir, cacheKey[0] + cacheKey[1]); + const cacheFilenamePrefix = path() + .basename(filename, path().extname(filename)) + .replace(/\W/g, ''); + const cachePath = (0, _slash().default)( + path().join(cacheDir, cacheFilenamePrefix + '_' + cacheKey) + ); + (0, _jestUtil().createDirectory)(cacheDir); + return cachePath; + } + + _getTransformPath(filename) { + const transformRegExp = this._cache.transformRegExp; + + if (!transformRegExp) { + return undefined; + } + + for (let i = 0; i < transformRegExp.length; i++) { + if (transformRegExp[i][0].test(filename)) { + const transformPath = transformRegExp[i][1]; + + this._transformConfigCache.set(transformPath, transformRegExp[i][2]); + + return transformPath; + } + } + + return undefined; + } + + _getTransformer(filename) { + let transform = null; + + if (!this._config.transform || !this._config.transform.length) { + return null; + } + + const transformPath = this._getTransformPath(filename); + + if (transformPath) { + const transformer = this._transformCache.get(transformPath); + + if (transformer != null) { + return transformer; + } + + transform = require(transformPath); + + if (!transform) { + throw new TypeError('Jest: a transform must export something.'); + } + + const transformerConfig = this._transformConfigCache.get(transformPath); + + if (typeof transform.createTransformer === 'function') { + transform = transform.createTransformer(transformerConfig); + } + + if (typeof transform.process !== 'function') { + throw new TypeError( + 'Jest: a transform must export a `process` function.' + ); + } + + this._transformCache.set(transformPath, transform); + } + + return transform; + } + + _instrumentFile(filename, content, supportsDynamicImport, supportsStaticESM) { + const result = (0, _core().transformSync)(content, { + auxiliaryCommentBefore: ' istanbul ignore next ', + babelrc: false, + caller: { + name: '@jest/transform', + supportsDynamicImport, + supportsStaticESM + }, + configFile: false, + filename, + plugins: [ + [ + _babelPluginIstanbul().default, + { + compact: false, + // files outside `cwd` will not be instrumented + cwd: this._config.rootDir, + exclude: [], + extension: false, + useInlineSourceMaps: false + } + ] + ] + }); + + if (result) { + const {code} = result; + + if (code) { + return code; + } + } + + return content; + } + + _getRealPath(filepath) { + try { + return (0, _realpathNative().sync)(filepath) || filepath; + } catch (err) { + return filepath; + } + } // We don't want to expose transformers to the outside - this function is just + // to warm up `this._transformCache` + + preloadTransformer(filepath) { + this._getTransformer(filepath); + } // TODO: replace third argument with TransformOptions in Jest 26 + + transformSource( + filepath, + content, + instrument, + supportsDynamicImport = false, + supportsStaticESM = false + ) { + const filename = this._getRealPath(filepath); + + const transform = this._getTransformer(filename); + + const cacheFilePath = this._getFileCachePath( + filename, + content, + instrument, + supportsDynamicImport, + supportsStaticESM + ); + + let sourceMapPath = cacheFilePath + '.map'; // Ignore cache if `config.cache` is set (--no-cache) + + let code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null; + const shouldCallTransform = transform && this.shouldTransform(filename); // That means that the transform has a custom instrumentation + // logic and will handle it based on `config.collectCoverage` option + + const transformWillInstrument = + shouldCallTransform && transform && transform.canInstrument; // If we handle the coverage instrumentation, we should try to map code + // coverage against original source with any provided source map + + const mapCoverage = instrument && !transformWillInstrument; + + if (code) { + // This is broken: we return the code, and a path for the source map + // directly from the cache. But, nothing ensures the source map actually + // matches that source code. They could have gotten out-of-sync in case + // two separate processes write concurrently to the same cache files. + return { + code, + mapCoverage, + originalCode: content, + sourceMapPath + }; + } + + let transformed = { + code: content, + map: null + }; + + if (transform && shouldCallTransform) { + const processed = transform.process(content, filename, this._config, { + instrument, + supportsDynamicImport, + supportsStaticESM + }); + + if (typeof processed === 'string') { + transformed.code = processed; + } else if (processed != null && typeof processed.code === 'string') { + transformed = processed; + } else { + throw new TypeError( + "Jest: a transform's `process` function must return a string, " + + 'or an object with `code` key containing this string.' + ); + } + } + + if (!transformed.map) { + try { + //Could be a potential freeze here. + //See: https://github.com/facebook/jest/pull/5177#discussion_r158883570 + const inlineSourceMap = (0, _convertSourceMap().fromSource)( + transformed.code + ); + + if (inlineSourceMap) { + transformed.map = inlineSourceMap.toJSON(); + } + } catch (e) { + const transformPath = this._getTransformPath(filename); + + console.warn( + `jest-transform: The source map produced for the file ${filename} ` + + `by ${transformPath} was invalid. Proceeding without source ` + + 'mapping for that file.' + ); + } + } + + if (!transformWillInstrument && instrument) { + code = this._instrumentFile( + filename, + transformed.code, + supportsDynamicImport, + supportsStaticESM + ); + } else { + code = transformed.code; + } + + if (transformed.map) { + const sourceMapContent = + typeof transformed.map === 'string' + ? transformed.map + : JSON.stringify(transformed.map); + writeCacheFile(sourceMapPath, sourceMapContent); + } else { + sourceMapPath = null; + } + + writeCodeCacheFile(cacheFilePath, code); + return { + code, + mapCoverage, + originalCode: content, + sourceMapPath + }; + } + + _transformAndBuildScript(filename, options, instrument, fileSource) { + const { + isCoreModule, + isInternalModule, + supportsDynamicImport, + supportsStaticESM + } = options; + const content = stripShebang( + fileSource || fs().readFileSync(filename, 'utf8') + ); + let code = content; + let sourceMapPath = null; + let mapCoverage = false; + const willTransform = + !isInternalModule && + !isCoreModule && + (this.shouldTransform(filename) || instrument); + + try { + if (willTransform) { + const transformedSource = this.transformSource( + filename, + content, + instrument, + supportsDynamicImport, + supportsStaticESM + ); + code = transformedSource.code; + sourceMapPath = transformedSource.sourceMapPath; + mapCoverage = transformedSource.mapCoverage; + } + + return { + code, + mapCoverage, + originalCode: content, + sourceMapPath + }; + } catch (e) { + throw (0, _enhanceUnexpectedTokenMessage.default)(e); + } + } + + transform(filename, options, fileSource) { + let scriptCacheKey = undefined; + let instrument = false; + + if (!options.isCoreModule) { + instrument = + options.coverageProvider === 'babel' && + (0, _shouldInstrument.default)(filename, options, this._config); + scriptCacheKey = getScriptCacheKey(filename, instrument); + + const result = this._cache.transformedFiles.get(scriptCacheKey); + + if (result) { + return result; + } + } + + const result = this._transformAndBuildScript( + filename, + options, + instrument, + fileSource + ); + + if (scriptCacheKey) { + this._cache.transformedFiles.set(scriptCacheKey, result); + } + + return result; + } + + transformJson(filename, options, fileSource) { + const { + isCoreModule, + isInternalModule, + supportsDynamicImport, + supportsStaticESM + } = options; + const willTransform = + !isInternalModule && !isCoreModule && this.shouldTransform(filename); + + if (willTransform) { + const {code: transformedJsonSource} = this.transformSource( + filename, + fileSource, + false, + supportsDynamicImport, + supportsStaticESM + ); + return transformedJsonSource; + } + + return fileSource; + } + + requireAndTranspileModule(moduleName, callback) { + // Load the transformer to avoid a cycle where we need to load a + // transformer in order to transform it in the require hooks + this.preloadTransformer(moduleName); + let transforming = false; + const revertHook = (0, _pirates().addHook)( + (code, filename) => { + try { + transforming = true; + return ( + // we might wanna do `supportsDynamicImport` at some point + this.transformSource(filename, code, false, false, false).code || + code + ); + } finally { + transforming = false; + } + }, + { + exts: this._config.moduleFileExtensions.map(ext => `.${ext}`), + ignoreNodeModules: false, + matcher: filename => { + if (transforming) { + // Don't transform any dependency required by the transformer itself + return false; + } + + return this.shouldTransform(filename); + } + } + ); + + const module = require(moduleName); + + if (!callback) { + revertHook(); + return module; + } + + try { + const cbResult = callback(module); + + if ((0, _jestUtil().isPromise)(cbResult)) { + return waitForPromiseWithCleanup(cbResult, revertHook).then( + () => module + ); + } + } finally { + revertHook(); + } + + return module; + } + /** + * @deprecated use `this.shouldTransform` instead + */ + // @ts-ignore: Unused and private - remove in Jest 25 + + _shouldTransform(filename) { + return this.shouldTransform(filename); + } + + shouldTransform(filename) { + const ignoreRegexp = this._cache.ignorePatternsRegExp; + const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false; + return ( + !!this._config.transform && !!this._config.transform.length && !isIgnored + ); + } +} // TODO: do we need to define the generics twice? + +exports.default = ScriptTransformer; + +function createTranspilingRequire(config) { + const transformer = new ScriptTransformer(config); + return function requireAndTranspileModule( + resolverPath, + applyInteropRequireDefault = false + ) { + const transpiledModule = transformer.requireAndTranspileModule( + resolverPath + ); + return applyInteropRequireDefault + ? (0, _jestUtil().interopRequireDefault)(transpiledModule).default + : transpiledModule; + }; +} + +const removeFile = path => { + try { + fs().unlinkSync(path); + } catch (e) {} +}; + +const stripShebang = content => { + // If the file data starts with a shebang remove it. Leaves the empty line + // to keep stack trace line numbers correct. + if (content.startsWith('#!')) { + return content.replace(/^#!.*/, ''); + } else { + return content; + } +}; +/** + * This is like `writeCacheFile` but with an additional sanity checksum. We + * cannot use the same technique for source maps because we expose source map + * cache file paths directly to callsites, with the expectation they can read + * it right away. This is not a great system, because source map cache file + * could get corrupted, out-of-sync, etc. + */ + +function writeCodeCacheFile(cachePath, code) { + const checksum = (0, _crypto().createHash)('md5').update(code).digest('hex'); + writeCacheFile(cachePath, checksum + '\n' + code); +} +/** + * Read counterpart of `writeCodeCacheFile`. We verify that the content of the + * file matches the checksum, in case some kind of corruption happened. This + * could happen if an older version of `jest-runtime` writes non-atomically to + * the same cache, for example. + */ + +function readCodeCacheFile(cachePath) { + const content = readCacheFile(cachePath); + + if (content == null) { + return null; + } + + const code = content.substr(33); + const checksum = (0, _crypto().createHash)('md5').update(code).digest('hex'); + + if (checksum === content.substr(0, 32)) { + return code; + } + + return null; +} +/** + * Writing to the cache atomically relies on 'rename' being atomic on most + * file systems. Doing atomic write reduces the risk of corruption by avoiding + * two processes to write to the same file at the same time. It also reduces + * the risk of reading a file that's being overwritten at the same time. + */ + +const writeCacheFile = (cachePath, fileData) => { + try { + (0, _writeFileAtomic().sync)(cachePath, fileData, { + encoding: 'utf8', + fsync: false + }); + } catch (e) { + if (cacheWriteErrorSafeToIgnore(e, cachePath)) { + return; + } + + e.message = + 'jest: failed to cache transform results in: ' + + cachePath + + '\nFailure message: ' + + e.message; + removeFile(cachePath); + throw e; + } +}; +/** + * On Windows, renames are not atomic, leading to EPERM exceptions when two + * processes attempt to rename to the same target file at the same time. + * If the target file exists we can be reasonably sure another process has + * legitimately won a cache write race and ignore the error. + */ + +const cacheWriteErrorSafeToIgnore = (e, cachePath) => + process.platform === 'win32' && + e.code === 'EPERM' && + fs().existsSync(cachePath); + +const readCacheFile = cachePath => { + if (!fs().existsSync(cachePath)) { + return null; + } + + let fileData; + + try { + fileData = fs().readFileSync(cachePath, 'utf8'); + } catch (e) { + e.message = + 'jest: failed to read cache file: ' + + cachePath + + '\nFailure message: ' + + e.message; + removeFile(cachePath); + throw e; + } + + if (fileData == null) { + // We must have somehow created the file but failed to write to it, + // let's delete it and retry. + removeFile(cachePath); + } + + return fileData; +}; + +const getScriptCacheKey = (filename, instrument) => { + const mtime = fs().statSync(filename).mtime; + return filename + '_' + mtime.getTime() + (instrument ? '_instrumented' : ''); +}; + +const calcIgnorePatternRegExp = config => { + if ( + !config.transformIgnorePatterns || + config.transformIgnorePatterns.length === 0 + ) { + return undefined; + } + + return new RegExp(config.transformIgnorePatterns.join('|')); +}; + +const calcTransformRegExp = config => { + if (!config.transform.length) { + return undefined; + } + + const transformRegexp = []; + + for (let i = 0; i < config.transform.length; i++) { + transformRegexp.push([ + new RegExp(config.transform[i][0]), + config.transform[i][1], + config.transform[i][2] + ]); + } + + return transformRegexp; +}; diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts new file mode 100644 index 0000000000..37dbb24d28 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +interface ErrorWithCodeFrame extends Error { + codeFrame?: string; +} +export default function handlePotentialSyntaxError(e: ErrorWithCodeFrame): ErrorWithCodeFrame; +export declare function enhanceUnexpectedTokenMessage(e: Error): Error; +export {}; +//# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map new file mode 100644 index 0000000000..7e988990c0 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,UAAU,kBAAmB,SAAQ,KAAK;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,CAAC,EAAE,kBAAkB,GACpB,kBAAkB,CAgBpB;AAED,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CA2B7D"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js new file mode 100644 index 0000000000..be98f7a23a --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js @@ -0,0 +1,75 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = handlePotentialSyntaxError; +exports.enhanceUnexpectedTokenMessage = enhanceUnexpectedTokenMessage; + +function _chalk() { + const data = _interopRequireDefault(require('chalk')); + + _chalk = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const DOT = ' \u2022 '; + +function handlePotentialSyntaxError(e) { + if (e.codeFrame) { + e.stack = e.message + '\n' + e.codeFrame; + } + + if ( + // `instanceof` might come from the wrong context + e.name === 'SyntaxError' && + (e.message.includes('Unexpected token') || + e.message.includes('Cannot use import')) && + !e.message.includes(' expected') + ) { + throw enhanceUnexpectedTokenMessage(e); + } + + return e; +} + +function enhanceUnexpectedTokenMessage(e) { + e.stack = + `${_chalk().default.bold.red('Jest encountered an unexpected token')} + +This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript. + +By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules". + +Here's what you can do: +${DOT}To have some of your "node_modules" files transformed, you can specify a custom ${_chalk().default.bold( + '"transformIgnorePatterns"' + )} in your config. +${DOT}If you need a custom transformation specify a ${_chalk().default.bold( + '"transform"' + )} option in your config. +${DOT}If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the ${_chalk().default.bold( + '"moduleNameMapper"' + )} config option. + +You'll find more details and examples of these config options in the docs: +${_chalk().default.cyan('https://jestjs.io/docs/en/configuration.html')} + +${_chalk().default.bold.red('Details:')} + +` + e.stack; + return e; +} diff --git a/packages/common/node_modules/@jest/transform/build/index.d.ts b/packages/common/node_modules/@jest/transform/build/index.d.ts new file mode 100644 index 0000000000..1ec6d9da20 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/index.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export { default as ScriptTransformer, createTranspilingRequire, } from './ScriptTransformer'; +export { default as shouldInstrument } from './shouldInstrument'; +export type { CacheKeyOptions, Transformer, ShouldInstrumentOptions, Options as TransformationOptions, TransformOptions, TransformResult, TransformedSource, } from './types'; +export { default as handlePotentialSyntaxError } from './enhanceUnexpectedTokenMessage'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/index.d.ts.map b/packages/common/node_modules/@jest/transform/build/index.d.ts.map new file mode 100644 index 0000000000..66689b37c4 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EACV,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,OAAO,IAAI,qBAAqB,EAChC,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,OAAO,IAAI,0BAA0B,EAAC,MAAM,iCAAiC,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/index.js b/packages/common/node_modules/@jest/transform/build/index.js new file mode 100644 index 0000000000..b470f3a454 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/index.js @@ -0,0 +1,85 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +Object.defineProperty(exports, 'ScriptTransformer', { + enumerable: true, + get: function () { + return _ScriptTransformer.default; + } +}); +Object.defineProperty(exports, 'createTranspilingRequire', { + enumerable: true, + get: function () { + return _ScriptTransformer.createTranspilingRequire; + } +}); +Object.defineProperty(exports, 'shouldInstrument', { + enumerable: true, + get: function () { + return _shouldInstrument.default; + } +}); +Object.defineProperty(exports, 'handlePotentialSyntaxError', { + enumerable: true, + get: function () { + return _enhanceUnexpectedTokenMessage.default; + } +}); + +var _ScriptTransformer = _interopRequireWildcard( + require('./ScriptTransformer') +); + +var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); + +var _enhanceUnexpectedTokenMessage = _interopRequireDefault( + require('./enhanceUnexpectedTokenMessage') +); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _getRequireWildcardCache() { + if (typeof WeakMap !== 'function') return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function () { + return cache; + }; + return cache; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts new file mode 100644 index 0000000000..45e149ed02 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +import type { ShouldInstrumentOptions } from './types'; +export default function shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean; +//# sourceMappingURL=shouldInstrument.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map new file mode 100644 index 0000000000..fd1eb0575a --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shouldInstrument.d.ts","sourceRoot":"","sources":["../src/shouldInstrument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAIxC,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAMrD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,OAAO,CA8ET"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.js b/packages/common/node_modules/@jest/transform/build/shouldInstrument.js new file mode 100644 index 0000000000..d855c0cf66 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/shouldInstrument.js @@ -0,0 +1,191 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = shouldInstrument; + +function path() { + const data = _interopRequireWildcard(require('path')); + + path = function () { + return data; + }; + + return data; +} + +function _jestRegexUtil() { + const data = require('jest-regex-util'); + + _jestRegexUtil = function () { + return data; + }; + + return data; +} + +function _jestUtil() { + const data = require('jest-util'); + + _jestUtil = function () { + return data; + }; + + return data; +} + +function _micromatch() { + const data = _interopRequireDefault(require('micromatch')); + + _micromatch = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _getRequireWildcardCache() { + if (typeof WeakMap !== 'function') return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function () { + return cache; + }; + return cache; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const MOCKS_PATTERN = new RegExp( + (0, _jestRegexUtil().escapePathForRegex)( + path().sep + '__mocks__' + path().sep + ) +); + +function shouldInstrument(filename, options, config) { + if (!options.collectCoverage) { + return false; + } + + if ( + config.forceCoverageMatch.length && + _micromatch().default.any(filename, config.forceCoverageMatch) + ) { + return true; + } + + if ( + !config.testPathIgnorePatterns.some(pattern => !!filename.match(pattern)) + ) { + if (config.testRegex.some(regex => new RegExp(regex).test(filename))) { + return false; + } + + if ( + (0, _micromatch().default)( + [(0, _jestUtil().replacePathSepForGlob)(filename)], + config.testMatch + ).length + ) { + return false; + } + } + + if ( + // This configuration field contains an object in the form of: + // {'path/to/file.js': true} + options.collectCoverageOnlyFrom && + !options.collectCoverageOnlyFrom[filename] + ) { + return false; + } + + if ( + // still cover if `only` is specified + !options.collectCoverageOnlyFrom && + options.collectCoverageFrom.length && + (0, _micromatch().default)( + [ + (0, _jestUtil().replacePathSepForGlob)( + path().relative(config.rootDir, filename) + ) + ], + options.collectCoverageFrom + ).length === 0 + ) { + return false; + } + + if ( + config.coveragePathIgnorePatterns.some(pattern => !!filename.match(pattern)) + ) { + return false; + } + + if (config.globalSetup === filename) { + return false; + } + + if (config.globalTeardown === filename) { + return false; + } + + if (config.setupFiles.includes(filename)) { + return false; + } + + if (config.setupFilesAfterEnv.includes(filename)) { + return false; + } + + if (MOCKS_PATTERN.test(filename)) { + return false; + } + + if (options.changedFiles && !options.changedFiles.has(filename)) { + return false; + } + + return true; +} diff --git a/packages/common/node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts b/packages/common/node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts new file mode 100644 index 0000000000..46328f3ca4 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import { Config } from '@jest/types'; +import { Options, TransformResult } from './types'; +export default class ScriptTransformer { + private _cache; + private _config; + private _transformCache; + private _transformConfigCache; + constructor(config: Config.ProjectConfig); + private _getCacheKey; + private _getFileCachePath; + private _getTransformPath; + private _getTransformer; + private _instrumentFile; + private _getRealPath; + preloadTransformer(filepath: Config.Path): void; + transformSource(filepath: Config.Path, content: string, instrument: boolean, supportsDynamicImport?: boolean, supportsStaticESM?: boolean): TransformResult; + private _transformAndBuildScript; + transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult; + transformJson(filename: Config.Path, options: Options, fileSource: string): string; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => void): ModuleType; + requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => Promise): Promise; + /** + * @deprecated use `this.shouldTransform` instead + */ + private _shouldTransform; + shouldTransform(filename: Config.Path): boolean; +} +export declare function createTranspilingRequire(config: Config.ProjectConfig): (resolverPath: string, applyInteropRequireDefault?: boolean) => TModuleType; +//# sourceMappingURL=ScriptTransformer.d.ts.map diff --git a/packages/common/node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts b/packages/common/node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts new file mode 100644 index 0000000000..5f1e3162e5 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +interface ErrorWithCodeFrame extends Error { + codeFrame?: string; +} +export default function handlePotentialSyntaxError(e: ErrorWithCodeFrame): ErrorWithCodeFrame; +export declare function enhanceUnexpectedTokenMessage(e: Error): Error; +export {}; +//# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map diff --git a/packages/common/node_modules/@jest/transform/build/ts3.4/index.d.ts b/packages/common/node_modules/@jest/transform/build/ts3.4/index.d.ts new file mode 100644 index 0000000000..241bb2617b --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ts3.4/index.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export { default as ScriptTransformer, createTranspilingRequire, } from './ScriptTransformer'; +export { default as shouldInstrument } from './shouldInstrument'; +export { CacheKeyOptions, Transformer, ShouldInstrumentOptions, Options as TransformationOptions, TransformOptions, TransformResult, TransformedSource, } from './types'; +export { default as handlePotentialSyntaxError } from './enhanceUnexpectedTokenMessage'; +//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts b/packages/common/node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts new file mode 100644 index 0000000000..89f476e8b1 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import { Config } from '@jest/types'; +import { ShouldInstrumentOptions } from './types'; +export default function shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean; +//# sourceMappingURL=shouldInstrument.d.ts.map diff --git a/packages/common/node_modules/@jest/transform/build/ts3.4/types.d.ts b/packages/common/node_modules/@jest/transform/build/ts3.4/types.d.ts new file mode 100644 index 0000000000..f443f3bcdd --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/ts3.4/types.d.ts @@ -0,0 +1,43 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import { RawSourceMap } from 'source-map'; +import { Config, TransformTypes } from '@jest/types'; +export declare type ShouldInstrumentOptions = Pick & { + changedFiles?: Set; +}; +export declare type Options = ShouldInstrumentOptions & Partial<{ + isCoreModule: boolean; + isInternalModule: boolean; + supportsDynamicImport: boolean; + supportsStaticESM: boolean; +}>; +declare type SourceMapWithVersion = Pick>; +interface FixedRawSourceMap extends SourceMapWithVersion { + version: number; +} +export declare type TransformedSource = { + code: string; + map?: FixedRawSourceMap | string | null; +} | string; +export declare type TransformResult = TransformTypes.TransformResult; +export interface TransformOptions { + instrument: boolean; + supportsDynamicImport?: boolean; + supportsStaticESM?: boolean; +} +export interface CacheKeyOptions extends TransformOptions { + config: Config.ProjectConfig; + rootDir: string; +} +export interface Transformer { + canInstrument?: boolean; + createTransformer?: (options?: any) => Transformer; + getCacheKey?: (fileData: string, filePath: Config.Path, configStr: string, options: CacheKeyOptions) => string; + process: (sourceText: string, sourcePath: Config.Path, config: Config.ProjectConfig, options?: TransformOptions) => TransformedSource; +} +export {}; +//# sourceMappingURL=types.d.ts.map diff --git a/packages/common/node_modules/@jest/transform/build/types.d.ts b/packages/common/node_modules/@jest/transform/build/types.d.ts new file mode 100644 index 0000000000..9cf7583530 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/types.d.ts @@ -0,0 +1,43 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { RawSourceMap } from 'source-map'; +import type { Config, TransformTypes } from '@jest/types'; +export declare type ShouldInstrumentOptions = Pick & { + changedFiles?: Set; +}; +export declare type Options = ShouldInstrumentOptions & Partial<{ + isCoreModule: boolean; + isInternalModule: boolean; + supportsDynamicImport: boolean; + supportsStaticESM: boolean; +}>; +declare type SourceMapWithVersion = Omit; +interface FixedRawSourceMap extends SourceMapWithVersion { + version: number; +} +export declare type TransformedSource = { + code: string; + map?: FixedRawSourceMap | string | null; +} | string; +export declare type TransformResult = TransformTypes.TransformResult; +export interface TransformOptions { + instrument: boolean; + supportsDynamicImport?: boolean; + supportsStaticESM?: boolean; +} +export interface CacheKeyOptions extends TransformOptions { + config: Config.ProjectConfig; + rootDir: string; +} +export interface Transformer { + canInstrument?: boolean; + createTransformer?: (options?: any) => Transformer; + getCacheKey?: (fileData: string, filePath: Config.Path, configStr: string, options: CacheKeyOptions) => string; + process: (sourceText: string, sourcePath: Config.Path, config: Config.ProjectConfig, options?: TransformOptions) => TransformedSource; +} +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/types.d.ts.map b/packages/common/node_modules/@jest/transform/build/types.d.ts.map new file mode 100644 index 0000000000..af0b33d6c2 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AAExD,oBAAY,uBAAuB,GAAG,IAAI,CACxC,MAAM,CAAC,YAAY,EACjB,iBAAiB,GACjB,qBAAqB,GACrB,yBAAyB,GACzB,kBAAkB,CACrB,GAAG;IACF,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,oBAAY,OAAO,GAAG,uBAAuB,GAC3C,OAAO,CAAC;IACN,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC,CAAC;AAGL,aAAK,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAG1D,UAAU,iBAAkB,SAAQ,oBAAoB;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,iBAAiB,GACzB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAA;CAAC,GACvD,MAAM,CAAC;AAEX,oBAAY,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IAEpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAGD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,WAAW,CAAC;IAEnD,WAAW,CAAC,EAAE,CACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,eAAe,KACrB,MAAM,CAAC;IAEZ,OAAO,EAAE,CACP,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,CAAC,IAAI,EACvB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,OAAO,CAAC,EAAE,gBAAgB,KACvB,iBAAiB,CAAC;CACxB"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/types.js b/packages/common/node_modules/@jest/transform/build/types.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/build/types.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/transform/package.json b/packages/common/node_modules/@jest/transform/package.json new file mode 100644 index 0000000000..91d3ed4a50 --- /dev/null +++ b/packages/common/node_modules/@jest/transform/package.json @@ -0,0 +1,54 @@ +{ + "name": "@jest/transform", + "version": "25.3.0", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-transform" + }, + "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", + "typesVersions": { + "<3.8": { + "build/*": [ + "build/ts3.4/*" + ] + } + }, + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^25.3.0", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^3.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.3", + "jest-haste-map": "^25.3.0", + "jest-regex-util": "^25.2.6", + "jest-util": "^25.3.0", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "realpath-native": "^2.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "devDependencies": { + "@types/babel__core": "^7.1.0", + "@types/convert-source-map": "^1.5.1", + "@types/fast-json-stable-stringify": "^2.0.0", + "@types/graceful-fs": "^4.1.2", + "@types/micromatch": "^4.0.0", + "@types/write-file-atomic": "^3.0.0", + "dedent": "^0.7.0", + "jest-snapshot-serializer-raw": "^1.1.0" + }, + "engines": { + "node": ">= 8.3" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" +} diff --git a/packages/common/node_modules/@jest/types/LICENSE b/packages/common/node_modules/@jest/types/LICENSE new file mode 100644 index 0000000000..b96dcb0480 --- /dev/null +++ b/packages/common/node_modules/@jest/types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/common/node_modules/@jest/types/build/Circus.d.ts b/packages/common/node_modules/@jest/types/build/Circus.d.ts new file mode 100644 index 0000000000..6c2475fbed --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Circus.d.ts @@ -0,0 +1,177 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import type * as Global from './Global'; +declare type Process = NodeJS.Process; +export declare type DoneFn = Global.DoneFn; +export declare type BlockFn = Global.BlockFn; +export declare type BlockName = Global.BlockName; +export declare type BlockMode = void | 'skip' | 'only' | 'todo'; +export declare type TestMode = BlockMode; +export declare type TestName = Global.TestName; +export declare type TestFn = Global.TestFn; +export declare type HookFn = (done?: DoneFn) => Promise | null | undefined; +export declare type AsyncFn = TestFn | HookFn; +export declare type SharedHookType = 'afterAll' | 'beforeAll'; +export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach'; +export declare type TestContext = Record; +export declare type Exception = any; +export declare type FormattedError = string; +export declare type Hook = { + asyncError: Error; + fn: HookFn; + type: HookType; + parent: DescribeBlock; + timeout: number | undefined | null; +}; +export interface EventHandler { + (event: AsyncEvent, state: State): void | Promise; + (event: SyncEvent, state: State): void; +} +export declare type Event = SyncEvent | AsyncEvent; +export declare type SyncEvent = { + asyncError: Error; + mode: BlockMode; + name: 'start_describe_definition'; + blockName: BlockName; +} | { + mode: BlockMode; + name: 'finish_describe_definition'; + blockName: BlockName; +} | { + asyncError: Error; + name: 'add_hook'; + hookType: HookType; + fn: HookFn; + timeout: number | undefined; +} | { + asyncError: Error; + name: 'add_test'; + testName: TestName; + fn?: TestFn; + mode?: TestMode; + timeout: number | undefined; +} | { + name: 'error'; + error: Exception; +}; +export declare type AsyncEvent = { + name: 'setup'; + testNamePattern?: string; + parentProcess: Process; +} | { + name: 'include_test_location_in_result'; +} | { + name: 'hook_start'; + hook: Hook; +} | { + name: 'hook_success'; + describeBlock?: DescribeBlock; + test?: TestEntry; + hook: Hook; +} | { + name: 'hook_failure'; + error: string | Exception; + describeBlock?: DescribeBlock; + test?: TestEntry; + hook: Hook; +} | { + name: 'test_fn_start'; + test: TestEntry; +} | { + name: 'test_fn_success'; + test: TestEntry; +} | { + name: 'test_fn_failure'; + error: Exception; + test: TestEntry; +} | { + name: 'test_retry'; + test: TestEntry; +} | { + name: 'test_start'; + test: TestEntry; +} | { + name: 'test_skip'; + test: TestEntry; +} | { + name: 'test_todo'; + test: TestEntry; +} | { + name: 'test_done'; + test: TestEntry; +} | { + name: 'run_describe_start'; + describeBlock: DescribeBlock; +} | { + name: 'run_describe_finish'; + describeBlock: DescribeBlock; +} | { + name: 'run_start'; +} | { + name: 'run_finish'; +} | { + name: 'teardown'; +}; +export declare type TestStatus = 'skip' | 'done' | 'todo'; +export declare type TestResult = { + duration?: number | null; + errors: Array; + invocations: number; + status: TestStatus; + location?: { + column: number; + line: number; + } | null; + testPath: Array; +}; +export declare type RunResult = { + unhandledErrors: Array; + testResults: TestResults; +}; +export declare type TestResults = Array; +export declare type GlobalErrorHandlers = { + uncaughtException: Array<(exception: Exception) => void>; + unhandledRejection: Array<(exception: Exception, promise: Promise) => void>; +}; +export declare type State = { + currentDescribeBlock: DescribeBlock; + currentlyRunningTest?: TestEntry | null; + expand?: boolean; + hasFocusedTests: boolean; + originalGlobalErrorHandlers?: GlobalErrorHandlers; + parentProcess: Process | null; + rootDescribeBlock: DescribeBlock; + testNamePattern?: RegExp | null; + testTimeout: number; + unhandledErrors: Array; + includeTestLocationInResult: boolean; +}; +export declare type DescribeBlock = { + children: Array; + hooks: Array; + mode: BlockMode; + name: BlockName; + parent?: DescribeBlock; + tests: Array; +}; +export declare type TestError = Exception | Array<[Exception | undefined, Exception]>; +export declare type TestEntry = { + asyncError: Exception; + errors: TestError; + fn?: TestFn; + invocations: number; + mode: TestMode; + name: TestName; + parent: DescribeBlock; + startedAt?: number | null; + duration?: number | null; + status?: TestStatus | null; + timeout?: number; +}; +export {}; +//# sourceMappingURL=Circus.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Circus.d.ts.map b/packages/common/node_modules/@jest/types/build/Circus.d.ts.map new file mode 100644 index 0000000000..0eb1343015 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Circus.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Circus.d.ts","sourceRoot":"","sources":["../src/Circus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AAExC,aAAK,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAE9B,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACrC,oBAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,oBAAY,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACxD,oBAAY,QAAQ,GAAG,SAAS,CAAC;AACjC,oBAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACtC,oBAAY,cAAc,GAAG,UAAU,GAAG,WAAW,CAAC;AACtD,oBAAY,QAAQ,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AACnE,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC9C,oBAAY,SAAS,GAAG,GAAG,CAAC;AAC5B,oBAAY,cAAc,GAAG,MAAM,CAAC;AACpC,oBAAY,IAAI,GAAG;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACxC;AAED,oBAAY,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAE3C,oBAAY,SAAS,GACjB;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,2BAA2B,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IAGE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEN,oBAAY,UAAU,GAClB;IAEE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB,GACD;IACE,IAAI,EAAE,iCAAiC,CAAC;CACzC,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAGE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAKE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IAGE,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEN,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAClD,oBAAY,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AAE5C,oBAAY,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;IACzD,kBAAkB,EAAE,KAAK,CACvB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CACtD,CAAC;CACH,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,oBAAoB,EAAE,aAAa,CAAC;IACpC,oBAAoB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IAIzB,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;IAClD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,aAAa,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,2BAA2B,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9E,oBAAY,SAAS,GAAG;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Circus.js b/packages/common/node_modules/@jest/types/build/Circus.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Circus.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/Config.d.ts b/packages/common/node_modules/@jest/types/build/Config.d.ts new file mode 100644 index 0000000000..80622a12df --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Config.d.ts @@ -0,0 +1,420 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import type { Arguments } from 'yargs'; +import type { ReportOptions } from 'istanbul-reports'; +import chalk = require('chalk'); +declare type CoverageProvider = 'babel' | 'v8'; +export declare type Path = string; +export declare type Glob = string; +export declare type HasteConfig = { + computeSha1?: boolean; + defaultPlatform?: string | null; + hasteImplModulePath?: string; + platforms?: Array; + providesModuleNodeModules: Array; + throwOnModuleCollision?: boolean; +}; +export declare type ReporterConfig = [string, Record]; +export declare type TransformerConfig = [string, Record]; +export interface ConfigGlobals { + [K: string]: unknown; +} +export declare type DefaultOptions = { + automock: boolean; + bail: number; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + changedFilesWithAncestor: boolean; + clearMocks: boolean; + collectCoverage: boolean; + coveragePathIgnorePatterns: Array; + coverageReporters: Array; + coverageProvider: CoverageProvider; + errorOnDeprecated: boolean; + expand: boolean; + forceCoverageMatch: Array; + globals: ConfigGlobals; + haste: HasteConfig; + maxConcurrency: number; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleNameMapper: Record>; + modulePathIgnorePatterns: Array; + noStackTrace: boolean; + notify: boolean; + notifyMode: NotifyMode; + prettierPath: string; + resetMocks: boolean; + resetModules: boolean; + restoreMocks: boolean; + roots: Array; + runTestsByPath: boolean; + runner: 'jest-runner'; + setupFiles: Array; + setupFilesAfterEnv: Array; + skipFilter: boolean; + snapshotSerializers: Array; + testEnvironment: string; + testEnvironmentOptions: Record; + testFailureExitCode: string | number; + testLocationInResults: boolean; + testMatch: Array; + testPathIgnorePatterns: Array; + testRegex: Array; + testRunner: string; + testSequencer: string; + testURL: string; + timers: 'real' | 'fake'; + transformIgnorePatterns: Array; + useStderr: boolean; + watch: boolean; + watchPathIgnorePatterns: Array; + watchman: boolean; +}; +export declare type DisplayName = string | { + name: string; + color: typeof chalk.Color; +}; +export declare type InitialOptionsWithRootDir = InitialOptions & Required>; +export declare type InitialOptions = Partial<{ + automock: boolean; + bail: boolean | number; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + clearMocks: boolean; + changedFilesWithAncestor: boolean; + changedSince: string; + collectCoverage: boolean; + collectCoverageFrom: Array; + collectCoverageOnlyFrom: { + [key: string]: boolean; + }; + coverageDirectory: string; + coveragePathIgnorePatterns: Array; + coverageProvider: CoverageProvider; + coverageReporters: Array; + coverageThreshold: { + global: { + [key: string]: number; + }; + }; + dependencyExtractor: string; + detectLeaks: boolean; + detectOpenHandles: boolean; + displayName: DisplayName; + expand: boolean; + extraGlobals: Array; + filter: Path; + findRelatedTests: boolean; + forceCoverageMatch: Array; + forceExit: boolean; + json: boolean; + globals: ConfigGlobals; + globalSetup: string | null | undefined; + globalTeardown: string | null | undefined; + haste: HasteConfig; + reporters: Array; + logHeapUsage: boolean; + lastCommit: boolean; + listTests: boolean; + mapCoverage: boolean; + maxConcurrency: number; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleLoader: Path; + moduleNameMapper: { + [key: string]: string | Array; + }; + modulePathIgnorePatterns: Array; + modulePaths: Array; + name: string; + noStackTrace: boolean; + notify: boolean; + notifyMode: string; + onlyChanged: boolean; + outputFile: Path; + passWithNoTests: boolean; + preprocessorIgnorePatterns: Array; + preset: string | null | undefined; + prettierPath: string | null | undefined; + projects: Array; + replname: string | null | undefined; + resetMocks: boolean; + resetModules: boolean; + resolver: Path | null | undefined; + restoreMocks: boolean; + rootDir: Path; + roots: Array; + runner: string; + runTestsByPath: boolean; + scriptPreprocessor: string; + setupFiles: Array; + setupTestFrameworkScriptFile: Path; + setupFilesAfterEnv: Array; + silent: boolean; + skipFilter: boolean; + skipNodeResolution: boolean; + snapshotResolver: Path; + snapshotSerializers: Array; + errorOnDeprecated: boolean; + testEnvironment: string; + testEnvironmentOptions: Record; + testFailureExitCode: string | number; + testLocationInResults: boolean; + testMatch: Array; + testNamePattern: string; + testPathDirs: Array; + testPathIgnorePatterns: Array; + testRegex: string | Array; + testResultsProcessor: string; + testRunner: string; + testSequencer: string; + testURL: string; + testTimeout: number; + timers: 'real' | 'fake'; + transform: { + [regex: string]: Path | TransformerConfig; + }; + transformIgnorePatterns: Array; + watchPathIgnorePatterns: Array; + unmockedModulePathPatterns: Array; + updateSnapshot: boolean; + useStderr: boolean; + verbose?: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPlugins: Array]>; +}>; +export declare type SnapshotUpdateState = 'all' | 'new' | 'none'; +declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change'; +export declare type CoverageThresholdValue = { + branches?: number; + functions?: number; + lines?: number; + statements?: number; +}; +declare type CoverageThreshold = { + [path: string]: CoverageThresholdValue; + global: CoverageThresholdValue; +}; +export declare type GlobalConfig = { + bail: number; + changedSince?: string; + changedFilesWithAncestor: boolean; + collectCoverage: boolean; + collectCoverageFrom: Array; + collectCoverageOnlyFrom?: { + [key: string]: boolean; + }; + coverageDirectory: string; + coveragePathIgnorePatterns?: Array; + coverageProvider: CoverageProvider; + coverageReporters: Array; + coverageThreshold?: CoverageThreshold; + detectLeaks: boolean; + detectOpenHandles: boolean; + enabledTestsMap?: { + [key: string]: { + [key: string]: boolean; + }; + }; + expand: boolean; + filter?: Path; + findRelatedTests: boolean; + forceExit: boolean; + json: boolean; + globalSetup?: string; + globalTeardown?: string; + lastCommit: boolean; + logHeapUsage: boolean; + listTests: boolean; + maxConcurrency: number; + maxWorkers: number; + noStackTrace: boolean; + nonFlagArgs: Array; + noSCM?: boolean; + notify: boolean; + notifyMode: NotifyMode; + outputFile?: Path; + onlyChanged: boolean; + onlyFailures: boolean; + passWithNoTests: boolean; + projects: Array; + replname?: string; + reporters?: Array; + runTestsByPath: boolean; + rootDir: Path; + silent?: boolean; + skipFilter: boolean; + errorOnDeprecated: boolean; + testFailureExitCode: number; + testNamePattern?: string; + testPathPattern: string; + testResultsProcessor?: string; + testSequencer: string; + testTimeout?: number; + updateSnapshot: SnapshotUpdateState; + useStderr: boolean; + verbose?: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPlugins?: Array<{ + path: string; + config: Record; + }> | null; +}; +export declare type ProjectConfig = { + automock: boolean; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + clearMocks: boolean; + coveragePathIgnorePatterns: Array; + cwd: Path; + dependencyExtractor?: string; + detectLeaks: boolean; + detectOpenHandles: boolean; + displayName?: DisplayName; + errorOnDeprecated: boolean; + extraGlobals: Array; + filter?: Path; + forceCoverageMatch: Array; + globalSetup?: string; + globalTeardown?: string; + globals: ConfigGlobals; + haste: HasteConfig; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleLoader?: Path; + moduleNameMapper: Array<[string, string]>; + modulePathIgnorePatterns: Array; + modulePaths?: Array; + name: string; + prettierPath: string; + resetMocks: boolean; + resetModules: boolean; + resolver?: Path; + restoreMocks: boolean; + rootDir: Path; + roots: Array; + runner: string; + setupFiles: Array; + setupFilesAfterEnv: Array; + skipFilter: boolean; + skipNodeResolution?: boolean; + snapshotResolver?: Path; + snapshotSerializers: Array; + testEnvironment: string; + testEnvironmentOptions: Record; + testMatch: Array; + testLocationInResults: boolean; + testPathIgnorePatterns: Array; + testRegex: Array; + testRunner: string; + testURL: string; + timers: 'real' | 'fake'; + transform: Array<[string, Path, Record]>; + transformIgnorePatterns: Array; + watchPathIgnorePatterns: Array; + unmockedModulePathPatterns?: Array; +}; +export declare type Argv = Arguments; + color: boolean; + colors: boolean; + config: string; + coverage: boolean; + coverageDirectory: string; + coveragePathIgnorePatterns: Array; + coverageReporters: Array; + coverageThreshold: string; + debug: boolean; + env: string; + expand: boolean; + findRelatedTests: boolean; + forceExit: boolean; + globals: string; + globalSetup: string | null | undefined; + globalTeardown: string | null | undefined; + haste: string; + init: boolean; + json: boolean; + lastCommit: boolean; + logHeapUsage: boolean; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleNameMapper: string; + modulePathIgnorePatterns: Array; + modulePaths: Array; + noStackTrace: boolean; + notify: boolean; + notifyMode: string; + onlyChanged: boolean; + outputFile: string; + preset: string | null | undefined; + projects: Array; + prettierPath: string | null | undefined; + resetMocks: boolean; + resetModules: boolean; + resolver: string | null | undefined; + restoreMocks: boolean; + rootDir: string; + roots: Array; + runInBand: boolean; + setupFiles: Array; + setupFilesAfterEnv: Array; + showConfig: boolean; + silent: boolean; + snapshotSerializers: Array; + testEnvironment: string; + testFailureExitCode: string | null | undefined; + testMatch: Array; + testNamePattern: string; + testPathIgnorePatterns: Array; + testPathPattern: Array; + testRegex: string | Array; + testResultsProcessor: string; + testRunner: string; + testSequencer: string; + testURL: string; + testTimeout: number | null | undefined; + timers: string; + transform: string; + transformIgnorePatterns: Array; + unmockedModulePathPatterns: Array | null | undefined; + updateSnapshot: boolean; + useStderr: boolean; + verbose: boolean; + version: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPathIgnorePatterns: Array; +}>>; +export {}; +//# sourceMappingURL=Config.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Config.d.ts.map b/packages/common/node_modules/@jest/types/build/Config.d.ts.map new file mode 100644 index 0000000000..34ffc694f5 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,GAAG,QAAQ,OAAO,CAAC,CAAC;AAEhC,aAAK,gBAAgB,GAAG,OAAO,GAAG,IAAI,CAAC;AAEvC,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,oBAAY,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/D,oBAAY,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACjD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzD,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,WAAW,GACnB,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC;CAC3B,CAAC;AAEN,oBAAY,yBAAyB,GAAG,cAAc,GACpD,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;AAE5C,oBAAY,cAAc,GAAG,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,uBAAuB,EAAE;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EAAE;QACjB,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;IACF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,IAAI,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,IAAI,CAAC;IACnB,gBAAgB,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;KACvC,CAAC;IACF,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,0BAA0B,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,4BAA4B,EAAE,IAAI,CAAC;IACnC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,IAAI,CAAC;IACvB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE;QACT,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAC;KAC3C,CAAC;IACF,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH,oBAAY,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,aAAK,UAAU,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,CAAC;AAErB,oBAAY,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACvC,MAAM,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,uBAAuB,CAAC,EAAE;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,KAAK,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC3C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,mBAAmB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC,GAAG,IAAI,CAAC;CACX,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,GAAG,EAAE,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,gBAAgB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1D,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,oBAAY,IAAI,GAAG,SAAS,CAC1B,OAAO,CAAC;IACN,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC,CACH,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Config.js b/packages/common/node_modules/@jest/types/build/Config.js new file mode 100644 index 0000000000..c6c5311339 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Config.js @@ -0,0 +1,15 @@ +'use strict'; + +function _chalk() { + const data = _interopRequireDefault(require('chalk')); + + _chalk = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} diff --git a/packages/common/node_modules/@jest/types/build/Global.d.ts b/packages/common/node_modules/@jest/types/build/Global.d.ts new file mode 100644 index 0000000000..8a0c2c5f43 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Global.d.ts @@ -0,0 +1,77 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import type { CoverageMapData } from 'istanbul-lib-coverage'; +export declare type DoneFn = (reason?: string | Error) => void; +export declare type TestName = string; +export declare type TestFn = (done?: DoneFn) => Promise | void | undefined; +export declare type BlockFn = () => void; +export declare type BlockName = string; +export declare type Col = unknown; +export declare type Row = Array; +export declare type Table = Array; +export declare type ArrayTable = Table | Row; +export declare type TemplateTable = TemplateStringsArray; +export declare type TemplateData = Array; +export declare type EachTable = ArrayTable | TemplateTable; +export declare type EachTestFn = (...args: Array) => Promise | void | undefined; +declare type Jasmine = { + _DEFAULT_TIMEOUT_INTERVAL?: number; + addMatchers: Function; +}; +declare type Each = (table: EachTable, ...taggedTemplateData: Array) => (title: string, test: EachTestFn, timeout?: number) => void; +export interface ItBase { + (testName: TestName, fn: TestFn, timeout?: number): void; + each: Each; +} +export interface It extends ItBase { + only: ItBase; + skip: ItBase; + todo: (testName: TestName, ...rest: Array) => void; +} +export interface ItConcurrentBase { + (testName: string, testFn: () => Promise, timeout?: number): void; +} +export interface ItConcurrentExtended extends ItConcurrentBase { + only: ItConcurrentBase; + skip: ItConcurrentBase; +} +export interface ItConcurrent extends It { + concurrent: ItConcurrentExtended; +} +export interface DescribeBase { + (blockName: BlockName, blockFn: BlockFn): void; + each: Each; +} +export interface Describe extends DescribeBase { + only: DescribeBase; + skip: DescribeBase; +} +export interface GlobalAdditions { + it: ItConcurrent; + test: ItConcurrent; + fit: ItBase & { + concurrent?: ItConcurrentBase; + }; + xit: ItBase; + xtest: ItBase; + describe: Describe; + xdescribe: DescribeBase; + fdescribe: DescribeBase; + __coverage__: CoverageMapData; + jasmine: Jasmine; + fail: () => void; + pending: () => void; + spyOn: () => void; + spyOnProperty: () => void; +} +declare type NodeGlobalWithoutAdditions = Omit; +export interface Global extends GlobalAdditions, NodeGlobalWithoutAdditions { + [extras: string]: any; +} +export {}; +//# sourceMappingURL=Global.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Global.d.ts.map b/packages/common/node_modules/@jest/types/build/Global.d.ts.map new file mode 100644 index 0000000000..beaa563f4f --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAE3D,oBAAY,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;AACvD,oBAAY,QAAQ,GAAG,MAAM,CAAC;AAC9B,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,IAAI,CAAC;AACjC,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B,oBAAY,GAAG,GAAG,OAAO,CAAC;AAC1B,oBAAY,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7B,oBAAY,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,oBAAY,UAAU,GAAG,KAAK,GAAG,GAAG,CAAC;AACrC,oBAAY,aAAa,GAAG,oBAAoB,CAAC;AACjD,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,oBAAY,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AACnD,oBAAY,UAAU,GAAG,CACvB,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAGrC,aAAK,OAAO,GAAG;IAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAC,CAAC;AAE3E,aAAK,IAAI,GAAG,CACV,KAAK,EAAE,SAAS,EAChB,GAAG,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,KAClC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,MAAM;IACrB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,EAAG,SAAQ,MAAM;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,EAAE;IACtC,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAGD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAC,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAGD,aAAK,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,eAAe,CAAC,CAAC;AAE7E,MAAM,WAAW,MAAO,SAAQ,eAAe,EAAE,0BAA0B;IACzE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;CACvB"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Global.js b/packages/common/node_modules/@jest/types/build/Global.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Global.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/TestResult.d.ts b/packages/common/node_modules/@jest/types/build/TestResult.d.ts new file mode 100644 index 0000000000..7b38ce6540 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/TestResult.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export declare type Milliseconds = number; +declare type Status = 'passed' | 'failed' | 'skipped' | 'pending' | 'todo' | 'disabled'; +declare type Callsite = { + column: number; + line: number; +}; +export declare type AssertionResult = { + ancestorTitles: Array; + duration?: Milliseconds | null; + failureMessages: Array; + fullName: string; + invocations?: number; + location?: Callsite | null; + numPassingAsserts: number; + status: Status; + title: string; +}; +export declare type SerializableError = { + code?: unknown; + message: string; + stack: string | null | undefined; + type?: string; +}; +export {}; +//# sourceMappingURL=TestResult.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/TestResult.d.ts.map b/packages/common/node_modules/@jest/types/build/TestResult.d.ts.map new file mode 100644 index 0000000000..cee3e1cd02 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/TestResult.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TestResult.d.ts","sourceRoot":"","sources":["../src/TestResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY,GAAG,MAAM,CAAC;AAElC,aAAK,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhF,aAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,oBAAY,eAAe,GAAG;IAC5B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/TestResult.js b/packages/common/node_modules/@jest/types/build/TestResult.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/TestResult.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/Transform.d.ts b/packages/common/node_modules/@jest/types/build/Transform.d.ts new file mode 100644 index 0000000000..176606c65f --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Transform.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export declare type TransformResult = { + code: string; + originalCode: string; + mapCoverage: boolean; + sourceMapPath: string | null; +}; +//# sourceMappingURL=Transform.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Transform.d.ts.map b/packages/common/node_modules/@jest/types/build/Transform.d.ts.map new file mode 100644 index 0000000000..ffa748a132 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Transform.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../src/Transform.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Transform.js b/packages/common/node_modules/@jest/types/build/Transform.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/Transform.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/index.d.ts b/packages/common/node_modules/@jest/types/build/index.d.ts new file mode 100644 index 0000000000..79f8ca3776 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/index.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type * as Circus from './Circus'; +import type * as Config from './Config'; +import type * as Global from './Global'; +import type * as TestResult from './TestResult'; +import type * as TransformTypes from './Transform'; +export type { Circus, Config, Global, TestResult, TransformTypes }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/index.d.ts.map b/packages/common/node_modules/@jest/types/build/index.d.ts.map new file mode 100644 index 0000000000..bdb5033e7a --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,KAAK,UAAU,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,KAAK,cAAc,MAAM,aAAa,CAAC;AAEnD,YAAY,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAC,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/index.js b/packages/common/node_modules/@jest/types/build/index.js new file mode 100644 index 0000000000..ad9a93a7c1 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/index.js @@ -0,0 +1 @@ +'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/Circus.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/Circus.d.ts new file mode 100644 index 0000000000..18c3fb293b --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/Circus.d.ts @@ -0,0 +1,178 @@ +/// +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import * as Global from './Global'; +declare type Process = NodeJS.Process; +export declare type DoneFn = Global.DoneFn; +export declare type BlockFn = Global.BlockFn; +export declare type BlockName = Global.BlockName; +export declare type BlockMode = void | 'skip' | 'only' | 'todo'; +export declare type TestMode = BlockMode; +export declare type TestName = Global.TestName; +export declare type TestFn = Global.TestFn; +export declare type HookFn = (done?: DoneFn) => Promise | null | undefined; +export declare type AsyncFn = TestFn | HookFn; +export declare type SharedHookType = 'afterAll' | 'beforeAll'; +export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach'; +export declare type TestContext = Record; +export declare type Exception = any; +export declare type FormattedError = string; +export declare type Hook = { + asyncError: Error; + fn: HookFn; + type: HookType; + parent: DescribeBlock; + timeout: number | undefined | null; +}; +export interface EventHandler { + (event: AsyncEvent, state: State): void | Promise; + (event: SyncEvent, state: State): void; +} +export declare type Event = SyncEvent | AsyncEvent; +export declare type SyncEvent = { + asyncError: Error; + mode: BlockMode; + name: 'start_describe_definition'; + blockName: BlockName; +} | { + mode: BlockMode; + name: 'finish_describe_definition'; + blockName: BlockName; +} | { + asyncError: Error; + name: 'add_hook'; + hookType: HookType; + fn: HookFn; + timeout: number | undefined; +} | { + asyncError: Error; + name: 'add_test'; + testName: TestName; + fn?: TestFn; + mode?: TestMode; + timeout: number | undefined; +} | { + name: 'error'; + error: Exception; +}; +export declare type AsyncEvent = { + name: 'setup'; + testNamePattern?: string; + parentProcess: Process; +} | { + name: 'include_test_location_in_result'; +} | { + name: 'hook_start'; + hook: Hook; +} | { + name: 'hook_success'; + describeBlock?: DescribeBlock; + test?: TestEntry; + hook: Hook; +} | { + name: 'hook_failure'; + error: string | Exception; + describeBlock?: DescribeBlock; + test?: TestEntry; + hook: Hook; +} | { + name: 'test_fn_start'; + test: TestEntry; +} | { + name: 'test_fn_success'; + test: TestEntry; +} | { + name: 'test_fn_failure'; + error: Exception; + test: TestEntry; +} | { + name: 'test_retry'; + test: TestEntry; +} | { + name: 'test_start'; + test: TestEntry; +} | { + name: 'test_skip'; + test: TestEntry; +} | { + name: 'test_todo'; + test: TestEntry; +} | { + name: 'test_done'; + test: TestEntry; +} | { + name: 'run_describe_start'; + describeBlock: DescribeBlock; +} | { + name: 'run_describe_finish'; + describeBlock: DescribeBlock; +} | { + name: 'run_start'; +} | { + name: 'run_finish'; +} | { + name: 'teardown'; +}; +export declare type TestStatus = 'skip' | 'done' | 'todo'; +export declare type TestResult = { + duration?: number | null; + errors: Array; + invocations: number; + status: TestStatus; + location?: { + column: number; + line: number; + } | null; + testPath: Array; +}; +export declare type RunResult = { + unhandledErrors: Array; + testResults: TestResults; +}; +export declare type TestResults = Array; +export declare type GlobalErrorHandlers = { + uncaughtException: Array<(exception: Exception) => void>; + unhandledRejection: Array<(exception: Exception, promise: Promise) => void>; +}; +export declare type State = { + currentDescribeBlock: DescribeBlock; + currentlyRunningTest?: TestEntry | null; + expand?: boolean; + hasFocusedTests: boolean; + originalGlobalErrorHandlers?: GlobalErrorHandlers; + parentProcess: Process | null; + rootDescribeBlock: DescribeBlock; + testNamePattern?: RegExp | null; + testTimeout: number; + unhandledErrors: Array; + includeTestLocationInResult: boolean; +}; +export declare type DescribeBlock = { + children: Array; + hooks: Array; + mode: BlockMode; + name: BlockName; + parent?: DescribeBlock; + tests: Array; +}; +export declare type TestError = Exception | Array<[Exception | undefined, Exception]>; +export declare type TestEntry = { + asyncError: Exception; + errors: TestError; + fn?: TestFn; + invocations: number; + mode: TestMode; + name: TestName; + parent: DescribeBlock; + startedAt?: number | null; + duration?: number | null; + status?: TestStatus | null; + timeout?: number; +}; +export {}; +//# sourceMappingURL=Circus.d.ts.map diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/Config.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/Config.d.ts new file mode 100644 index 0000000000..f75f825d9a --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/Config.d.ts @@ -0,0 +1,421 @@ +/// +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { Arguments } from 'yargs'; +import { ReportOptions } from 'istanbul-reports'; +import chalk = require('chalk'); +declare type CoverageProvider = 'babel' | 'v8'; +export declare type Path = string; +export declare type Glob = string; +export declare type HasteConfig = { + computeSha1?: boolean; + defaultPlatform?: string | null; + hasteImplModulePath?: string; + platforms?: Array; + providesModuleNodeModules: Array; + throwOnModuleCollision?: boolean; +}; +export declare type ReporterConfig = [string, Record]; +export declare type TransformerConfig = [string, Record]; +export interface ConfigGlobals { + [K: string]: unknown; +} +export declare type DefaultOptions = { + automock: boolean; + bail: number; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + changedFilesWithAncestor: boolean; + clearMocks: boolean; + collectCoverage: boolean; + coveragePathIgnorePatterns: Array; + coverageReporters: Array; + coverageProvider: CoverageProvider; + errorOnDeprecated: boolean; + expand: boolean; + forceCoverageMatch: Array; + globals: ConfigGlobals; + haste: HasteConfig; + maxConcurrency: number; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleNameMapper: Record>; + modulePathIgnorePatterns: Array; + noStackTrace: boolean; + notify: boolean; + notifyMode: NotifyMode; + prettierPath: string; + resetMocks: boolean; + resetModules: boolean; + restoreMocks: boolean; + roots: Array; + runTestsByPath: boolean; + runner: 'jest-runner'; + setupFiles: Array; + setupFilesAfterEnv: Array; + skipFilter: boolean; + snapshotSerializers: Array; + testEnvironment: string; + testEnvironmentOptions: Record; + testFailureExitCode: string | number; + testLocationInResults: boolean; + testMatch: Array; + testPathIgnorePatterns: Array; + testRegex: Array; + testRunner: string; + testSequencer: string; + testURL: string; + timers: 'real' | 'fake'; + transformIgnorePatterns: Array; + useStderr: boolean; + watch: boolean; + watchPathIgnorePatterns: Array; + watchman: boolean; +}; +export declare type DisplayName = string | { + name: string; + color: typeof chalk.Color; +}; +export declare type InitialOptionsWithRootDir = InitialOptions & Required>; +export declare type InitialOptions = Partial<{ + automock: boolean; + bail: boolean | number; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + clearMocks: boolean; + changedFilesWithAncestor: boolean; + changedSince: string; + collectCoverage: boolean; + collectCoverageFrom: Array; + collectCoverageOnlyFrom: { + [key: string]: boolean; + }; + coverageDirectory: string; + coveragePathIgnorePatterns: Array; + coverageProvider: CoverageProvider; + coverageReporters: Array; + coverageThreshold: { + global: { + [key: string]: number; + }; + }; + dependencyExtractor: string; + detectLeaks: boolean; + detectOpenHandles: boolean; + displayName: DisplayName; + expand: boolean; + extraGlobals: Array; + filter: Path; + findRelatedTests: boolean; + forceCoverageMatch: Array; + forceExit: boolean; + json: boolean; + globals: ConfigGlobals; + globalSetup: string | null | undefined; + globalTeardown: string | null | undefined; + haste: HasteConfig; + reporters: Array; + logHeapUsage: boolean; + lastCommit: boolean; + listTests: boolean; + mapCoverage: boolean; + maxConcurrency: number; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleLoader: Path; + moduleNameMapper: { + [key: string]: string | Array; + }; + modulePathIgnorePatterns: Array; + modulePaths: Array; + name: string; + noStackTrace: boolean; + notify: boolean; + notifyMode: string; + onlyChanged: boolean; + outputFile: Path; + passWithNoTests: boolean; + preprocessorIgnorePatterns: Array; + preset: string | null | undefined; + prettierPath: string | null | undefined; + projects: Array; + replname: string | null | undefined; + resetMocks: boolean; + resetModules: boolean; + resolver: Path | null | undefined; + restoreMocks: boolean; + rootDir: Path; + roots: Array; + runner: string; + runTestsByPath: boolean; + scriptPreprocessor: string; + setupFiles: Array; + setupTestFrameworkScriptFile: Path; + setupFilesAfterEnv: Array; + silent: boolean; + skipFilter: boolean; + skipNodeResolution: boolean; + snapshotResolver: Path; + snapshotSerializers: Array; + errorOnDeprecated: boolean; + testEnvironment: string; + testEnvironmentOptions: Record; + testFailureExitCode: string | number; + testLocationInResults: boolean; + testMatch: Array; + testNamePattern: string; + testPathDirs: Array; + testPathIgnorePatterns: Array; + testRegex: string | Array; + testResultsProcessor: string; + testRunner: string; + testSequencer: string; + testURL: string; + testTimeout: number; + timers: 'real' | 'fake'; + transform: { + [regex: string]: Path | TransformerConfig; + }; + transformIgnorePatterns: Array; + watchPathIgnorePatterns: Array; + unmockedModulePathPatterns: Array; + updateSnapshot: boolean; + useStderr: boolean; + verbose?: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPlugins: Array]>; +}>; +export declare type SnapshotUpdateState = 'all' | 'new' | 'none'; +declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change'; +export declare type CoverageThresholdValue = { + branches?: number; + functions?: number; + lines?: number; + statements?: number; +}; +declare type CoverageThreshold = { + [path: string]: CoverageThresholdValue; + global: CoverageThresholdValue; +}; +export declare type GlobalConfig = { + bail: number; + changedSince?: string; + changedFilesWithAncestor: boolean; + collectCoverage: boolean; + collectCoverageFrom: Array; + collectCoverageOnlyFrom?: { + [key: string]: boolean; + }; + coverageDirectory: string; + coveragePathIgnorePatterns?: Array; + coverageProvider: CoverageProvider; + coverageReporters: Array; + coverageThreshold?: CoverageThreshold; + detectLeaks: boolean; + detectOpenHandles: boolean; + enabledTestsMap?: { + [key: string]: { + [key: string]: boolean; + }; + }; + expand: boolean; + filter?: Path; + findRelatedTests: boolean; + forceExit: boolean; + json: boolean; + globalSetup?: string; + globalTeardown?: string; + lastCommit: boolean; + logHeapUsage: boolean; + listTests: boolean; + maxConcurrency: number; + maxWorkers: number; + noStackTrace: boolean; + nonFlagArgs: Array; + noSCM?: boolean; + notify: boolean; + notifyMode: NotifyMode; + outputFile?: Path; + onlyChanged: boolean; + onlyFailures: boolean; + passWithNoTests: boolean; + projects: Array; + replname?: string; + reporters?: Array; + runTestsByPath: boolean; + rootDir: Path; + silent?: boolean; + skipFilter: boolean; + errorOnDeprecated: boolean; + testFailureExitCode: number; + testNamePattern?: string; + testPathPattern: string; + testResultsProcessor?: string; + testSequencer: string; + testTimeout?: number; + updateSnapshot: SnapshotUpdateState; + useStderr: boolean; + verbose?: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPlugins?: Array<{ + path: string; + config: Record; + }> | null; +}; +export declare type ProjectConfig = { + automock: boolean; + browser: boolean; + cache: boolean; + cacheDirectory: Path; + clearMocks: boolean; + coveragePathIgnorePatterns: Array; + cwd: Path; + dependencyExtractor?: string; + detectLeaks: boolean; + detectOpenHandles: boolean; + displayName?: DisplayName; + errorOnDeprecated: boolean; + extraGlobals: Array; + filter?: Path; + forceCoverageMatch: Array; + globalSetup?: string; + globalTeardown?: string; + globals: ConfigGlobals; + haste: HasteConfig; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleLoader?: Path; + moduleNameMapper: Array<[string, string]>; + modulePathIgnorePatterns: Array; + modulePaths?: Array; + name: string; + prettierPath: string; + resetMocks: boolean; + resetModules: boolean; + resolver?: Path; + restoreMocks: boolean; + rootDir: Path; + roots: Array; + runner: string; + setupFiles: Array; + setupFilesAfterEnv: Array; + skipFilter: boolean; + skipNodeResolution?: boolean; + snapshotResolver?: Path; + snapshotSerializers: Array; + testEnvironment: string; + testEnvironmentOptions: Record; + testMatch: Array; + testLocationInResults: boolean; + testPathIgnorePatterns: Array; + testRegex: Array; + testRunner: string; + testURL: string; + timers: 'real' | 'fake'; + transform: Array<[string, Path, Record]>; + transformIgnorePatterns: Array; + watchPathIgnorePatterns: Array; + unmockedModulePathPatterns?: Array; +}; +export declare type Argv = Arguments; + color: boolean; + colors: boolean; + config: string; + coverage: boolean; + coverageDirectory: string; + coveragePathIgnorePatterns: Array; + coverageReporters: Array; + coverageThreshold: string; + debug: boolean; + env: string; + expand: boolean; + findRelatedTests: boolean; + forceExit: boolean; + globals: string; + globalSetup: string | null | undefined; + globalTeardown: string | null | undefined; + haste: string; + init: boolean; + json: boolean; + lastCommit: boolean; + logHeapUsage: boolean; + maxWorkers: number | string; + moduleDirectories: Array; + moduleFileExtensions: Array; + moduleNameMapper: string; + modulePathIgnorePatterns: Array; + modulePaths: Array; + noStackTrace: boolean; + notify: boolean; + notifyMode: string; + onlyChanged: boolean; + outputFile: string; + preset: string | null | undefined; + projects: Array; + prettierPath: string | null | undefined; + resetMocks: boolean; + resetModules: boolean; + resolver: string | null | undefined; + restoreMocks: boolean; + rootDir: string; + roots: Array; + runInBand: boolean; + setupFiles: Array; + setupFilesAfterEnv: Array; + showConfig: boolean; + silent: boolean; + snapshotSerializers: Array; + testEnvironment: string; + testFailureExitCode: string | null | undefined; + testMatch: Array; + testNamePattern: string; + testPathIgnorePatterns: Array; + testPathPattern: Array; + testRegex: string | Array; + testResultsProcessor: string; + testRunner: string; + testSequencer: string; + testURL: string; + testTimeout: number | null | undefined; + timers: string; + transform: string; + transformIgnorePatterns: Array; + unmockedModulePathPatterns: Array | null | undefined; + updateSnapshot: boolean; + useStderr: boolean; + verbose: boolean; + version: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPathIgnorePatterns: Array; +}>>; +export {}; +//# sourceMappingURL=Config.d.ts.map diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/Global.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/Global.d.ts new file mode 100644 index 0000000000..00f9dd162b --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/Global.d.ts @@ -0,0 +1,78 @@ +/// +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// +import { CoverageMapData } from 'istanbul-lib-coverage'; +export declare type DoneFn = (reason?: string | Error) => void; +export declare type TestName = string; +export declare type TestFn = (done?: DoneFn) => Promise | void | undefined; +export declare type BlockFn = () => void; +export declare type BlockName = string; +export declare type Col = unknown; +export declare type Row = Array; +export declare type Table = Array; +export declare type ArrayTable = Table | Row; +export declare type TemplateTable = TemplateStringsArray; +export declare type TemplateData = Array; +export declare type EachTable = ArrayTable | TemplateTable; +export declare type EachTestFn = (...args: Array) => Promise | void | undefined; +declare type Jasmine = { + _DEFAULT_TIMEOUT_INTERVAL?: number; + addMatchers: Function; +}; +declare type Each = (table: EachTable, ...taggedTemplateData: Array) => (title: string, test: EachTestFn, timeout?: number) => void; +export interface ItBase { + (testName: TestName, fn: TestFn, timeout?: number): void; + each: Each; +} +export interface It extends ItBase { + only: ItBase; + skip: ItBase; + todo: (testName: TestName, ...rest: Array) => void; +} +export interface ItConcurrentBase { + (testName: string, testFn: () => Promise, timeout?: number): void; +} +export interface ItConcurrentExtended extends ItConcurrentBase { + only: ItConcurrentBase; + skip: ItConcurrentBase; +} +export interface ItConcurrent extends It { + concurrent: ItConcurrentExtended; +} +export interface DescribeBase { + (blockName: BlockName, blockFn: BlockFn): void; + each: Each; +} +export interface Describe extends DescribeBase { + only: DescribeBase; + skip: DescribeBase; +} +export interface GlobalAdditions { + it: ItConcurrent; + test: ItConcurrent; + fit: ItBase & { + concurrent?: ItConcurrentBase; + }; + xit: ItBase; + xtest: ItBase; + describe: Describe; + xdescribe: DescribeBase; + fdescribe: DescribeBase; + __coverage__: CoverageMapData; + jasmine: Jasmine; + fail: () => void; + pending: () => void; + spyOn: () => void; + spyOnProperty: () => void; +} +declare type NodeGlobalWithoutAdditions = Pick>; +export interface Global extends GlobalAdditions, NodeGlobalWithoutAdditions { + [extras: string]: any; +} +export {}; +//# sourceMappingURL=Global.d.ts.map diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/TestResult.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/TestResult.d.ts new file mode 100644 index 0000000000..2461c6336c --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/TestResult.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export declare type Milliseconds = number; +declare type Status = 'passed' | 'failed' | 'skipped' | 'pending' | 'todo' | 'disabled'; +declare type Callsite = { + column: number; + line: number; +}; +export declare type AssertionResult = { + ancestorTitles: Array; + duration?: Milliseconds | null; + failureMessages: Array; + fullName: string; + invocations?: number; + location?: Callsite | null; + numPassingAsserts: number; + status: Status; + title: string; +}; +export declare type SerializableError = { + code?: unknown; + message: string; + stack: string | null | undefined; + type?: string; +}; +export {}; +//# sourceMappingURL=TestResult.d.ts.map diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/Transform.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/Transform.d.ts new file mode 100644 index 0000000000..57f6a0cf18 --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/Transform.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export declare type TransformResult = { + code: string; + originalCode: string; + mapCoverage: boolean; + sourceMapPath: string | null; +}; +//# sourceMappingURL=Transform.d.ts.map diff --git a/packages/common/node_modules/@jest/types/build/ts3.4/index.d.ts b/packages/common/node_modules/@jest/types/build/ts3.4/index.d.ts new file mode 100644 index 0000000000..717fb1087f --- /dev/null +++ b/packages/common/node_modules/@jest/types/build/ts3.4/index.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import * as Circus from './Circus'; +import * as Config from './Config'; +import * as Global from './Global'; +import * as TestResult from './TestResult'; +import * as TransformTypes from './Transform'; +export { Circus, Config, Global, TestResult, TransformTypes }; +//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/@jest/types/package.json b/packages/common/node_modules/@jest/types/package.json new file mode 100644 index 0000000000..45e7eb63e9 --- /dev/null +++ b/packages/common/node_modules/@jest/types/package.json @@ -0,0 +1,35 @@ +{ + "name": "@jest/types", + "version": "25.3.0", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/jest-types" + }, + "engines": { + "node": ">= 8.3" + }, + "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", + "typesVersions": { + "<3.8": { + "build/*": [ + "build/ts3.4/*" + ] + } + }, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^15.0.0", + "chalk": "^3.0.0" + }, + "devDependencies": { + "@types/node": "*" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" +} diff --git a/packages/common/node_modules/@types/yargs/LICENSE b/packages/common/node_modules/@types/yargs/LICENSE new file mode 100644 index 0000000000..4b1ad51b2f --- /dev/null +++ b/packages/common/node_modules/@types/yargs/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/packages/common/node_modules/@types/yargs/README.md b/packages/common/node_modules/@types/yargs/README.md new file mode 100644 index 0000000000..7237a63abb --- /dev/null +++ b/packages/common/node_modules/@types/yargs/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/yargs` + +# Summary +This package contains type definitions for yargs (https://github.com/chevex/yargs). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs. + +### Additional Details + * Last updated: Tue, 25 Feb 2020 20:34:01 GMT + * Dependencies: [@types/yargs-parser](https://npmjs.com/package/@types/yargs-parser) + * Global values: none + +# Credits +These definitions were written by [Martin Poelstra](https://github.com/poelstra), [Mizunashi Mana](https://github.com/mizunashi-mana), [Jeffery Grajkowski](https://github.com/pushplay), [Jeff Kenney](https://github.com/jeffkenney), [Jimi (Dimitris) Charalampidis](https://github.com/JimiC), [Steffen Viken Valvåg](https://github.com/steffenvv), [Emily Marigold Klassen](https://github.com/forivall), [ExE Boss](https://github.com/ExE-Boss), and [Aankhen](https://github.com/Aankhen). diff --git a/packages/common/node_modules/@types/yargs/index.d.ts b/packages/common/node_modules/@types/yargs/index.d.ts new file mode 100644 index 0000000000..ac36c1be55 --- /dev/null +++ b/packages/common/node_modules/@types/yargs/index.d.ts @@ -0,0 +1,784 @@ +// Type definitions for yargs 15.0 +// Project: https://github.com/chevex/yargs, https://yargs.js.org +// Definitions by: Martin Poelstra +// Mizunashi Mana +// Jeffery Grajkowski +// Jeff Kenney +// Jimi (Dimitris) Charalampidis +// Steffen Viken Valvåg +// Emily Marigold Klassen +// ExE Boss +// Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.0 + +// The following TSLint rules have been disabled: +// unified-signatures: Because there is useful information in the argument names of the overloaded signatures + +// Convention: +// Use 'union types' when: +// - parameter types have similar signature type (i.e. 'string | ReadonlyArray') +// - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys']) +// An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters +// have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter +// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray`, +// thus it's preferred to use `command: string | ReadonlyArray` +// Use parameterless declaration instead of declaring all parameters optional, +// when all parameters are optional and more than one + +import { DetailedArguments, Configuration } from 'yargs-parser'; + +declare namespace yargs { + type BuilderCallback = ((args: Argv) => PromiseLike>) | ((args: Argv) => Argv) | ((args: Argv) => void); + + type ParserConfigurationOptions = Configuration & { + /** Sort commands alphabetically. Default is `false` */ + 'sort-commands': boolean; + }; + + /** + * The type parameter `T` is the expected shape of the parsed options. + * `Arguments` is those options plus `_` and `$0`, and an indexer falling + * back to `unknown` for unknown options. + * + * For the return type / `argv` property, we create a mapped type over + * `Arguments` to simplify the inferred type signature in client code. + */ + interface Argv { + (): { [key in keyof Arguments]: Arguments[key] }; + (args: ReadonlyArray, cwd?: string): Argv; + + /** + * Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa. + * + * Optionally `.alias()` can take an object that maps keys to aliases. + * Each key of this object should be the canonical version of the option, and each value should be a string or an array of strings. + */ + // Aliases for previously declared options can inherit the types of those options. + alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; + alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; + alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; + alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; + + /** + * Get the arguments as a plain old object. + * + * Arguments without a corresponding flag show up in the `argv._` array. + * + * The script name or node command is available at `argv.$0` similarly to how `$0` works in bash or perl. + * + * If `yargs` is executed in an environment that embeds node and there's no script name (e.g. Electron or nw.js), + * it will ignore the first parameter since it expects it to be the script name. In order to override + * this behavior, use `.parse(process.argv.slice(1))` instead of .argv and the first parameter won't be ignored. + */ + argv: { [key in keyof Arguments]: Arguments[key] }; + + /** + * Tell the parser to interpret `key` as an array. + * If `.array('foo')` is set, `--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`. + * Also, if you use the option multiple times all the values will be flattened in one array so `--foo foo --foo bar` will be parsed as `['foo', 'bar']` + * + * When the option is used with a positional, use `--` to tell `yargs` to stop adding values to the array. + */ + array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; + array(key: K | ReadonlyArray): Argv | undefined }>; + + /** + * Interpret `key` as a boolean. If a non-flag option follows `key` in `process.argv`, that string won't get set as the value of `key`. + * + * `key` will default to `false`, unless a `default(key, undefined)` is explicitly set. + * + * If `key` is an array, interpret all the elements as booleans. + */ + boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; + boolean(key: K | ReadonlyArray): Argv; + + /** + * Check that certain conditions are met in the provided arguments. + * @param func Called with two arguments, the parsed `argv` hash and an array of options and their aliases. + * If `func` throws or returns a non-truthy value, show the thrown error, usage information, and exit. + * @param global Indicates whether `check()` should be enabled both at the top-level and for each sub-command. + */ + check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; + + /** + * Limit valid values for key to a predefined set of choices, given as an array or as an individual value. + * If this method is called multiple times, all enumerated values will be merged together. + * Choices are generally strings or numbers, and value matching is case-sensitive. + * + * Optionally `.choices()` can take an object that maps multiple keys to their choices. + * + * Choices can also be specified as choices in the object given to `option()`. + */ + choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; + choices>(key: K, values: C): Argv; + choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; + + /** + * Provide a synchronous function to coerce or transform the value(s) given on the command line for `key`. + * + * The coercion function should accept one argument, representing the parsed value from the command line, and should return a new value or throw an error. + * The returned value will be used as the value for `key` (or one of its aliases) in `argv`. + * + * If the function throws, the error will be treated as a validation failure, delegating to either a custom `.fail()` handler or printing the error message in the console. + * + * Coercion will be applied to a value after all other modifications, such as `.normalize()`. + * + * Optionally `.coerce()` can take an object that maps several keys to their respective coercion function. + * + * You can also map the same function to several keys at one time. Just pass an array of keys as the first argument to `.coerce()`. + * + * If you are using dot-notion or arrays, .e.g., `user.email` and `user.password`, coercion will be applied to the final object that has been parsed + */ + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; + coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; + coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; + + /** + * Define the commands exposed by your application. + * @param command Should be a string representing the command or an array of strings representing the command and its aliases. + * @param description Use to provide a description for each command your application accepts (the values stored in `argv._`). + * Set `description` to false to create a hidden command. Hidden commands don't show up in the help output and aren't available for completion. + * @param [builder] Object to give hints about the options that your command accepts. + * Can also be a function. This function is executed with a yargs instance, and can be used to provide advanced command specific help. + * + * Note that when `void` is returned, the handler `argv` object type will not include command-specific arguments. + * @param [handler] Function, which will be executed with the parsed `argv` object. + */ + command(command: string | ReadonlyArray, description: string, builder?: BuilderCallback, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: BuilderCallback, handler?: (args: Arguments) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; + command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; + command(module: CommandModule): Argv; + + // Advanced API + /** Apply command modules from a directory relative to the module calling this method. */ + commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; + + /** + * Enable bash/zsh-completion shortcuts for commands and options. + * + * If invoked without parameters, `.completion()` will make completion the command to output the completion script. + * + * @param [cmd] When present in `argv._`, will result in the `.bashrc` or `.zshrc` completion script being outputted. + * To enable bash/zsh completions, concat the generated script to your `.bashrc` or `.bash_profile` (or `.zshrc` for zsh). + * @param [description] Provide a description in your usage instructions for the command that generates the completion scripts. + * @param [func] Rather than relying on yargs' default completion functionality, which shiver me timbers is pretty awesome, you can provide your own completion method. + */ + completion(): Argv; + completion(cmd: string, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, func?: SyncCompletionFunction): Argv; + completion(cmd: string, func?: PromiseCompletionFunction): Argv; + completion(cmd: string, description?: string | false, func?: AsyncCompletionFunction): Argv; + completion(cmd: string, description?: string | false, func?: SyncCompletionFunction): Argv; + completion(cmd: string, description?: string | false, func?: PromiseCompletionFunction): Argv; + + /** + * Tells the parser that if the option specified by `key` is passed in, it should be interpreted as a path to a JSON config file. + * The file is loaded and parsed, and its properties are set as arguments. + * Because the file is loaded using Node's require(), the filename MUST end in `.json` to be interpreted correctly. + * + * If invoked without parameters, `.config()` will make --config the option to pass the JSON config file. + * + * @param [description] Provided to customize the config (`key`) option in the usage string. + * @param [explicitConfigurationObject] An explicit configuration `object` + */ + config(): Argv; + config(key: string | ReadonlyArray, description?: string, parseFn?: (configPath: string) => object): Argv; + config(key: string | ReadonlyArray, parseFn: (configPath: string) => object): Argv; + config(explicitConfigurationObject: object): Argv; + + /** + * Given the key `x` is set, the key `y` must not be set. `y` can either be a single string or an array of argument names that `x` conflicts with. + * + * Optionally `.conflicts()` can accept an object specifying multiple conflicting keys. + */ + conflicts(key: string, value: string | ReadonlyArray): Argv; + conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; + + /** + * Interpret `key` as a boolean flag, but set its parsed value to the number of flag occurrences rather than `true` or `false`. Default value is thus `0`. + */ + count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; + count(key: K | ReadonlyArray): Argv; + + /** + * Set `argv[key]` to `value` if no option was specified in `process.argv`. + * + * Optionally `.default()` can take an object that maps keys to default values. + * + * The default value can be a `function` which returns a value. The name of the function will be used in the usage string. + * + * Optionally, `description` can also be provided and will take precedence over displaying the value in the usage instructions. + */ + default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; + default(key: K, value: V, description?: string): Argv; + default(defaults: D, description?: string): Argv & D>; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + demand(key: K | ReadonlyArray, msg?: string | true): Argv>; + demand(key: K | ReadonlyArray, msg?: string | true): Argv; + demand(key: string | ReadonlyArray, required?: boolean): Argv; + demand(positionals: number, msg: string): Argv; + demand(positionals: number, required?: boolean): Argv; + demand(positionals: number, max: number, msg?: string): Argv; + + /** + * @param key If is a string, show the usage information and exit if key wasn't specified in `process.argv`. + * If is an array, demand each element. + * @param msg If string is given, it will be printed when the argument is missing, instead of the standard error message. + * @param demand Controls whether the option is demanded; this is useful when using .options() to specify command line parameters. + */ + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; + demandOption(key: K | ReadonlyArray, msg?: string | true): Argv; + demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; + + /** + * Demand in context of commands. + * You can demand a minimum and a maximum number a user can have within your program, as well as provide corresponding error messages if either of the demands is not met. + */ + demandCommand(): Argv; + demandCommand(min: number, minMsg?: string): Argv; + demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; + + /** + * Describe a `key` for the generated usage information. + * + * Optionally `.describe()` can take an object that maps keys to descriptions. + */ + describe(key: string | ReadonlyArray, description: string): Argv; + describe(descriptions: { [key: string]: string }): Argv; + + /** Should yargs attempt to detect the os' locale? Defaults to `true`. */ + detectLocale(detect: boolean): Argv; + + /** + * Tell yargs to parse environment variables matching the given prefix and apply them to argv as though they were command line arguments. + * + * Use the "__" separator in the environment variable to indicate nested options. (e.g. prefix_nested__foo => nested.foo) + * + * If this method is called with no argument or with an empty string or with true, then all env vars will be applied to argv. + * + * Program arguments are defined in this order of precedence: + * 1. Command line args + * 2. Env vars + * 3. Config file/objects + * 4. Configured defaults + * + * Env var parsing is disabled by default, but you can also explicitly disable it by calling `.env(false)`, e.g. if you need to undo previous configuration. + */ + env(): Argv; + env(prefix: string): Argv; + env(enable: boolean): Argv; + + /** A message to print at the end of the usage instructions */ + epilog(msg: string): Argv; + /** A message to print at the end of the usage instructions */ + epilogue(msg: string): Argv; + + /** + * Give some example invocations of your program. + * Inside `cmd`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. + * Examples will be printed out as part of the help message. + */ + example(command: string, description: string): Argv; + + /** Manually indicate that the program should exit, and provide context about why we wanted to exit. Follows the behavior set by `.exitProcess().` */ + exit(code: number, err: Error): void; + + /** + * By default, yargs exits the process when the user passes a help flag, the user uses the `.version` functionality, validation fails, or the command handler fails. + * Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated. + */ + exitProcess(enabled: boolean): Argv; + + /** + * Method to execute when a failure occurs, rather than printing the failure message. + * @param func Is called with the failure message that would have been printed, the Error instance originally thrown and yargs state when the failure occurred. + */ + fail(func: (msg: string, err: Error, yargs: Argv) => any): Argv; + + /** + * Allows to programmatically get completion choices for any line. + * @param args An array of the words in the command line to complete. + * @param done The callback to be called with the resulting completions. + */ + getCompletion(args: ReadonlyArray, done: (completions: ReadonlyArray) => void): Argv; + + /** + * Indicate that an option (or group of options) should not be reset when a command is executed + * + * Options default to being global. + */ + global(key: string | ReadonlyArray): Argv; + + /** Given a key, or an array of keys, places options under an alternative heading when displaying usage instructions */ + group(key: string | ReadonlyArray, groupName: string): Argv; + + /** Hides a key from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see `showHidden()`). */ + hide(key: string): Argv; + + /** + * Configure an (e.g. `--help`) and implicit command that displays the usage string and exits the process. + * By default yargs enables help on the `--help` option. + * + * Note that any multi-char aliases (e.g. `help`) used for the help option will also be used for the implicit command. + * If there are no multi-char aliases (e.g. `h`), then all single-char aliases will be used for the command. + * + * If invoked without parameters, `.help()` will use `--help` as the option and help as the implicit command to trigger help output. + * + * @param [description] Customizes the description of the help option in the usage string. + * @param [enableExplicit] If `false` is provided, it will disable --help. + */ + help(): Argv; + help(enableExplicit: boolean): Argv; + help(option: string, enableExplicit: boolean): Argv; + help(option: string, description?: string, enableExplicit?: boolean): Argv; + + /** + * Given the key `x` is set, it is required that the key `y` is set. + * y` can either be the name of an argument to imply, a number indicating the position of an argument or an array of multiple implications to associate with `x`. + * + * Optionally `.implies()` can accept an object specifying multiple implications. + */ + implies(key: string, value: string | ReadonlyArray): Argv; + implies(implies: { [key: string]: string | ReadonlyArray }): Argv; + + /** + * Return the locale that yargs is currently using. + * + * By default, yargs will auto-detect the operating system's locale so that yargs-generated help content will display in the user's language. + */ + locale(): string; + /** + * Override the auto-detected locale from the user's operating system with a static locale. + * Note that the OS locale can be modified by setting/exporting the `LC_ALL` environment variable. + */ + locale(loc: string): Argv; + + /** + * Define global middleware functions to be called first, in list order, for all cli command. + * @param callbacks Can be a function or a list of functions. Each callback gets passed a reference to argv. + * @param [applyBeforeValidation] Set to `true` to apply middleware before validation. This will execute the middleware prior to validation checks, but after parsing. + */ + middleware(callbacks: MiddlewareFunction | ReadonlyArray>, applyBeforeValidation?: boolean): Argv; + + /** + * The number of arguments that should be consumed after a key. This can be a useful hint to prevent parsing ambiguity. + * + * Optionally `.nargs()` can take an object of `key`/`narg` pairs. + */ + nargs(key: string, count: number): Argv; + nargs(nargs: { [key: string]: number }): Argv; + + /** The key provided represents a path and should have `path.normalize()` applied. */ + normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + normalize(key: K | ReadonlyArray): Argv; + + /** + * Tell the parser to always interpret key as a number. + * + * If `key` is an array, all elements will be parsed as numbers. + * + * If the option is given on the command line without a value, `argv` will be populated with `undefined`. + * + * If the value given on the command line cannot be parsed as a number, `argv` will be populated with `NaN`. + * + * Note that decimals, hexadecimals, and scientific notation are all accepted. + */ + number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; + number(key: K | ReadonlyArray): Argv; + + /** + * Method to execute when a command finishes successfully. + * @param func Is called with the successful result of the command that finished. + */ + onFinishCommand(func: (result: any) => void): Argv; + + /** + * This method can be used to make yargs aware of options that could exist. + * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. + */ + option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + option(key: K, options: O): Argv }>; + option(options: O): Argv & InferredOptionTypes>; + + /** + * This method can be used to make yargs aware of options that could exist. + * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. + */ + options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; + options(key: K, options: O): Argv }>; + options(options: O): Argv & InferredOptionTypes>; + + /** + * Parse `args` instead of `process.argv`. Returns the `argv` object. `args` may either be a pre-processed argv array, or a raw argument string. + * + * Note: Providing a callback to parse() disables the `exitProcess` setting until after the callback is invoked. + * @param [context] Provides a useful mechanism for passing state information to commands + */ + parse(): { [key in keyof Arguments]: Arguments[key] }; + parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): { [key in keyof Arguments]: Arguments[key] }; + + /** + * If the arguments have not been parsed, this property is `false`. + * + * If the arguments have been parsed, this contain detailed parsed arguments. + */ + parsed: DetailedArguments | false; + + /** Allows to configure advanced yargs features. */ + parserConfiguration(configuration: Partial): Argv; + + /** + * Similar to `config()`, indicates that yargs should interpret the object from the specified key in package.json as a configuration object. + * @param [cwd] If provided, the package.json will be read from this location + */ + pkgConf(key: string | ReadonlyArray, cwd?: string): Argv; + + /** + * Allows you to configure a command's positional arguments with an API similar to `.option()`. + * `.positional()` should be called in a command's builder function, and is not available on the top-level yargs instance. If so, it will throw an error. + */ + positional(key: K, opt: O): Argv & { [key in K]: InferredOptionType }>; + positional(key: K, opt: O): Argv }>; + + /** Should yargs provide suggestions regarding similar commands if no matching command is found? */ + recommendCommands(): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + require(key: K | ReadonlyArray, msg?: string | true): Argv>; + require(key: string, msg: string): Argv; + require(key: string, required: boolean): Argv; + require(keys: ReadonlyArray, msg: string): Argv; + require(keys: ReadonlyArray, required: boolean): Argv; + require(positionals: number, required: boolean): Argv; + require(positionals: number, msg: string): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.demandCommand()' or '.demandOption()' instead + */ + required(key: K | ReadonlyArray, msg?: string | true): Argv>; + required(key: string, msg: string): Argv; + required(key: string, required: boolean): Argv; + required(keys: ReadonlyArray, msg: string): Argv; + required(keys: ReadonlyArray, required: boolean): Argv; + required(positionals: number, required: boolean): Argv; + required(positionals: number, msg: string): Argv; + + requiresArg(key: string | ReadonlyArray): Argv; + + /** + * @deprecated since version 6.6.0 + * Use '.global()' instead + */ + reset(): Argv; + + /** Set the name of your script ($0). Default is the base filename executed by node (`process.argv[1]`) */ + scriptName($0: string): Argv; + + /** + * Generate a bash completion script. + * Users of your application can install this script in their `.bashrc`, and yargs will provide completion shortcuts for commands and options. + */ + showCompletionScript(): Argv; + + /** + * Configure the `--show-hidden` option that displays the hidden keys (see `hide()`). + * @param option If `boolean`, it enables/disables this option altogether. i.e. hidden keys will be permanently hidden if first argument is `false`. + * If `string` it changes the key name ("--show-hidden"). + * @param description Changes the default description ("Show hidden options") + */ + showHidden(option?: string | boolean): Argv; + showHidden(option: string, description?: string): Argv; + + /** + * Print the usage data using the console function consoleLevel for printing. + * @param [consoleLevel='error'] + */ + showHelp(consoleLevel?: string): Argv; + + /** + * By default, yargs outputs a usage string if any error is detected. + * Use the `.showHelpOnFail()` method to customize this behavior. + * @param enable If `false`, the usage string is not output. + * @param [message] Message that is output after the error message. + */ + showHelpOnFail(enable: boolean, message?: string): Argv; + + /** Specifies either a single option key (string), or an array of options. If any of the options is present, yargs validation is skipped. */ + skipValidation(key: string | ReadonlyArray): Argv; + + /** + * Any command-line argument given that is not demanded, or does not have a corresponding description, will be reported as an error. + * + * Unrecognized commands will also be reported as errors. + */ + strict(): Argv; + strict(enabled: boolean): Argv; + + /** + * Tell the parser logic not to interpret `key` as a number or boolean. This can be useful if you need to preserve leading zeros in an input. + * + * If `key` is an array, interpret all the elements as strings. + * + * `.string('_')` will result in non-hyphenated arguments being interpreted as strings, regardless of whether they resemble numbers. + */ + string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; + string(key: K | ReadonlyArray): Argv; + + // Intended to be used with '.wrap()' + terminalWidth(): number; + + updateLocale(obj: { [key: string]: string }): Argv; + + /** + * Override the default strings used by yargs with the key/value pairs provided in obj + * + * If you explicitly specify a locale(), you should do so before calling `updateStrings()`. + */ + updateStrings(obj: { [key: string]: string }): Argv; + + /** + * Set a usage message to show which commands to use. + * Inside `message`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. + * + * If the optional `description`/`builder`/`handler` are provided, `.usage()` acts an an alias for `.command()`. + * This allows you to use `.usage()` to configure the default command that will be run as an entry-point to your application + * and allows you to provide configuration for the positional arguments accepted by your program: + */ + usage(message: string): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; + usage(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; + usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: O, handler?: (args: Arguments>) => void): Argv; + + /** + * Add an option (e.g. `--version`) that displays the version number (given by the version parameter) and exits the process. + * By default yargs enables version for the `--version` option. + * + * If no arguments are passed to version (`.version()`), yargs will parse the package.json of your module and use its version value. + * + * If the boolean argument `false` is provided, it will disable `--version`. + */ + version(): Argv; + version(version: string): Argv; + version(enable: boolean): Argv; + version(optionKey: string, version: string): Argv; + version(optionKey: string, description: string, version: string): Argv; + + /** + * Format usage output to wrap at columns many columns. + * + * By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to specify no column limit (no right-align). + * Use `.wrap(yargs.terminalWidth())` to maximize the width of yargs' usage instructions. + */ + wrap(columns: number | null): Argv; + } + + type Arguments = T & { + /** Non-option arguments */ + _: string[]; + /** The script name or node command */ + $0: string; + /** All remaining options */ + [argName: string]: unknown; + }; + + interface RequireDirectoryOptions { + /** Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list. */ + recurse?: boolean; + /** The types of files to look for when requiring command modules. */ + extensions?: ReadonlyArray; + /** + * A synchronous function called for each command module encountered. + * Accepts `commandObject`, `pathToFile`, and `filename` as arguments. + * Returns `commandObject` to include the command; any falsy value to exclude/skip it. + */ + visit?: (commandObject: any, pathToFile?: string, filename?: string) => any; + /** Whitelist certain modules */ + include?: RegExp | ((pathToFile: string) => boolean); + /** Blacklist certain modules. */ + exclude?: RegExp | ((pathToFile: string) => boolean); + } + + interface Options { + /** string or array of strings, alias(es) for the canonical option key, see `alias()` */ + alias?: string | ReadonlyArray; + /** boolean, interpret option as an array, see `array()` */ + array?: boolean; + /** boolean, interpret option as a boolean flag, see `boolean()` */ + boolean?: boolean; + /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ + choices?: Choices; + /** function, coerce or transform parsed command line values into another value, see `coerce()` */ + coerce?: (arg: any) => any; + /** boolean, interpret option as a path to a JSON config file, see `config()` */ + config?: boolean; + /** function, provide a custom config parsing function, see `config()` */ + configParser?: (configPath: string) => object; + /** string or object, require certain keys not to be set, see `conflicts()` */ + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + /** boolean, interpret option as a count of boolean flags, see `count()` */ + count?: boolean; + /** value, set a default value for the option, see `default()` */ + default?: any; + /** string, use this description for the default value in help content, see `default()` */ + defaultDescription?: string; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + demand?: boolean | string; + /** boolean or string, demand the option be given, with optional error message, see `demandOption()` */ + demandOption?: boolean | string; + /** string, the option description for help content, see `describe()` */ + desc?: string; + /** string, the option description for help content, see `describe()` */ + describe?: string; + /** string, the option description for help content, see `describe()` */ + description?: string; + /** boolean, indicate that this key should not be reset when a command is invoked, see `global()` */ + global?: boolean; + /** string, when displaying usage instructions place the option under an alternative group heading, see `group()` */ + group?: string; + /** don't display option in help output. */ + hidden?: boolean; + /** string or object, require certain keys to be set, see `implies()` */ + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + /** number, specify how many arguments should be consumed for the option, see `nargs()` */ + nargs?: number; + /** boolean, apply path.normalize() to the option, see `normalize()` */ + normalize?: boolean; + /** boolean, interpret option as a number, `number()` */ + number?: boolean; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + require?: boolean | string; + /** + * @deprecated since version 6.6.0 + * Use 'demandOption' instead + */ + required?: boolean | string; + /** boolean, require the option be specified with a value, see `requiresArg()` */ + requiresArg?: boolean; + /** boolean, skips validation if the option is present, see `skipValidation()` */ + skipValidation?: boolean; + /** boolean, interpret option as a string, see `string()` */ + string?: boolean; + type?: "array" | "count" | PositionalOptionsType; + } + + interface PositionalOptions { + /** string or array of strings, see `alias()` */ + alias?: string | ReadonlyArray; + /** boolean, interpret option as an array, see `array()` */ + array?: boolean; + /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ + choices?: Choices; + /** function, coerce or transform parsed command line values into another value, see `coerce()` */ + coerce?: (arg: any) => any; + /** string or object, require certain keys not to be set, see `conflicts()` */ + conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + /** value, set a default value for the option, see `default()` */ + default?: any; + /** boolean or string, demand the option be given, with optional error message, see `demandOption()` */ + demandOption?: boolean | string; + /** string, the option description for help content, see `describe()` */ + desc?: string; + /** string, the option description for help content, see `describe()` */ + describe?: string; + /** string, the option description for help content, see `describe()` */ + description?: string; + /** string or object, require certain keys to be set, see `implies()` */ + implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; + /** boolean, apply path.normalize() to the option, see normalize() */ + normalize?: boolean; + type?: PositionalOptionsType; + } + + /** Remove keys K in T */ + type Omit = { [key in Exclude]: T[key] }; + + /** Remove undefined as a possible value for keys K in T */ + type Defined = Omit & { [key in K]: Exclude }; + + /** Convert T to T[] and T | undefined to T[] | undefined */ + type ToArray = Array> | Extract; + + /** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */ + type ToString = (Exclude extends any[] ? string[] : string) | Extract; + + /** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */ + type ToNumber = (Exclude extends any[] ? number[] : number) | Extract; + + type InferredOptionType = + O extends { default: infer D } ? D : + O extends { type: "count" } ? number : + O extends { count: true } ? number : + O extends { required: string | true } ? RequiredOptionType : + O extends { require: string | true } ? RequiredOptionType : + O extends { demand: string | true } ? RequiredOptionType : + O extends { demandOption: string | true } ? RequiredOptionType : + RequiredOptionType | undefined; + + type RequiredOptionType = + O extends { type: "array", string: true } ? string[] : + O extends { type: "array", number: true } ? number[] : + O extends { type: "array", normalize: true } ? string[] : + O extends { type: "string", array: true } ? string[] : + O extends { type: "number", array: true } ? number[] : + O extends { string: true, array: true } ? string[] : + O extends { number: true, array: true } ? number[] : + O extends { normalize: true, array: true } ? string[] : + O extends { type: "array" } ? Array : + O extends { type: "boolean" } ? boolean : + O extends { type: "number" } ? number : + O extends { type: "string" } ? string : + O extends { array: true } ? Array : + O extends { boolean: true } ? boolean : + O extends { number: true } ? number : + O extends { string: true } ? string : + O extends { normalize: true } ? string : + O extends { choices: ReadonlyArray } ? C : + O extends { coerce: (arg: any) => infer T } ? T : + unknown; + + type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; + + interface CommandModule { + /** array of strings (or a single string) representing aliases of `exports.command`, positional args defined in an alias are ignored */ + aliases?: ReadonlyArray | string; + /** object declaring the options the command accepts, or a function accepting and returning a yargs instance */ + builder?: CommandBuilder; + /** string (or array of strings) that executes this command when given on the command line, first string may contain positional args */ + command?: ReadonlyArray | string; + /** string used as the description for the command in help text, use `false` for a hidden command */ + describe?: string | false; + /** a function which will be passed the parsed argv. */ + handler: (args: Arguments) => void; + } + + type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; + type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv) | ((args: Argv) => PromiseLike>); + type SyncCompletionFunction = (current: string, argv: any) => string[]; + type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; + type PromiseCompletionFunction = (current: string, argv: any) => Promise; + type MiddlewareFunction = (args: Arguments) => void; + type Choices = ReadonlyArray; + type PositionalOptionsType = "boolean" | "number" | "string"; +} + +declare var yargs: yargs.Argv; +export = yargs; diff --git a/packages/common/node_modules/@types/yargs/package.json b/packages/common/node_modules/@types/yargs/package.json new file mode 100644 index 0000000000..e749c1f116 --- /dev/null +++ b/packages/common/node_modules/@types/yargs/package.json @@ -0,0 +1,66 @@ +{ + "name": "@types/yargs", + "version": "15.0.4", + "description": "TypeScript definitions for yargs", + "license": "MIT", + "contributors": [ + { + "name": "Martin Poelstra", + "url": "https://github.com/poelstra", + "githubUsername": "poelstra" + }, + { + "name": "Mizunashi Mana", + "url": "https://github.com/mizunashi-mana", + "githubUsername": "mizunashi-mana" + }, + { + "name": "Jeffery Grajkowski", + "url": "https://github.com/pushplay", + "githubUsername": "pushplay" + }, + { + "name": "Jeff Kenney", + "url": "https://github.com/jeffkenney", + "githubUsername": "jeffkenney" + }, + { + "name": "Jimi (Dimitris) Charalampidis", + "url": "https://github.com/JimiC", + "githubUsername": "JimiC" + }, + { + "name": "Steffen Viken Valvåg", + "url": "https://github.com/steffenvv", + "githubUsername": "steffenvv" + }, + { + "name": "Emily Marigold Klassen", + "url": "https://github.com/forivall", + "githubUsername": "forivall" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss", + "githubUsername": "ExE-Boss" + }, + { + "name": "Aankhen", + "url": "https://github.com/Aankhen", + "githubUsername": "Aankhen" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/yargs" + }, + "scripts": {}, + "dependencies": { + "@types/yargs-parser": "*" + }, + "typesPublisherContentHash": "33123d2b50bbbc5d15307f8a14b565cbb797530f625c3087b83b21aceb528536", + "typeScriptVersion": "3.0" +} \ No newline at end of file diff --git a/packages/common/node_modules/@types/yargs/yargs.d.ts b/packages/common/node_modules/@types/yargs/yargs.d.ts new file mode 100644 index 0000000000..f370783b92 --- /dev/null +++ b/packages/common/node_modules/@types/yargs/yargs.d.ts @@ -0,0 +1,9 @@ +import { Argv } from '.'; + +export = Yargs; + +declare function Yargs( + processArgs?: ReadonlyArray, + cwd?: string, + parentRequire?: NodeRequire, +): Argv; diff --git a/packages/common/node_modules/ansi-styles/index.d.ts b/packages/common/node_modules/ansi-styles/index.d.ts new file mode 100644 index 0000000000..7e9b2b71b9 --- /dev/null +++ b/packages/common/node_modules/ansi-styles/index.d.ts @@ -0,0 +1,197 @@ +import * as cssColors from 'color-name'; + +declare namespace ansiStyles { + interface ColorConvert { + /** + The RGB color space. + + @param red - (`0`-`255`) + @param green - (`0`-`255`) + @param blue - (`0`-`255`) + */ + rgb(red: number, green: number, blue: number): string; + + /** + The RGB HEX color space. + + @param hex - A hexadecimal string containing RGB data. + */ + hex(hex: string): string; + + /** + @param keyword - A CSS color name. + */ + keyword(keyword: keyof typeof cssColors): string; + + /** + The HSL color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param lightness - (`0`-`100`) + */ + hsl(hue: number, saturation: number, lightness: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param saturation - (`0`-`100`) + @param value - (`0`-`100`) + */ + hsv(hue: number, saturation: number, value: number): string; + + /** + The HSV color space. + + @param hue - (`0`-`360`) + @param whiteness - (`0`-`100`) + @param blackness - (`0`-`100`) + */ + hwb(hue: number, whiteness: number, blackness: number): string; + + /** + Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. + */ + ansi(ansi: number): string; + + /** + Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(ansi: number): string; + } + + interface CSPair { + /** + The ANSI terminal control sequence for starting this style. + */ + readonly open: string; + + /** + The ANSI terminal control sequence for ending this style. + */ + readonly close: string; + } + + interface ColorBase { + readonly ansi: ColorConvert; + readonly ansi256: ColorConvert; + readonly ansi16m: ColorConvert; + + /** + The ANSI terminal control sequence for ending this color. + */ + readonly close: string; + } + + interface Modifier { + /** + Resets the current color chain. + */ + readonly reset: CSPair; + + /** + Make text bold. + */ + readonly bold: CSPair; + + /** + Emitting only a small amount of light. + */ + readonly dim: CSPair; + + /** + Make text italic. (Not widely supported) + */ + readonly italic: CSPair; + + /** + Make text underline. (Not widely supported) + */ + readonly underline: CSPair; + + /** + Inverse background and foreground colors. + */ + readonly inverse: CSPair; + + /** + Prints the text, but makes it invisible. + */ + readonly hidden: CSPair; + + /** + Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: CSPair; + } + + interface ForegroundColor { + readonly black: CSPair; + readonly red: CSPair; + readonly green: CSPair; + readonly yellow: CSPair; + readonly blue: CSPair; + readonly cyan: CSPair; + readonly magenta: CSPair; + readonly white: CSPair; + + /** + Alias for `blackBright`. + */ + readonly gray: CSPair; + + /** + Alias for `blackBright`. + */ + readonly grey: CSPair; + + readonly blackBright: CSPair; + readonly redBright: CSPair; + readonly greenBright: CSPair; + readonly yellowBright: CSPair; + readonly blueBright: CSPair; + readonly cyanBright: CSPair; + readonly magentaBright: CSPair; + readonly whiteBright: CSPair; + } + + interface BackgroundColor { + readonly bgBlack: CSPair; + readonly bgRed: CSPair; + readonly bgGreen: CSPair; + readonly bgYellow: CSPair; + readonly bgBlue: CSPair; + readonly bgCyan: CSPair; + readonly bgMagenta: CSPair; + readonly bgWhite: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGray: CSPair; + + /** + Alias for `bgBlackBright`. + */ + readonly bgGrey: CSPair; + + readonly bgBlackBright: CSPair; + readonly bgRedBright: CSPair; + readonly bgGreenBright: CSPair; + readonly bgYellowBright: CSPair; + readonly bgBlueBright: CSPair; + readonly bgCyanBright: CSPair; + readonly bgMagentaBright: CSPair; + readonly bgWhiteBright: CSPair; + } +} + +declare const ansiStyles: { + readonly modifier: ansiStyles.Modifier; + readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; + readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; + readonly codes: ReadonlyMap; +} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; + +export = ansiStyles; diff --git a/packages/common/node_modules/ansi-styles/index.js b/packages/common/node_modules/ansi-styles/index.js new file mode 100644 index 0000000000..5d82581a13 --- /dev/null +++ b/packages/common/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/packages/common/node_modules/ansi-styles/license b/packages/common/node_modules/ansi-styles/license new file mode 100644 index 0000000000..e7af2f7710 --- /dev/null +++ b/packages/common/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/common/node_modules/ansi-styles/package.json b/packages/common/node_modules/ansi-styles/package.json new file mode 100644 index 0000000000..347b035e1d --- /dev/null +++ b/packages/common/node_modules/ansi-styles/package.json @@ -0,0 +1,57 @@ +{ + "name": "ansi-styles", + "version": "4.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + } +} diff --git a/packages/common/node_modules/ansi-styles/readme.md b/packages/common/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000000..2a1ef65466 --- /dev/null +++ b/packages/common/node_modules/ansi-styles/readme.md @@ -0,0 +1,158 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + + + +## Install + +``` +$ npm install ansi-styles +``` + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `blackBright` (alias: `gray`, `grey`) +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` (alias: `bgGray`, `bgGrey`) +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +The following color spaces from `color-convert` are supported: + +- `rgb` +- `hex` +- `keyword` +- `hsl` +- `hsv` +- `hwb` +- `ansi` +- `ansi256` + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + +--- + +

+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/packages/common/node_modules/anymatch/LICENSE b/packages/common/node_modules/anymatch/LICENSE new file mode 100644 index 0000000000..491766ca79 --- /dev/null +++ b/packages/common/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/common/node_modules/anymatch/README.md b/packages/common/node_modules/anymatch/README.md new file mode 100644 index 0000000000..1dd67f5344 --- /dev/null +++ b/packages/common/node_modules/anymatch/README.md @@ -0,0 +1,87 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + + +Usage +----- +```sh +npm install anymatch +``` + +#### anymatch(matchers, testString, [returnIndex], [options]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __options__: (_Object_ [optional]_) Any of the [picomatch](https://github.com/micromatch/picomatch#options) options. + * __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. + +```js +const anymatch = require('anymatch'); + +const matchers = [ 'path/to/file.js', 'path/anyjs/**/*.js', /foo.js$/, string => string.includes('bar') && string.length > 10 ] ; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', {returnIndex: true}); // 2 +anymatch(matchers, 'path/anyjs/foo.js', {returnIndex: true}); // 1 + +// any picomatc + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true + +const matcher = anymatch(matchers); +['foo.js', 'bar.js'].filter(matcher); // [ 'foo.js' ] +anymatch master* ❯ + +``` + +#### anymatch(matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array#filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Changelog +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +- **v3.0:** Removed `startIndex` and `endIndex` arguments. Node 8.x-only. +- **v2.0:** [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). +- **v1.2:** anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/packages/common/node_modules/anymatch/index.d.ts b/packages/common/node_modules/anymatch/index.d.ts new file mode 100644 index 0000000000..196d061784 --- /dev/null +++ b/packages/common/node_modules/anymatch/index.d.ts @@ -0,0 +1,19 @@ +type AnymatchFn = (testString: string) => boolean; +type AnymatchPattern = string|RegExp|AnymatchFn; +type AnymatchMatcher = AnymatchPattern|AnymatchPattern[] +type AnymatchTester = { + (testString: string|any[], returnIndex: true): number; + (testString: string|any[]): boolean; +} + +type PicomatchOptions = {dot: boolean}; + +declare const anymatch: { + (matchers: AnymatchMatcher): AnymatchTester; + (matchers: AnymatchMatcher, testString: string|any[], returnIndex: true | PicomatchOptions): number; + (matchers: AnymatchMatcher, testString: string|any[]): boolean; +} + +export {AnymatchMatcher as Matcher} +export {AnymatchTester as Tester} +export default anymatch diff --git a/packages/common/node_modules/anymatch/index.js b/packages/common/node_modules/anymatch/index.js new file mode 100644 index 0000000000..24529c8a42 --- /dev/null +++ b/packages/common/node_modules/anymatch/index.js @@ -0,0 +1,102 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { value: true }); + +const picomatch = require('picomatch'); +const normalizePath = require('normalize-path'); + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch(item, opts)); + const patterns = mtchers.map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; diff --git a/packages/common/node_modules/anymatch/package.json b/packages/common/node_modules/anymatch/package.json new file mode 100644 index 0000000000..479ecc2385 --- /dev/null +++ b/packages/common/node_modules/anymatch/package.json @@ -0,0 +1,48 @@ +{ + "name": "anymatch", + "version": "3.1.1", + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "files": [ + "index.js", + "index.d.ts" + ], + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "author": { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + "license": "ISC", + "homepage": "https://github.com/micromatch/anymatch", + "repository": { + "type": "git", + "url": "https://github.com/micromatch/anymatch" + }, + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "scripts": { + "test": "nyc mocha", + "mocha": "mocha" + }, + "devDependencies": { + "mocha": "^6.1.3", + "nyc": "^14.0.0" + }, + "engines": { + "node": ">= 8" + } +} diff --git a/packages/common/node_modules/babel-jest/LICENSE b/packages/common/node_modules/babel-jest/LICENSE new file mode 100644 index 0000000000..b96dcb0480 --- /dev/null +++ b/packages/common/node_modules/babel-jest/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/common/node_modules/babel-jest/README.md b/packages/common/node_modules/babel-jest/README.md new file mode 100644 index 0000000000..237e5b6d53 --- /dev/null +++ b/packages/common/node_modules/babel-jest/README.md @@ -0,0 +1,25 @@ +# babel-jest + +[Babel](https://github.com/babel/babel) [jest](https://github.com/facebook/jest) plugin + +## Usage + +If you are already using `jest-cli`, add `babel-jest` and it will automatically compile JavaScript code using Babel. + +```bash +yarn add --dev babel-jest @babel/core +``` + +If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](https://jestjs.io/docs/configuration#transform-object-string-string) option to your preprocessor. + +## Setup + +_Note: this step is only required if you are using `babel-jest` with additional code preprocessors._ + +To explicitly define `babel-jest` as a transformer for your JavaScript code, map _.js_ files to the `babel-jest` module. Typescript files are also supported. + +```json +"transform": { + "^.+\\.[t|j]sx?$": "babel-jest" +}, +``` diff --git a/packages/common/node_modules/babel-jest/build/index.d.ts b/packages/common/node_modules/babel-jest/build/index.d.ts new file mode 100644 index 0000000000..501601ea9e --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/index.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Transformer } from '@jest/transform'; +import { TransformOptions } from '@babel/core'; +interface BabelJestTransformer extends Transformer { + canInstrument: true; +} +declare const transformer: BabelJestTransformer & { + createTransformer: (options?: TransformOptions) => BabelJestTransformer; +}; +export = transformer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/index.d.ts.map b/packages/common/node_modules/babel-jest/build/index.d.ts.map new file mode 100644 index 0000000000..746793858c --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAUrB,UAAU,oBAAqB,SAAQ,WAAW;IAChD,aAAa,EAAE,IAAI,CAAC;CACrB;AAiID,QAAA,MAAM,WAAW,EAAE,oBAAoB,GAAG;IACxC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,oBAAoB,CAAC;CAMzE,CAAC;AAEF,SAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/index.js b/packages/common/node_modules/babel-jest/build/index.js new file mode 100644 index 0000000000..b787296a6b --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/index.js @@ -0,0 +1,323 @@ +'use strict'; + +function _crypto() { + const data = require('crypto'); + + _crypto = function () { + return data; + }; + + return data; +} + +function fs() { + const data = _interopRequireWildcard(require('fs')); + + fs = function () { + return data; + }; + + return data; +} + +function path() { + const data = _interopRequireWildcard(require('path')); + + path = function () { + return data; + }; + + return data; +} + +function _core() { + const data = require('@babel/core'); + + _core = function () { + return data; + }; + + return data; +} + +var _loadBabelConfig = require('./loadBabelConfig'); + +function _chalk() { + const data = _interopRequireDefault(require('chalk')); + + _chalk = function () { + return data; + }; + + return data; +} + +function _slash() { + const data = _interopRequireDefault(require('slash')); + + _slash = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +function _getRequireWildcardCache() { + if (typeof WeakMap !== 'function') return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function () { + return cache; + }; + return cache; +} + +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } + if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { + return {default: obj}; + } + var cache = _getRequireWildcardCache(); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = + Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} + +const THIS_FILE = fs().readFileSync(__filename); + +const jestPresetPath = require.resolve('babel-preset-jest'); + +const babelIstanbulPlugin = require.resolve('babel-plugin-istanbul'); // Narrow down the types + +const createTransformer = (inputOptions = {}) => { + var _inputOptions$plugins, _inputOptions$presets; + + const options = _objectSpread({}, inputOptions, { + caller: _objectSpread( + { + name: 'babel-jest', + supportsDynamicImport: false, + supportsStaticESM: false + }, + inputOptions.caller + ), + compact: false, + plugins: + (_inputOptions$plugins = inputOptions.plugins) !== null && + _inputOptions$plugins !== void 0 + ? _inputOptions$plugins + : [], + presets: ((_inputOptions$presets = inputOptions.presets) !== null && + _inputOptions$presets !== void 0 + ? _inputOptions$presets + : [] + ).concat(jestPresetPath), + sourceMaps: 'both' + }); + + function loadBabelConfig(cwd, filename, transformOptions) { + var _transformOptions$sup, _transformOptions$sup2; + + // `cwd` first to allow incoming options to override it + const babelConfig = (0, _loadBabelConfig.loadPartialConfig)( + _objectSpread( + { + cwd + }, + options, + { + caller: _objectSpread({}, options.caller, { + supportsDynamicImport: + (_transformOptions$sup = + transformOptions === null || transformOptions === void 0 + ? void 0 + : transformOptions.supportsDynamicImport) !== null && + _transformOptions$sup !== void 0 + ? _transformOptions$sup + : options.caller.supportsDynamicImport, + supportsStaticESM: + (_transformOptions$sup2 = + transformOptions === null || transformOptions === void 0 + ? void 0 + : transformOptions.supportsStaticESM) !== null && + _transformOptions$sup2 !== void 0 + ? _transformOptions$sup2 + : options.caller.supportsStaticESM + }), + filename + } + ) + ); + + if (!babelConfig) { + throw new Error( + `babel-jest: Babel ignores ${_chalk().default.bold( + (0, _slash().default)(path().relative(cwd, filename)) + )} - make sure to include the file in Jest's ${_chalk().default.bold( + 'transformIgnorePatterns' + )} as well.` + ); + } + + return babelConfig; + } + + return { + canInstrument: true, + + getCacheKey(fileData, filename, configString, cacheKeyOptions) { + const {config, instrument, rootDir} = cacheKeyOptions; + const babelOptions = loadBabelConfig( + config.cwd, + filename, + cacheKeyOptions + ); + const configPath = [ + babelOptions.config || '', + babelOptions.babelrc || '' + ]; + return (0, _crypto().createHash)('md5') + .update(THIS_FILE) + .update('\0', 'utf8') + .update(JSON.stringify(babelOptions.options)) + .update('\0', 'utf8') + .update(fileData) + .update('\0', 'utf8') + .update(path().relative(rootDir, filename)) + .update('\0', 'utf8') + .update(configString) + .update('\0', 'utf8') + .update(configPath.join('')) + .update('\0', 'utf8') + .update(instrument ? 'instrument' : '') + .update('\0', 'utf8') + .update(process.env.NODE_ENV || '') + .update('\0', 'utf8') + .update(process.env.BABEL_ENV || '') + .digest('hex'); + }, + + process(src, filename, config, transformOptions) { + const babelOptions = _objectSpread( + {}, + loadBabelConfig(config.cwd, filename, transformOptions).options + ); + + if ( + transformOptions === null || transformOptions === void 0 + ? void 0 + : transformOptions.instrument + ) { + babelOptions.auxiliaryCommentBefore = ' istanbul ignore next '; // Copied from jest-runtime transform.js + + babelOptions.plugins = (babelOptions.plugins || []).concat([ + [ + babelIstanbulPlugin, + { + // files outside `cwd` will not be instrumented + cwd: config.rootDir, + exclude: [] + } + ] + ]); + } + + const transformResult = (0, _core().transformSync)(src, babelOptions); + + if (transformResult) { + const {code, map} = transformResult; + + if (typeof code === 'string') { + return { + code, + map + }; + } + } + + return src; + } + }; +}; + +const transformer = _objectSpread({}, createTransformer(), { + // Assigned here so only the exported transformer has `createTransformer`, + // instead of all created transformers by the function + createTransformer +}); + +module.exports = transformer; diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts new file mode 100644 index 0000000000..0930453492 --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export { loadPartialConfig } from '@babel/core'; +//# sourceMappingURL=loadBabelConfig.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map new file mode 100644 index 0000000000..8e109f41cc --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"loadBabelConfig.d.ts","sourceRoot":"","sources":["../src/loadBabelConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.js b/packages/common/node_modules/babel-jest/build/loadBabelConfig.js new file mode 100644 index 0000000000..f91dea5dbb --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/loadBabelConfig.js @@ -0,0 +1,21 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +Object.defineProperty(exports, 'loadPartialConfig', { + enumerable: true, + get: function () { + return _core().loadPartialConfig; + } +}); + +function _core() { + const data = require('@babel/core'); + + _core = function () { + return data; + }; + + return data; +} diff --git a/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts b/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts new file mode 100644 index 0000000000..6bd60bc5a2 --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import { Transformer } from '@jest/transform'; +import { TransformOptions } from '@babel/core'; +interface BabelJestTransformer extends Transformer { + canInstrument: true; +} +declare const transformer: BabelJestTransformer & { + createTransformer: (options?: TransformOptions) => BabelJestTransformer; +}; +export = transformer; +//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts b/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts new file mode 100644 index 0000000000..11309e96b9 --- /dev/null +++ b/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +export { loadPartialConfig } from '@babel/core'; +//# sourceMappingURL=loadBabelConfig.d.ts.map diff --git a/packages/common/node_modules/babel-jest/package.json b/packages/common/node_modules/babel-jest/package.json new file mode 100644 index 0000000000..9877edc40f --- /dev/null +++ b/packages/common/node_modules/babel-jest/package.json @@ -0,0 +1,42 @@ +{ + "name": "babel-jest", + "description": "Jest plugin to use babel for transformation.", + "version": "25.3.0", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-jest" + }, + "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", + "typesVersions": { + "<3.8": { + "build/*": [ + "build/ts3.4/*" + ] + } + }, + "dependencies": { + "@jest/transform": "^25.3.0", + "@jest/types": "^25.3.0", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^25.3.0", + "chalk": "^3.0.0", + "slash": "^3.0.0" + }, + "devDependencies": { + "@babel/core": "^7.1.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + }, + "engines": { + "node": ">= 8.3" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" +} diff --git a/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md b/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md new file mode 100644 index 0000000000..4f7b0a8306 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md @@ -0,0 +1,306 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [6.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.2.0...v6.0.0) (2019-12-20) + + +### ⚠ BREAKING CHANGES + +* Drop node.js 6 (#226) + +### Features + +* Add support for instrumenter options ([#227](https://github.com/istanbuljs/babel-plugin-istanbul/issues/227)) ([fe08f5b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/fe08f5b8282136c7ed9375fa32148586bd6a7e28)), closes [#208](https://github.com/istanbuljs/babel-plugin-istanbul/issues/208) [#212](https://github.com/istanbuljs/babel-plugin-istanbul/issues/212) +* Drop node.js 6 ([#226](https://github.com/istanbuljs/babel-plugin-istanbul/issues/226)) ([93db21a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/93db21aa2bbdbb06fb784f52c24a7847fad6be92)), closes [#209](https://github.com/istanbuljs/babel-plugin-istanbul/issues/209) + +## [5.2.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.4...v5.2.0) (2019-07-18) + + +### Bug Fixes + +* Print explicit error if use with babel 6 is attempted ([#207](https://github.com/istanbuljs/babel-plugin-istanbul/issues/207)) ([a12cf16](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a12cf16)) + + +### Features + +* Support turning off node_modules default exclude via flag ([#172](https://github.com/istanbuljs/babel-plugin-istanbul/issues/172)) ([a314f06](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a314f06)) + + + +## [5.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.3...v5.1.4) (2019-04-25) + + + +## [5.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.2...v5.1.3) (2019-04-23) + + +### Bug Fixes + +* Revert [#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) due to regression detailed at [#201](https://github.com/istanbuljs/babel-plugin-istanbul/issues/201) + + + +## [5.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.1...v5.1.2) (2019-04-10) + + +### Bug Fixes + +* Ensure correct scope references after traversal ([#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192)) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) + + + + +## [5.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.0...v5.1.1) (2019-01-11) + + +### Bug Fixes + +* respect changes of cwd in options ([#171](https://github.com/istanbuljs/babel-plugin-istanbul/issues/171)) ([adec723](https://github.com/istanbuljs/babel-plugin-istanbul/commit/adec723)) + + + + +# [5.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.1...v5.1.0) (2018-09-07) + + +### Features + +* Bump dependencies. ([b509649](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b509649)) + + + + +## [5.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.0...v5.0.1) (2018-07-24) + + + + +# [5.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.6...v5.0.0) (2018-06-27) + + +### Features + +* upgrade to babel 7 and newest istanbul libraries ([#158](https://github.com/istanbuljs/babel-plugin-istanbul/issues/158)) ([a9e1564](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a9e1564)) + + +### BREAKING CHANGES + +* Drop node 4 support, upgrade to babel 7, stop shipping @babel/plugin-syntax-object-rest-spread + + + + +## 4.1.6 (2018-03-09) + +* chore: explicit update of istanbul dependencies (#149) ([77b6eb7](https://github.com/istanbuljs/babel-plugin-istanbul/commit/77b6eb7)), closes [#149](https://github.com/istanbuljs/babel-plugin-istanbul/issues/149) +* chore(package): update coveralls to version 3.0.0 (#133) ([7045a03](https://github.com/istanbuljs/babel-plugin-istanbul/commit/7045a03)), closes [#133](https://github.com/istanbuljs/babel-plugin-istanbul/issues/133) +* chore(package): update mocha to version 4.0.0 (#134) ([38176ba](https://github.com/istanbuljs/babel-plugin-istanbul/commit/38176ba)), closes [#134](https://github.com/istanbuljs/babel-plugin-istanbul/issues/134) +* fix: babel-preset-es2015 => babel-preset-env (#138) ([18fe954](https://github.com/istanbuljs/babel-plugin-istanbul/commit/18fe954)), closes [#138](https://github.com/istanbuljs/babel-plugin-istanbul/issues/138) +* fix: include object-spread-syntax plugin (#141) ([428a952](https://github.com/istanbuljs/babel-plugin-istanbul/commit/428a952)), closes [#141](https://github.com/istanbuljs/babel-plugin-istanbul/issues/141) + + + + +## [4.1.5](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.2...v4.1.5) (2017-08-23) + + + + +## [4.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.3...v4.1.4) (2017-05-27) + + + + +## [4.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.3) (2017-04-29) + + + + +## [4.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.2) (2017-03-27) + + + + +## [4.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.0...v4.1.1) (2017-03-22) + + +### Bug Fixes + +* explicit upgrade to patched version of istanbul-lib-instrument ([db8ecbe](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db8ecbe)) + + + + +# [4.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.0.0...v4.1.0) (2017-03-21) + + +### Features + +* add includeUntested option to expose coverage of all instrumented files ([#80](https://github.com/istanbuljs/babel-plugin-istanbul/issues/80)) ([b078bbd](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b078bbd)) + + + + +# [4.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.2...v4.0.0) (2017-02-07) + + +### Bug Fixes + +* load configuration from process.env.NYC_CONFIG if present ([#93](https://github.com/istanbuljs/babel-plugin-istanbul/issues/93)) ([e902924](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e902924)) + + +### Features + +* drop Node 0.10 and 0.12 support, upgrade dependencies to reflect this ([#88](https://github.com/istanbuljs/babel-plugin-istanbul/issues/88)) ([594c03a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/594c03a)) +* we can now use the language feature Object.assign ([#92](https://github.com/istanbuljs/babel-plugin-istanbul/issues/92)) ([f77db2a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f77db2a)) + + +### BREAKING CHANGES + +* I've updated dependencies and dropped Node 0.10 and Node 0.12 support. + + + + +## [3.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.1...v3.1.2) (2017-01-04) + + +### Bug Fixes + +* address regression related to export const foo = () => {} ([#79](https://github.com/istanbuljs/babel-plugin-istanbul/issues/79)) ([f870a8f](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f870a8f)) + + + + +## [3.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.0...v3.1.1) (2017-01-02) + + + + +# [3.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.0.0...v3.1.0) (2016-12-27) + + +### Bug Fixes + +* upgrade a bunch of core dependencies ([#77](https://github.com/istanbuljs/babel-plugin-istanbul/issues/77)) ([e764330](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e764330)) + + +### Features + +* accept source map input for the visitor ([#75](https://github.com/istanbuljs/babel-plugin-istanbul/issues/75)) ([437e90b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/437e90b)) + + + + +# [3.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.3...v3.0.0) (2016-11-14) + + +### Chores + +* **package:** update test-exclude to version 3.0.0 ([#68](https://github.com/istanbuljs/babel-plugin-istanbul/issues/68)) ([0396385](https://github.com/istanbuljs/babel-plugin-istanbul/commit/0396385)) + + +### BREAKING CHANGES + +* package: test-exclude now adds `**/node_modules/**` as exclude rule by default. + + + + +## [2.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.2...v2.0.3) (2016-10-17) + + +### Bug Fixes + +* force istanbul-lib-instrument with variable hoisting fix ([#64](https://github.com/istanbuljs/babel-plugin-istanbul/issues/64)) ([209a0cf](https://github.com/istanbuljs/babel-plugin-istanbul/commit/209a0cf)) +* switch deprecated lodash.assign for object-assign ([#58](https://github.com/istanbuljs/babel-plugin-istanbul/issues/58)) ([6e051fc](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6e051fc)) + + + + +## [2.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.1...v2.0.2) (2016-09-08) + + +### Bug Fixes + +* take realpath of cwd, whether or not set in env ([#37](https://github.com/istanbuljs/babel-plugin-istanbul/issues/37)) ([6274d83](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6274d83)) + + + + +## [2.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.0...v2.0.1) (2016-09-02) + + +### Bug Fixes + +* update istanbul-lib-instrument ([573e0d4](https://github.com/istanbuljs/babel-plugin-istanbul/commit/573e0d4)) + + + + +# [2.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.1.0...v2.0.0) (2016-08-14) + + +### Chores + +* upgrade to version of test-exclude with new exclude rules ([#35](https://github.com/istanbuljs/babel-plugin-istanbul/issues/35)) ([220ce2b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/220ce2b)) + + +### BREAKING CHANGES + +* see https://github.com/istanbuljs/test-exclude/blob/master/CHANGELOG.md#breaking-changes + + + + +# [1.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.3...v1.1.0) (2016-07-21) + + +### Bug Fixes + +* upgrade to istanbul-lib-instrument with faster babel-generator ([#18](https://github.com/istanbuljs/babel-plugin-istanbul/issues/18)) ([d33263c](https://github.com/istanbuljs/babel-plugin-istanbul/commit/d33263c)) + + +### Features + +* allow exclude/include options to be passed as Babel plugin config ([#16](https://github.com/istanbuljs/babel-plugin-istanbul/issues/16)) ([cf68421](https://github.com/istanbuljs/babel-plugin-istanbul/commit/cf68421)) + + + + +## [1.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.2...v1.0.3) (2016-07-09) + + +### Bug Fixes + +* keep using NYC_CWD if available ([#10](https://github.com/istanbuljs/babel-plugin-istanbul/issues/10)) ([db0352b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db0352b)) + + + + +## [1.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.1...v1.0.2) (2016-07-03) + + +### Bug Fixes + +* take realpath of process.cwd(), fixes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) ([#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8)) ([e8d3785](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e8d3785)), closes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) [#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8) + + + + +## [1.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.0...v1.0.1) (2016-06-30) + + +### Bug Fixes + +* upgrade to version of istanbul-lib-instrument that fixes some out of bounds issues ([#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6)) ([a949065](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a949065)), closes [#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6) + + + +# 1.0.0 (2016-06-26) + + +### Features + +* port functionality from __coverage__, get ready for first release ([#2](https://github.com/istanbuljs/babel-plugin-istanbul/issues/2)) ([2a8ee44](https://github.com/istanbuljs/babel-plugin-istanbul/commit/2a8ee44)) diff --git a/packages/common/node_modules/babel-plugin-istanbul/LICENSE b/packages/common/node_modules/babel-plugin-istanbul/LICENSE new file mode 100644 index 0000000000..22f21ab994 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016, Istanbul Code Coverage +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of babel-plugin-istanbul nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/common/node_modules/babel-plugin-istanbul/README.md b/packages/common/node_modules/babel-plugin-istanbul/README.md new file mode 100644 index 0000000000..3910baead1 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/README.md @@ -0,0 +1,137 @@ +# babel-plugin-istanbul + +[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/babel-plugin-istanbul.svg)](https://greenkeeper.io/) +[![Build Status](https://travis-ci.org/istanbuljs/babel-plugin-istanbul.svg?branch=master)](https://travis-ci.org/istanbuljs/babel-plugin-istanbul) +[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +[![community slack](http://devtoolscommunity.herokuapp.com/badge.svg)](http://devtoolscommunity.herokuapp.com) + +_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. + +A Babel plugin that instruments your code with Istanbul coverage. +It can instantly be used with [karma-coverage](https://github.com/karma-runner/karma-coverage) and mocha on Node.js (through [nyc](https://github.com/bcoe/nyc)). + +__Note:__ This plugin does not generate any report or save any data to any file; +it only adds instrumenting code to your JavaScript source code. +To integrate with testing tools, please see the [Integrations](#integrations) section. + +## Usage + +Install it: + +``` +npm install --save-dev babel-plugin-istanbul +``` + +Add it to `.babelrc` in test mode: + +```js +{ + "env": { + "test": { + "plugins": [ "istanbul" ] + } + } +} +``` + +Optionally, use [cross-env](https://www.npmjs.com/package/cross-env) to set +`NODE_ENV=test`: + +```json +{ + "scripts": { + "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js" + } +} +``` + +## Integrations + +### karma + +It _just works_ with Karma. First, make sure that the code is already transpiled by Babel (either using `karma-babel-preprocessor`, `karma-webpack`, or `karma-browserify`). Then, simply set up [karma-coverage](https://github.com/karma-runner/karma-coverage) according to the docs, but __don’t add the `coverage` preprocessor.__ This plugin has already instrumented your code, and Karma should pick it up automatically. + +It has been tested with [bemusic/bemuse](https://codecov.io/github/bemusic/bemuse) project, which contains ~2400 statements. + +### mocha on node.js (through nyc) + +Configure Mocha to transpile JavaScript code using Babel, then you can run your tests with [`nyc`](https://github.com/bcoe/nyc), which will collect all the coverage report. + +babel-plugin-istanbul respects the `include`/`exclude` configuration options from nyc, +but you also need to __configure NYC not to instrument your code__ by adding these settings in your `package.json`: + +```js + "nyc": { + "sourceMap": false, + "instrument": false + }, +``` + +## Ignoring files + +You don't want to cover your test files as this will skew your coverage results. You can configure this by providing plugin options matching nyc's [`exclude`/`include` rules](https://github.com/bcoe/nyc#excluding-files): + +```json +{ + "env": { + "test": { + "plugins": [ + ["istanbul", { + "exclude": [ + "**/*.spec.js" + ] + }] + ] + } + } +} +``` + +If you don't provide options in your Babel config, the plugin will look for `exclude`/`include` config under an `"nyc"` key in `package.json`. + +You can also use [istanbul's ignore hints](https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes) to specify specific lines of code to skip instrumenting. + +## Source Maps + +By default, this plugin will pick up inline source maps and attach them to the instrumented code such that code coverage can be remapped back to the original source, even for multi-step build processes. This can be memory intensive. Set `useInlineSourceMaps` to prevent this behavior. + +```json +{ + "env": { + "test": { + "plugins": [ + ["istanbul", { + "useInlineSourceMaps": false + }] + ] + } + } +} +``` + +If you're instrumenting code programatically, you can pass a source map explicitly. +```js +import babelPluginIstanbul from 'babel-plugin-istanbul'; + +function instrument(sourceCode, sourceMap, fileName) { + return babel.transform(sourceCode, { + filename, + plugins: [ + [babelPluginIstanbul, { + inputSourceMap: sourceMap + }] + ] + }) +} +``` + +## Credit where credit is due + +The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__). + +## `babel-plugin-istanbul` for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `babel-plugin-istanbul` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-babel-plugin-istanbul?utm_source=npm-babel-plugin-istanbul&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/packages/common/node_modules/babel-plugin-istanbul/lib/index.js b/packages/common/node_modules/babel-plugin-istanbul/lib/index.js new file mode 100644 index 0000000000..8cf743330b --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/lib/index.js @@ -0,0 +1,170 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _path = _interopRequireDefault(require("path")); + +var _fs = require("fs"); + +var _child_process = require("child_process"); + +var _helperPluginUtils = require("@babel/helper-plugin-utils"); + +var _istanbulLibInstrument = require("istanbul-lib-instrument"); + +var _testExclude = _interopRequireDefault(require("test-exclude")); + +var _schema = _interopRequireDefault(require("@istanbuljs/schema")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getRealpath(n) { + try { + return (0, _fs.realpathSync)(n) || + /* istanbul ignore next */ + n; + } catch (e) { + /* istanbul ignore next */ + return n; + } +} + +const memoize = new Map(); +/* istanbul ignore next */ + +const memosep = _path.default.sep === '/' ? ':' : ';'; + +function loadNycConfig(cwd, opts) { + let memokey = cwd; + const args = [_path.default.resolve(__dirname, 'load-nyc-config-sync.js'), cwd]; + + if ('nycrcPath' in opts) { + args.push(opts.nycrcPath); + memokey += memosep + opts.nycrcPath; + } + /* execFileSync is expensive, avoid it if possible! */ + + + if (memoize.has(memokey)) { + return memoize.get(memokey); + } + + const result = JSON.parse((0, _child_process.execFileSync)(process.execPath, args)); + const error = result['load-nyc-config-sync-error']; + + if (error) { + throw new Error(error); + } + + const config = { ..._schema.default.defaults.babelPluginIstanbul, + cwd, + ...result + }; + memoize.set(memokey, config); + return config; +} + +function findConfig(opts) { + const cwd = getRealpath(opts.cwd || process.env.NYC_CWD || + /* istanbul ignore next */ + process.cwd()); + const keys = Object.keys(opts); + const ignored = Object.keys(opts).filter(s => s === 'nycrcPath' || s === 'cwd'); + + if (keys.length > ignored.length) { + // explicitly configuring options in babel + // takes precedence. + return { ..._schema.default.defaults.babelPluginIstanbul, + cwd, + ...opts + }; + } + + if (ignored.length === 0 && process.env.NYC_CONFIG) { + // defaults were already applied by nyc + return JSON.parse(process.env.NYC_CONFIG); + } + + return loadNycConfig(cwd, opts); +} + +function makeShouldSkip() { + let exclude; + return function shouldSkip(file, nycConfig) { + if (!exclude || exclude.cwd !== nycConfig.cwd) { + exclude = new _testExclude.default({ + cwd: nycConfig.cwd, + include: nycConfig.include, + exclude: nycConfig.exclude, + extension: nycConfig.extension, + // Make sure this is true unless explicitly set to `false`. `undefined` is still `true`. + excludeNodeModules: nycConfig.excludeNodeModules !== false + }); + } + + return !exclude.shouldInstrument(file); + }; +} + +var _default = (0, _helperPluginUtils.declare)(api => { + api.assertVersion(7); + const shouldSkip = makeShouldSkip(); + const t = api.types; + return { + visitor: { + Program: { + enter(path) { + this.__dv__ = null; + this.nycConfig = findConfig(this.opts); + const realPath = getRealpath(this.file.opts.filename); + + if (shouldSkip(realPath, this.nycConfig)) { + return; + } + + let { + inputSourceMap + } = this.opts; + + if (this.opts.useInlineSourceMaps !== false) { + if (!inputSourceMap && this.file.inputMap) { + inputSourceMap = this.file.inputMap.sourcemap; + } + } + + const visitorOptions = {}; + Object.entries(_schema.default.defaults.instrumentVisitor).forEach(([name, defaultValue]) => { + if (name in this.nycConfig) { + visitorOptions[name] = this.nycConfig[name]; + } else { + visitorOptions[name] = _schema.default.defaults.instrumentVisitor[name]; + } + }); + this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, { ...visitorOptions, + inputSourceMap + }); + + this.__dv__.enter(path); + }, + + exit(path) { + if (!this.__dv__) { + return; + } + + const result = this.__dv__.exit(path); + + if (this.opts.onCover) { + this.opts.onCover(getRealpath(this.file.opts.filename), result.fileCoverage); + } + } + + } + } + }; +}); + +exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-istanbul/lib/load-nyc-config-sync.js b/packages/common/node_modules/babel-plugin-istanbul/lib/load-nyc-config-sync.js new file mode 100644 index 0000000000..5d621835e1 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/lib/load-nyc-config-sync.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +'use strict'; + +const { + loadNycConfig +} = require('@istanbuljs/load-nyc-config'); + +async function main() { + const [cwd, nycrcPath] = process.argv.slice(2); + console.log(JSON.stringify((await loadNycConfig({ + cwd, + nycrcPath + })))); +} + +main().catch(error => { + console.log(JSON.stringify({ + 'load-nyc-config-sync-error': error.message + })); +}); \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-istanbul/package.json b/packages/common/node_modules/babel-plugin-istanbul/package.json new file mode 100644 index 0000000000..4003a8aeaf --- /dev/null +++ b/packages/common/node_modules/babel-plugin-istanbul/package.json @@ -0,0 +1,73 @@ +{ + "name": "babel-plugin-istanbul", + "version": "6.0.0", + "author": "Thai Pangsakulyanont @dtinth", + "license": "BSD-3-Clause", + "description": "A babel plugin that adds istanbul instrumentation to ES6 code", + "main": "lib/index.js", + "files": [ + "lib" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + }, + "devDependencies": { + "@babel/cli": "^7.7.5", + "@babel/core": "^7.7.5", + "@babel/plugin-transform-modules-commonjs": "^7.7.5", + "@babel/register": "^7.7.4", + "chai": "^4.2.0", + "coveralls": "^3.0.9", + "cross-env": "^6.0.3", + "mocha": "^6.2.2", + "nyc": "^15.0.0", + "pmock": "^0.2.3", + "standard": "^14.3.1", + "standard-version": "^7.1.0" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "release": "babel src --out-dir lib", + "pretest": "standard && npm run release", + "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --timeout 5000 test/*.js", + "prepublish": "npm test && npm run release", + "version": "standard-version" + }, + "standard": { + "ignore": [ + "fixtures/*.js" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/istanbuljs/babel-plugin-istanbul.git" + }, + "keywords": [ + "istanbul", + "babel", + "plugin", + "instrumentation" + ], + "nyc": { + "include": [ + "src/*.js", + "fixtures/should-cover.js" + ], + "require": [ + "@babel/register" + ], + "sourceMap": false, + "instrument": false + }, + "bugs": { + "url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues" + }, + "homepage": "https://github.com/istanbuljs/babel-plugin-istanbul#readme", + "engines": { + "node": ">=8" + } +} diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE b/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE new file mode 100644 index 0000000000..b96dcb0480 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/README.md b/packages/common/node_modules/babel-plugin-jest-hoist/README.md new file mode 100644 index 0000000000..15c1b181d7 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/README.md @@ -0,0 +1,33 @@ +# babel-plugin-jest-hoist + +Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). + +## Installation + +```sh +$ yarn add --dev babel-plugin-jest-hoist +``` + +## Usage + +### Via `babel.config.js` (Recommended) + +```js +module.exports = { + plugins: ['jest-hoist'], +}; +``` + +### Via CLI + +```sh +$ babel --plugins jest-hoist script.js +``` + +### Via Node API + +```javascript +require('@babel/core').transform('code', { + plugins: ['jest-hoist'], +}); +``` diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts new file mode 100644 index 0000000000..d45f960901 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ +import type { Visitor } from '@babel/traverse'; +declare const _default: () => { + visitor: Visitor<{}>; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map new file mode 100644 index 0000000000..bfd0567d5c --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAW,OAAO,EAAC,MAAM,iBAAiB,CAAC;;;;AAkJvD,wBA8BE"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js new file mode 100644 index 0000000000..3b7becbe9d --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js @@ -0,0 +1,194 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); +exports.default = void 0; + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ +// We allow `jest`, `expect`, `require`, all default Node.js globals and all +// ES2015 built-ins to be used inside of a `jest.mock` factory. +// We also allow variables prefixed with `mock` as an escape-hatch. +const WHITELISTED_IDENTIFIERS = new Set( + [ + 'Array', + 'ArrayBuffer', + 'Boolean', + 'BigInt', + 'DataView', + 'Date', + 'Error', + 'EvalError', + 'Float32Array', + 'Float64Array', + 'Function', + 'Generator', + 'GeneratorFunction', + 'Infinity', + 'Int16Array', + 'Int32Array', + 'Int8Array', + 'InternalError', + 'Intl', + 'JSON', + 'Map', + 'Math', + 'NaN', + 'Number', + 'Object', + 'Promise', + 'Proxy', + 'RangeError', + 'ReferenceError', + 'Reflect', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'SyntaxError', + 'TypeError', + 'URIError', + 'Uint16Array', + 'Uint32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'WeakMap', + 'WeakSet', + 'arguments', + 'console', + 'expect', + 'isNaN', + 'jest', + 'parseFloat', + 'parseInt', + 'require', + 'undefined', + ...Object.getOwnPropertyNames(global) + ].sort() +); +const JEST_GLOBAL = { + name: 'jest' +}; // TODO: Should be Visitor<{ids: Set>}>, but `ReferencedIdentifier` doesn't exist + +const IDVisitor = { + ReferencedIdentifier(path) { + // @ts-ignore: passed as Visitor State + this.ids.add(path); + }, + + blacklist: ['TypeAnnotation', 'TSTypeAnnotation', 'TSTypeReference'] +}; +const FUNCTIONS = Object.create(null); + +FUNCTIONS.mock = args => { + if (args.length === 1) { + return args[0].isStringLiteral() || args[0].isLiteral(); + } else if (args.length === 2 || args.length === 3) { + const moduleFactory = args[1]; + + if (!moduleFactory.isFunction()) { + throw moduleFactory.buildCodeFrameError( + 'The second argument of `jest.mock` must be an inline function.\n', + TypeError + ); + } + + const ids = new Set(); + const parentScope = moduleFactory.parentPath.scope; // @ts-ignore: Same as above: ReferencedIdentifier doesn't exist + + moduleFactory.traverse(IDVisitor, { + ids + }); + + for (const id of ids) { + const {name} = id.node; + let found = false; + let scope = id.scope; + + while (scope !== parentScope) { + if (scope.bindings[name]) { + found = true; + break; + } + + scope = scope.parent; + } + + if (!found) { + const isAllowedIdentifier = + (scope.hasGlobal(name) && WHITELISTED_IDENTIFIERS.has(name)) || + /^mock/i.test(name) || // Allow istanbul's coverage variable to pass. + /^(?:__)?cov/.test(name); + + if (!isAllowedIdentifier) { + throw id.buildCodeFrameError( + 'The module factory of `jest.mock()` is not allowed to ' + + 'reference any out-of-scope variables.\n' + + 'Invalid variable access: ' + + name + + '\n' + + 'Whitelisted objects: ' + + Array.from(WHITELISTED_IDENTIFIERS).join(', ') + + '.\n' + + 'Note: This is a precaution to guard against uninitialized mock ' + + 'variables. If it is ensured that the mock is required lazily, ' + + 'variable names prefixed with `mock` (case insensitive) are permitted.\n', + ReferenceError + ); + } + } + } + + return true; + } + + return false; +}; + +FUNCTIONS.unmock = args => args.length === 1 && args[0].isStringLiteral(); + +FUNCTIONS.deepUnmock = args => args.length === 1 && args[0].isStringLiteral(); + +FUNCTIONS.disableAutomock = FUNCTIONS.enableAutomock = args => + args.length === 0; + +var _default = () => { + const shouldHoistExpression = expr => { + if (!expr.isCallExpression()) { + return false; + } + + const callee = expr.get('callee'); + const expressionArguments = expr.get('arguments'); // TODO: avoid type casts - the types can be arrays (is it possible to ignore that without casting?) + + const object = callee.get('object'); + const property = callee.get('property'); + return ( + property.isIdentifier() && + FUNCTIONS[property.node.name] && + (object.isIdentifier(JEST_GLOBAL) || + (callee.isMemberExpression() && shouldHoistExpression(object))) && + FUNCTIONS[property.node.name](expressionArguments) + ); + }; + + const visitor = { + ExpressionStatement(path) { + if (shouldHoistExpression(path.get('expression'))) { + // @ts-ignore: private, magical property + path.node._blockHoist = Infinity; + } + } + }; + return { + visitor + }; +}; + +exports.default = _default; diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts b/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts new file mode 100644 index 0000000000..20186d225a --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ +import { Visitor } from '@babel/traverse'; +declare const _default: () => { + visitor: Visitor<{}>; +}; +export default _default; +//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/package.json b/packages/common/node_modules/babel-plugin-jest-hoist/package.json new file mode 100644 index 0000000000..3b87278525 --- /dev/null +++ b/packages/common/node_modules/babel-plugin-jest-hoist/package.json @@ -0,0 +1,33 @@ +{ + "name": "babel-plugin-jest-hoist", + "version": "25.2.6", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-plugin-jest-hoist" + }, + "engines": { + "node": ">= 8.3" + }, + "license": "MIT", + "main": "build/index.js", + "types": "build/index.d.ts", + "typesVersions": { + "<3.8": { + "build/*": [ + "build/ts3.4/*" + ] + } + }, + "dependencies": { + "@types/babel__traverse": "^7.0.6" + }, + "devDependencies": { + "@babel/types": "^7.3.3", + "@types/node": "*" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "43207b743df164e9e58bd483dd9167b9084da18b" +} diff --git a/packages/common/node_modules/babel-preset-jest/LICENSE b/packages/common/node_modules/babel-preset-jest/LICENSE new file mode 100644 index 0000000000..b96dcb0480 --- /dev/null +++ b/packages/common/node_modules/babel-preset-jest/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/common/node_modules/babel-preset-jest/README.md b/packages/common/node_modules/babel-preset-jest/README.md new file mode 100644 index 0000000000..b0f085f6ab --- /dev/null +++ b/packages/common/node_modules/babel-preset-jest/README.md @@ -0,0 +1,33 @@ +# babel-preset-jest + +> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). + +## Install + +```sh +$ npm install --save-dev babel-preset-jest +``` + +## Usage + +### Via `babel.config.js` (Recommended) + +```js +module.exports = { + presets: ['jest'], +}; +``` + +### Via CLI + +```sh +$ babel script.js --presets jest +``` + +### Via Node API + +```javascript +require('@babel/core').transform('code', { + presets: ['jest'], +}); +``` diff --git a/packages/common/node_modules/babel-preset-jest/index.js b/packages/common/node_modules/babel-preset-jest/index.js new file mode 100644 index 0000000000..911bbf8d99 --- /dev/null +++ b/packages/common/node_modules/babel-preset-jest/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const jestPreset = { + plugins: [require.resolve('babel-plugin-jest-hoist')], + presets: [require.resolve('babel-preset-current-node-syntax')], +}; + +// @babel/core requires us to export a function +module.exports = () => jestPreset; diff --git a/packages/common/node_modules/babel-preset-jest/package.json b/packages/common/node_modules/babel-preset-jest/package.json new file mode 100644 index 0000000000..73ba5466be --- /dev/null +++ b/packages/common/node_modules/babel-preset-jest/package.json @@ -0,0 +1,25 @@ +{ + "name": "babel-preset-jest", + "version": "25.3.0", + "repository": { + "type": "git", + "url": "https://github.com/facebook/jest.git", + "directory": "packages/babel-preset-jest" + }, + "license": "MIT", + "main": "index.js", + "dependencies": { + "babel-plugin-jest-hoist": "^25.2.6", + "babel-preset-current-node-syntax": "^0.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + }, + "engines": { + "node": ">= 8.3" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" +} diff --git a/packages/common/node_modules/braces/CHANGELOG.md b/packages/common/node_modules/braces/CHANGELOG.md new file mode 100644 index 0000000000..36f798b004 --- /dev/null +++ b/packages/common/node_modules/braces/CHANGELOG.md @@ -0,0 +1,184 @@ +# Release history + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +
+ Guiding Principles + +- Changelogs are for humans, not machines. +- There should be an entry for every single version. +- The same types of changes should be grouped. +- Versions and sections should be linkable. +- The latest version comes first. +- The release date of each versions is displayed. +- Mention whether you follow Semantic Versioning. + +
+ +
+ Types of changes + +Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +
+ +## [3.0.0] - 2018-04-08 + +v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler. + +**Breaking Changes** + +- The undocumented `.makeRe` method was removed + +**Non-breaking changes** + +- Caching was removed + +## [2.3.2] - 2018-04-08 + +- start refactoring +- cover sets +- better range handling + +## [2.3.1] - 2018-02-17 + +- Remove unnecessary escape in Regex. (#14) + +## [2.3.0] - 2017-10-19 + +- minor code reorganization +- optimize regex +- expose `maxLength` option + +## [2.2.1] - 2017-05-30 + +- don't condense when braces contain extglobs + +## [2.2.0] - 2017-05-28 + +- ensure word boundaries are preserved +- fixes edge case where extglob characters precede a brace pattern + +## [2.1.1] - 2017-04-27 + +- use snapdragon-node +- handle edge case +- optimizations, lint + +## [2.0.4] - 2017-04-11 + +- pass opts to compiler +- minor optimization in create method +- re-write parser handlers to remove negation regex + +## [2.0.3] - 2016-12-10 + +- use split-string +- clear queue at the end +- adds sequences example +- add unit tests + +## [2.0.2] - 2016-10-21 + +- fix comma handling in nested extglobs + +## [2.0.1] - 2016-10-20 + +- add comments +- more tests, ensure quotes are stripped + +## [2.0.0] - 2016-10-19 + +- don't expand braces inside character classes +- add quantifier pattern + +## [1.8.5] - 2016-05-21 + +- Refactor (#10) + +## [1.8.4] - 2016-04-20 + +- fixes https://github.com/jonschlinkert/micromatch/issues/66 + +## [1.8.0] - 2015-03-18 + +- adds exponent examples, tests +- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38 + +## [1.6.0] - 2015-01-30 + +- optimizations, `bash` mode: +- improve path escaping + +## [1.5.0] - 2015-01-28 + +- Merge pull request #5 from eush77/lib-files + +## [1.4.0] - 2015-01-24 + +- add extglob tests +- externalize exponent function +- better whitespace handling + +## [1.3.0] - 2015-01-24 + +- make regex patterns explicity + +## [1.1.0] - 2015-01-11 + +- don't create a match group with `makeRe` + +## [1.0.0] - 2014-12-23 + +- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e' +- support empty brace syntax +- better bash coverage +- better support for regex strings + +## [0.1.4] - 2014-11-14 + +- improve recognition of bad args, recognize mismatched argument types +- support escaping +- remove pathname-expansion +- support whitespace in patterns + +## [0.1.0] + +- first commit + +[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2 +[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1 +[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0 +[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1 +[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0 +[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0 +[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0 +[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5 +[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4 +[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0 +[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0 +[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0 +[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0 +[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4 + +[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD +[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog \ No newline at end of file diff --git a/packages/common/node_modules/braces/LICENSE b/packages/common/node_modules/braces/LICENSE new file mode 100644 index 0000000000..d32ab4426a --- /dev/null +++ b/packages/common/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/common/node_modules/braces/README.md b/packages/common/node_modules/braces/README.md new file mode 100644 index 0000000000..cba2f600d2 --- /dev/null +++ b/packages/common/node_modules/braces/README.md @@ -0,0 +1,593 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +* **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +* **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +* **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +* [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +* [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + } +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + } +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs)| N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +# range (expanded) + braces x 29,040 ops/sec ±3.69% (91 runs sampled)) + minimatch x 4,735 ops/sec ±1.28% (90 runs sampled) + +# range (optimized for regex) + braces x 382,878 ops/sec ±0.56% (94 runs sampled) + minimatch x 1,040 ops/sec ±0.44% (93 runs sampled) + +# nested ranges (expanded) + braces x 19,744 ops/sec ±2.27% (92 runs sampled)) + minimatch x 4,579 ops/sec ±0.50% (93 runs sampled) + +# nested ranges (optimized for regex) + braces x 246,019 ops/sec ±2.02% (93 runs sampled) + minimatch x 1,028 ops/sec ±0.39% (94 runs sampled) + +# set (expanded) + braces x 138,641 ops/sec ±0.53% (95 runs sampled) + minimatch x 219,582 ops/sec ±0.98% (94 runs sampled) + +# set (optimized for regex) + braces x 388,408 ops/sec ±0.41% (95 runs sampled) + minimatch x 44,724 ops/sec ±0.91% (89 runs sampled) + +# nested sets (expanded) + braces x 84,966 ops/sec ±0.48% (94 runs sampled) + minimatch x 140,720 ops/sec ±0.37% (95 runs sampled) + +# nested sets (optimized for regex) + braces x 263,340 ops/sec ±2.06% (92 runs sampled) + minimatch x 28,714 ops/sec ±0.40% (90 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/packages/common/node_modules/braces/index.js b/packages/common/node_modules/braces/index.js new file mode 100644 index 0000000000..0eee0f5670 --- /dev/null +++ b/packages/common/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/packages/common/node_modules/braces/lib/compile.js b/packages/common/node_modules/braces/lib/compile.js new file mode 100644 index 0000000000..3e984a4bbc --- /dev/null +++ b/packages/common/node_modules/braces/lib/compile.js @@ -0,0 +1,57 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + let range = fill(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/packages/common/node_modules/braces/lib/constants.js b/packages/common/node_modules/braces/lib/constants.js new file mode 100644 index 0000000000..a937943665 --- /dev/null +++ b/packages/common/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/packages/common/node_modules/braces/lib/expand.js b/packages/common/node_modules/braces/lib/expand.js new file mode 100644 index 0000000000..376c748af2 --- /dev/null +++ b/packages/common/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/packages/common/node_modules/braces/lib/parse.js b/packages/common/node_modules/braces/lib/parse.js new file mode 100644 index 0000000000..145ea26480 --- /dev/null +++ b/packages/common/node_modules/braces/lib/parse.js @@ -0,0 +1,333 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + let memo = {}; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let closed = true; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/packages/common/node_modules/braces/lib/stringify.js b/packages/common/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000000..414b7bcc6b --- /dev/null +++ b/packages/common/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/packages/common/node_modules/braces/lib/utils.js b/packages/common/node_modules/braces/lib/utils.js new file mode 100644 index 0000000000..e3551a6749 --- /dev/null +++ b/packages/common/node_modules/braces/lib/utils.js @@ -0,0 +1,112 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; diff --git a/packages/common/node_modules/braces/package.json b/packages/common/node_modules/braces/package.json new file mode 100644 index 0000000000..3f52e346f6 --- /dev/null +++ b/packages/common/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.2", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.0.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/packages/common/node_modules/chalk/index.d.ts b/packages/common/node_modules/chalk/index.d.ts new file mode 100644 index 0000000000..7e22c45ec9 --- /dev/null +++ b/packages/common/node_modules/chalk/index.d.ts @@ -0,0 +1,411 @@ +declare const enum LevelEnum { + /** + All colors disabled. + */ + None = 0, + + /** + Basic 16 colors support. + */ + Basic = 1, + + /** + ANSI 256 colors support. + */ + Ansi256 = 2, + + /** + Truecolor 16 million colors support. + */ + TrueColor = 3 +} + +/** +Basic foreground colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type ForegroundColor = + | 'black' + | 'red' + | 'green' + | 'yellow' + | 'blue' + | 'magenta' + | 'cyan' + | 'white' + | 'gray' + | 'grey' + | 'blackBright' + | 'redBright' + | 'greenBright' + | 'yellowBright' + | 'blueBright' + | 'magentaBright' + | 'cyanBright' + | 'whiteBright'; + +/** +Basic background colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type BackgroundColor = + | 'bgBlack' + | 'bgRed' + | 'bgGreen' + | 'bgYellow' + | 'bgBlue' + | 'bgMagenta' + | 'bgCyan' + | 'bgWhite' + | 'bgGray' + | 'bgGrey' + | 'bgBlackBright' + | 'bgRedBright' + | 'bgGreenBright' + | 'bgYellowBright' + | 'bgBlueBright' + | 'bgMagentaBright' + | 'bgCyanBright' + | 'bgWhiteBright'; + +/** +Basic colors. + +[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support) +*/ +declare type Color = ForegroundColor | BackgroundColor; + +declare type Modifiers = + | 'reset' + | 'bold' + | 'dim' + | 'italic' + | 'underline' + | 'inverse' + | 'hidden' + | 'strikethrough' + | 'visible'; + +declare namespace chalk { + type Level = LevelEnum; + + interface Options { + /** + Specify the color support for Chalk. + By default, color support is automatically detected based on the environment. + */ + level?: Level; + } + + interface Instance { + /** + Return a new Chalk instance. + */ + new (options?: Options): Chalk; + } + + /** + Detect whether the terminal supports color. + */ + interface ColorSupport { + /** + The color level used by Chalk. + */ + level: Level; + + /** + Return whether Chalk supports basic 16 colors. + */ + hasBasic: boolean; + + /** + Return whether Chalk supports ANSI 256 colors. + */ + has256: boolean; + + /** + Return whether Chalk supports Truecolor 16 million colors. + */ + has16m: boolean; + } + + interface ChalkFunction { + /** + Use a template string. + + @remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341)) + + @example + ``` + import chalk = require('chalk'); + + log(chalk` + CPU: {red ${cpu.totalPercent}%} + RAM: {green ${ram.used / ram.total * 100}%} + DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} + `); + ``` + */ + (text: TemplateStringsArray, ...placeholders: unknown[]): string; + + (...text: unknown[]): string; + } + + interface Chalk extends ChalkFunction { + /** + Return a new Chalk instance. + */ + Instance: Instance; + + /** + The color support for Chalk. + By default, color support is automatically detected based on the environment. + */ + level: Level; + + /** + Use HEX value to set text color. + + @param color - Hexadecimal value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.hex('#DEADED'); + ``` + */ + hex(color: string): Chalk; + + /** + Use keyword color value to set text color. + + @param color - Keyword value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.keyword('orange'); + ``` + */ + keyword(color: string): Chalk; + + /** + Use RGB values to set text color. + */ + rgb(red: number, green: number, blue: number): Chalk; + + /** + Use HSL values to set text color. + */ + hsl(hue: number, saturation: number, lightness: number): Chalk; + + /** + Use HSV values to set text color. + */ + hsv(hue: number, saturation: number, value: number): Chalk; + + /** + Use HWB values to set text color. + */ + hwb(hue: number, whiteness: number, blackness: number): Chalk; + + /** + Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color. + + 30 <= code && code < 38 || 90 <= code && code < 98 + For example, 31 for red, 91 for redBright. + */ + ansi(code: number): Chalk; + + /** + Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + */ + ansi256(index: number): Chalk; + + /** + Use HEX value to set background color. + + @param color - Hexadecimal value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.bgHex('#DEADED'); + ``` + */ + bgHex(color: string): Chalk; + + /** + Use keyword color value to set background color. + + @param color - Keyword value representing the desired color. + + @example + ``` + import chalk = require('chalk'); + + chalk.bgKeyword('orange'); + ``` + */ + bgKeyword(color: string): Chalk; + + /** + Use RGB values to set background color. + */ + bgRgb(red: number, green: number, blue: number): Chalk; + + /** + Use HSL values to set background color. + */ + bgHsl(hue: number, saturation: number, lightness: number): Chalk; + + /** + Use HSV values to set background color. + */ + bgHsv(hue: number, saturation: number, value: number): Chalk; + + /** + Use HWB values to set background color. + */ + bgHwb(hue: number, whiteness: number, blackness: number): Chalk; + + /** + Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color. + + 30 <= code && code < 38 || 90 <= code && code < 98 + For example, 31 for red, 91 for redBright. + Use the foreground code, not the background code (for example, not 41, nor 101). + */ + bgAnsi(code: number): Chalk; + + /** + Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. + */ + bgAnsi256(index: number): Chalk; + + /** + Modifier: Resets the current color chain. + */ + readonly reset: Chalk; + + /** + Modifier: Make text bold. + */ + readonly bold: Chalk; + + /** + Modifier: Emitting only a small amount of light. + */ + readonly dim: Chalk; + + /** + Modifier: Make text italic. (Not widely supported) + */ + readonly italic: Chalk; + + /** + Modifier: Make text underline. (Not widely supported) + */ + readonly underline: Chalk; + + /** + Modifier: Inverse background and foreground colors. + */ + readonly inverse: Chalk; + + /** + Modifier: Prints the text, but makes it invisible. + */ + readonly hidden: Chalk; + + /** + Modifier: Puts a horizontal line through the center of the text. (Not widely supported) + */ + readonly strikethrough: Chalk; + + /** + Modifier: Prints the text only when Chalk has a color support level > 0. + Can be useful for things that are purely cosmetic. + */ + readonly visible: Chalk; + + readonly black: Chalk; + readonly red: Chalk; + readonly green: Chalk; + readonly yellow: Chalk; + readonly blue: Chalk; + readonly magenta: Chalk; + readonly cyan: Chalk; + readonly white: Chalk; + + /* + Alias for `blackBright`. + */ + readonly gray: Chalk; + + /* + Alias for `blackBright`. + */ + readonly grey: Chalk; + + readonly blackBright: Chalk; + readonly redBright: Chalk; + readonly greenBright: Chalk; + readonly yellowBright: Chalk; + readonly blueBright: Chalk; + readonly magentaBright: Chalk; + readonly cyanBright: Chalk; + readonly whiteBright: Chalk; + + readonly bgBlack: Chalk; + readonly bgRed: Chalk; + readonly bgGreen: Chalk; + readonly bgYellow: Chalk; + readonly bgBlue: Chalk; + readonly bgMagenta: Chalk; + readonly bgCyan: Chalk; + readonly bgWhite: Chalk; + + /* + Alias for `bgBlackBright`. + */ + readonly bgGray: Chalk; + + /* + Alias for `bgBlackBright`. + */ + readonly bgGrey: Chalk; + + readonly bgBlackBright: Chalk; + readonly bgRedBright: Chalk; + readonly bgGreenBright: Chalk; + readonly bgYellowBright: Chalk; + readonly bgBlueBright: Chalk; + readonly bgMagentaBright: Chalk; + readonly bgCyanBright: Chalk; + readonly bgWhiteBright: Chalk; + } +} + +/** +Main Chalk object that allows to chain styles together. +Call the last one as a method with a string argument. +Order doesn't matter, and later styles take precedent in case of a conflict. +This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`. +*/ +declare const chalk: chalk.Chalk & chalk.ChalkFunction & { + supportsColor: chalk.ColorSupport | false; + Level: typeof LevelEnum; + Color: Color; + ForegroundColor: ForegroundColor; + BackgroundColor: BackgroundColor; + Modifiers: Modifiers; + stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false}; +}; + +export = chalk; diff --git a/packages/common/node_modules/chalk/license b/packages/common/node_modules/chalk/license new file mode 100644 index 0000000000..e7af2f7710 --- /dev/null +++ b/packages/common/node_modules/chalk/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/common/node_modules/chalk/package.json b/packages/common/node_modules/chalk/package.json new file mode 100644 index 0000000000..047adf92ae --- /dev/null +++ b/packages/common/node_modules/chalk/package.json @@ -0,0 +1,63 @@ +{ + "name": "chalk", + "version": "3.0.0", + "description": "Terminal string styling done right", + "license": "MIT", + "repository": "chalk/chalk", + "main": "source", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && nyc ava && tsd", + "bench": "matcha benchmark.js" + }, + "files": [ + "source", + "index.d.ts" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "coveralls": "^3.0.7", + "execa": "^3.2.0", + "import-fresh": "^3.1.0", + "matcha": "^0.7.0", + "nyc": "^14.1.1", + "resolve-from": "^5.0.0", + "tsd": "^0.7.4", + "xo": "^0.25.3" + }, + "xo": { + "rules": { + "unicorn/prefer-string-slice": "off", + "unicorn/prefer-includes": "off" + } + } +} diff --git a/packages/common/node_modules/chalk/readme.md b/packages/common/node_modules/chalk/readme.md new file mode 100644 index 0000000000..877cb93b78 --- /dev/null +++ b/packages/common/node_modules/chalk/readme.md @@ -0,0 +1,304 @@ +

+
+
+ Chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) [![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) ![TypeScript-ready](https://img.shields.io/npm/types/chalk.svg) + + + + +## Highlights + +- Expressive API +- Highly performant +- Ability to nest styles +- [256/Truecolor color support](#256-and-truecolor-color-support) +- Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused +- Actively maintained +- [Used by ~46,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 1, 2019 + + +## Install + +```console +$ npm install chalk +``` + + +## Usage + +```js +const chalk = require('chalk'); + +console.log(chalk.blue('Hello world!')); +``` + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +const chalk = require('chalk'); +const log = console.log; + +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); + +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); + +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); + +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// Nest styles of the same type even (color, underline, background) +log(chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// ES2015 tagged template literal +log(chalk` +CPU: {red ${cpu.totalPercent}%} +RAM: {green ${ram.used / ram.total * 100}%} +DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.keyword('orange')('Yay for orange colored text!')); +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); +``` + +Easily define your own themes: + +```js +const chalk = require('chalk'); + +const error = chalk.bold.red; +const warning = chalk.keyword('orange'); + +console.log(error('Error!')); +console.log(warning('Warning!')); +``` + +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): + +```js +const name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> 'Hello Sindre' +``` + + +## API + +### chalk.`