From b463aa262d7109a312873d33f53c6009e71ba4b1 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Wed, 22 Apr 2020 16:29:25 +0100 Subject: [PATCH 1/2] update gitignore --- packages/common/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/.gitignore b/packages/common/.gitignore index 57bf2e6855..3cc4dfd11a 100644 --- a/packages/common/.gitignore +++ b/packages/common/.gitignore @@ -40,4 +40,4 @@ flow-typed/npm/* .idea npm-debug.log.* -dist +lib From e28321af2aad82d698471b2ff039eafe498d7694 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Wed, 22 Apr 2020 16:35:20 +0100 Subject: [PATCH 2/2] validation & persistence --- packages/common/lib/common/apiWrapper.js.map | 2 +- packages/common/lib/common/compileCode.js.map | 2 +- packages/common/lib/common/errors.js.map | 2 +- .../common/lib/common/eventAggregator.js.map | 2 +- packages/common/lib/common/events.js.map | 2 +- packages/common/lib/common/index.js.map | 2 +- .../common/lib/common/validationCommon.js.map | 2 +- packages/common/lib/index.js.map | 2 +- packages/common/lib/records/getNewRecord.js | 9 +- .../common/lib/records/getNewRecord.js.map | 2 +- .../lib/records/recordValidationRules.js.map | 2 +- .../common/lib/records/validateRecord.js.map | 2 +- .../common/lib/schema/createActions.js.map | 2 +- packages/common/lib/schema/fields.js.map | 2 +- packages/common/lib/schema/fullSchema.js.map | 2 +- packages/common/lib/schema/models.js | 25 +- packages/common/lib/schema/models.js.map | 2 +- packages/common/lib/schema/types/array.js.map | 2 +- packages/common/lib/schema/types/bool.js.map | 2 +- packages/common/lib/schema/types/datetime.js | 88 +- .../common/lib/schema/types/datetime.js.map | 2 +- packages/common/lib/schema/types/file.js.map | 2 +- packages/common/lib/schema/types/index.js | 117 +- packages/common/lib/schema/types/index.js.map | 2 +- packages/common/lib/schema/types/link.js | 58 +- packages/common/lib/schema/types/link.js.map | 2 +- packages/common/lib/schema/types/number.js | 104 +- .../common/lib/schema/types/number.js.map | 2 +- .../common/lib/schema/types/object.js.map | 2 +- .../common/lib/schema/types/string.js.map | 2 +- .../lib/schema/types/typeHelpers.js.map | 2 +- packages/common/lib/schema/views.js.map | 2 +- .../common/lib/schemaValidation/index.js.map | 2 +- 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 - .../transform/build/ScriptTransformer.d.ts | 39 - .../build/ScriptTransformer.d.ts.map | 1 - .../transform/build/ScriptTransformer.js | 863 ---- .../build/enhanceUnexpectedTokenMessage.d.ts | 8 - .../enhanceUnexpectedTokenMessage.d.ts.map | 1 - .../build/enhanceUnexpectedTokenMessage.js | 56 - .../@jest/transform/build/index.d.ts | 10 - .../@jest/transform/build/index.d.ts.map | 1 - .../@jest/transform/build/index.js | 45 - .../transform/build/shouldInstrument.d.ts | 10 - .../transform/build/shouldInstrument.d.ts.map | 1 - .../@jest/transform/build/shouldInstrument.js | 147 - .../@jest/transform/build/types.d.ts | 46 - .../@jest/transform/build/types.d.ts.map | 1 - .../@jest/transform/build/types.js | 1 - .../node_modules/@jest/transform/package.json | 44 - .../common/node_modules/@jest/types/LICENSE | 21 - .../@jest/types/build/Circus.d.ts | 172 - .../@jest/types/build/Circus.d.ts.map | 1 - .../node_modules/@jest/types/build/Circus.js | 1 - .../@jest/types/build/Config.d.ts | 439 -- .../@jest/types/build/Config.d.ts.map | 1 - .../node_modules/@jest/types/build/Config.js | 1 - .../@jest/types/build/Global.d.ts | 74 - .../@jest/types/build/Global.d.ts.map | 1 - .../node_modules/@jest/types/build/Global.js | 1 - .../node_modules/@jest/types/build/index.d.ts | 11 - .../@jest/types/build/index.d.ts.map | 1 - .../node_modules/@jest/types/build/index.js | 43 - .../node_modules/@jest/types/package.json | 24 - .../common/node_modules/@types/yargs/LICENSE | 21 - .../node_modules/@types/yargs/README.md | 16 - .../node_modules/@types/yargs/index.d.ts | 761 --- .../node_modules/@types/yargs/package.json | 56 - .../node_modules/@types/yargs/yargs.d.ts | 9 - .../common/node_modules/ansi-styles/index.js | 165 - .../common/node_modules/ansi-styles/license | 9 - .../node_modules/ansi-styles/package.json | 56 - .../common/node_modules/ansi-styles/readme.md | 147 - packages/common/node_modules/anymatch/LICENSE | 15 - .../common/node_modules/anymatch/README.md | 99 - .../common/node_modules/anymatch/index.js | 67 - .../common/node_modules/anymatch/package.json | 47 - .../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 | 294 -- .../babel-plugin-istanbul/LICENSE | 27 - .../babel-plugin-istanbul/README.md | 131 - .../babel-plugin-istanbul/lib/index.js | 117 - .../babel-plugin-istanbul/package.json | 72 - .../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 - packages/common/node_modules/braces/LICENSE | 21 - packages/common/node_modules/braces/README.md | 640 --- packages/common/node_modules/braces/index.js | 318 -- .../common/node_modules/braces/lib/utils.js | 343 -- .../common/node_modules/braces/package.json | 108 - packages/common/node_modules/chalk/license | 9 - .../common/node_modules/chalk/package.json | 71 - packages/common/node_modules/chalk/readme.md | 314 -- .../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 | 868 ---- .../node_modules/color-convert/index.js | 78 - .../node_modules/color-convert/package.json | 46 - .../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 | 250 - .../common/node_modules/fill-range/index.js | 208 - .../node_modules/fill-range/package.json | 82 - packages/common/node_modules/fsevents/LICENSE | 22 - .../common/node_modules/fsevents/README.md | 78 - .../common/node_modules/fsevents/fsevents.js | 106 - .../common/node_modules/fsevents/package.json | 36 - .../common/node_modules/has-flag/index.js | 8 - packages/common/node_modules/has-flag/license | 9 - .../common/node_modules/has-flag/package.json | 44 - .../common/node_modules/has-flag/readme.md | 70 - .../common/node_modules/is-number/LICENSE | 21 - .../common/node_modules/is-number/README.md | 115 - .../common/node_modules/is-number/index.js | 22 - .../node_modules/is-number/package.json | 83 - .../istanbul-lib-coverage/CHANGELOG.md | 122 - .../istanbul-lib-coverage/LICENSE | 24 - .../istanbul-lib-coverage/README.md | 29 - .../istanbul-lib-coverage/index.js | 64 - .../istanbul-lib-coverage/lib/coverage-map.js | 127 - .../istanbul-lib-coverage/package.json | 42 - .../istanbul-lib-instrument/CHANGELOG.md | 464 -- .../istanbul-lib-instrument/LICENSE | 24 - .../istanbul-lib-instrument/README.md | 21 - .../istanbul-lib-instrument/dist/constants.js | 22 - .../istanbul-lib-instrument/dist/index.js | 44 - .../dist/instrumenter.js | 204 - .../dist/read-coverage.js | 80 - .../dist/source-coverage.js | 121 - .../istanbul-lib-instrument/dist/visitor.js | 673 --- .../node_modules/.bin/parser | 1 - .../node_modules/.bin/semver | 1 - .../istanbul-lib-instrument/package.json | 43 - .../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 | 249 - .../jest-haste-map/build/ModuleMap.d.ts | 49 - .../jest-haste-map/build/ModuleMap.d.ts.map | 1 - .../jest-haste-map/build/ModuleMap.js | 355 -- .../jest-haste-map/build/blacklist.d.ts | 9 - .../jest-haste-map/build/blacklist.d.ts.map | 1 - .../jest-haste-map/build/blacklist.js | 58 - .../jest-haste-map/build/constants.d.ts | 10 - .../jest-haste-map/build/constants.d.ts.map | 1 - .../jest-haste-map/build/constants.js | 50 - .../jest-haste-map/build/crawlers/node.d.ts | 13 - .../build/crawlers/node.d.ts.map | 1 - .../jest-haste-map/build/crawlers/node.js | 267 - .../build/crawlers/watchman.d.ts | 14 - .../build/crawlers/watchman.d.ts.map | 1 - .../jest-haste-map/build/crawlers/watchman.js | 588 --- .../jest-haste-map/build/getMockName.d.ts | 9 - .../jest-haste-map/build/getMockName.d.ts.map | 1 - .../jest-haste-map/build/getMockName.js | 38 - .../jest-haste-map/build/index.d.ts | 192 - .../jest-haste-map/build/index.d.ts.map | 1 - .../jest-haste-map/build/index.js | 1390 ----- .../build/lib/FSEventsWatcher.d.ts | 46 - .../build/lib/FSEventsWatcher.d.ts.map | 1 - .../build/lib/FSEventsWatcher.js | 248 - .../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 | 43 - .../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 | 37 - .../jest-haste-map/build/types.d.ts | 98 - .../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 | 230 - .../jest-haste-map/node_modules/.bin/sane | 1 - .../node_modules/jest-haste-map/package.json | 44 - .../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 | 49 - .../node_modules/jest-regex-util/package.json | 19 - .../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 | 206 - .../node_modules/jest-serializer/package.json | 19 - .../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 | 10 - .../jest-util/build/clearLine.d.ts.map | 1 - .../node_modules/jest-util/build/clearLine.js | 20 - .../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 | 8 - .../build/createProcessObject.d.ts.map | 1 - .../jest-util/build/createProcessObject.js | 121 - .../jest-util/build/deepCyclicCopy.d.ts | 12 - .../jest-util/build/deepCyclicCopy.d.ts.map | 1 - .../jest-util/build/deepCyclicCopy.js | 99 - .../node_modules/jest-util/build/index.d.ts | 48 - .../jest-util/build/index.d.ts.map | 1 - .../node_modules/jest-util/build/index.js | 147 - .../jest-util/build/installCommonGlobals.d.ts | 10 - .../build/installCommonGlobals.d.ts.map | 1 - .../jest-util/build/installCommonGlobals.js | 85 - .../build/interopRequireDefault.d.ts | 8 - .../build/interopRequireDefault.d.ts.map | 1 - .../jest-util/build/interopRequireDefault.js | 21 - .../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 | 19 - .../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/node_modules/.bin/is-ci | 1 - .../node_modules/jest-util/package.json | 39 - .../common/node_modules/jest-worker/LICENSE | 21 - .../common/node_modules/jest-worker/README.md | 215 - .../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 | 134 - .../node_modules/jest-worker/build/index.d.ts | 46 - .../jest-worker/build/index.d.ts.map | 1 - .../node_modules/jest-worker/build/index.js | 184 - .../node_modules/jest-worker/build/types.d.ts | 98 - .../jest-worker/build/types.d.ts.map | 1 - .../node_modules/jest-worker/build/types.js | 43 - .../build/workers/ChildProcessWorker.d.ts | 47 - .../build/workers/ChildProcessWorker.d.ts.map | 1 - .../build/workers/ChildProcessWorker.js | 310 -- .../build/workers/NodeThreadsWorker.d.ts | 29 - .../build/workers/NodeThreadsWorker.d.ts.map | 1 - .../build/workers/NodeThreadsWorker.js | 289 -- .../build/workers/processChild.d.ts | 8 - .../build/workers/processChild.d.ts.map | 1 - .../jest-worker/build/workers/processChild.js | 166 - .../build/workers/threadChild.d.ts | 8 - .../build/workers/threadChild.d.ts.map | 1 - .../jest-worker/build/workers/threadChild.js | 176 - .../node_modules/jest-worker/package.json | 29 - .../common/node_modules/make-dir/index.d.ts | 39 - .../common/node_modules/make-dir/index.js | 139 - 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 | 123 - .../node_modules/micromatch/CHANGELOG.md | 37 - .../common/node_modules/micromatch/LICENSE | 21 - .../common/node_modules/micromatch/README.md | 1150 ----- .../common/node_modules/micromatch/index.js | 877 ---- .../node_modules/micromatch/package.json | 147 - .../readable-stream/CONTRIBUTING.md | 38 - .../readable-stream/GOVERNANCE.md | 136 - .../node_modules/readable-stream/LICENSE | 47 - .../node_modules/readable-stream/README.md | 111 - .../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 | 1087 ---- .../readable-stream/lib/_stream_transform.js | 201 - .../readable-stream/lib/_stream_writable.js | 683 --- .../lib/internal/streams/async_iterator.js | 207 - .../lib/internal/streams/buffer_list.js | 189 - .../lib/internal/streams/destroy.js | 85 - .../lib/internal/streams/end-of-stream.js | 104 - .../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 | 66 - .../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 | 58 - .../common/node_modules/semver/CHANGELOG.md | 39 - packages/common/node_modules/semver/LICENSE | 15 - packages/common/node_modules/semver/README.md | 412 -- .../common/node_modules/semver/package.json | 28 - packages/common/node_modules/semver/range.bnf | 16 - packages/common/node_modules/semver/semver.js | 1483 ------ packages/common/node_modules/slash/index.js | 11 - packages/common/node_modules/slash/license | 9 - .../common/node_modules/slash/package.json | 34 - packages/common/node_modules/slash/readme.md | 44 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 138 - .../node_modules/supports-color/license | 9 - .../node_modules/supports-color/package.json | 53 - .../node_modules/supports-color/readme.md | 85 - .../node_modules/test-exclude/CHANGELOG.md | 292 -- .../node_modules/test-exclude/LICENSE.txt | 14 - .../node_modules/test-exclude/README.md | 56 - .../common/node_modules/test-exclude/index.js | 186 - .../node_modules/test-exclude/package.json | 39 - .../node_modules/to-regex-range/LICENSE | 21 - .../node_modules/to-regex-range/README.md | 281 - .../node_modules/to-regex-range/index.js | 294 -- .../node_modules/to-regex-range/package.json | 86 - .../common/node_modules/which/CHANGELOG.md | 152 - packages/common/node_modules/which/LICENSE | 15 - packages/common/node_modules/which/README.md | 51 - .../common/node_modules/which/package.json | 30 - packages/common/node_modules/which/which.js | 135 - .../write-file-atomic/CHANGELOG.md | 15 - .../node_modules/write-file-atomic/LICENSE | 6 - .../node_modules/write-file-atomic/README.md | 56 - .../node_modules/write-file-atomic/index.js | 222 - .../write-file-atomic/package.json | 38 - packages/common/src/records/getNewRecord.js | 7 +- packages/common/src/schema/models.js | 15 +- packages/common/src/schema/types/array.js | 68 - packages/common/src/schema/types/bool.js | 52 - packages/common/src/schema/types/boolean.js | 12 + packages/common/src/schema/types/datetime.js | 93 +- packages/common/src/schema/types/file.js | 62 - packages/common/src/schema/types/index.js | 123 +- packages/common/src/schema/types/link.js | 61 +- packages/common/src/schema/types/number.js | 107 +- packages/common/src/schema/types/object.js | 59 - packages/common/src/schema/types/select.js | 21 + packages/common/src/schema/types/string.js | 74 - packages/common/src/schema/types/text.js | 24 + .../common/src/schema/types/typeHelpers.js | 90 - packages/common/src/testUtils/testSchema.js | 38 + .../common/test/templateApi.types.spec.js | 285 - packages/common/test/testSchema.js | 38 - packages/common/test/types.spec.js | 240 + .../server/middleware/controllers/record.js | 82 +- packages/server/middleware/routers.js | 2 +- .../server/middleware/routes/neo/record.js | 14 +- .../routes/neo/tests/couchTestUtils.js | 23 +- .../routes/neo/tests/record.spec.js | 124 + 1317 files changed, 761 insertions(+), 71047 deletions(-) delete mode 120000 packages/common/node_modules/.bin/babel delete mode 120000 packages/common/node_modules/.bin/babel-external-helpers delete mode 120000 packages/common/node_modules/.bin/cross-env delete mode 120000 packages/common/node_modules/.bin/cross-env-shell delete mode 120000 packages/common/node_modules/.bin/jest delete mode 120000 packages/common/node_modules/.bin/rimraf delete mode 100644 packages/common/node_modules/@babel/template/LICENSE delete mode 100644 packages/common/node_modules/@babel/template/README.md delete mode 100644 packages/common/node_modules/@babel/template/lib/builder.js delete mode 100644 packages/common/node_modules/@babel/template/lib/formatters.js delete mode 100644 packages/common/node_modules/@babel/template/lib/index.js delete mode 100644 packages/common/node_modules/@babel/template/lib/literal.js delete mode 100644 packages/common/node_modules/@babel/template/lib/options.js delete mode 100644 packages/common/node_modules/@babel/template/lib/parse.js delete mode 100644 packages/common/node_modules/@babel/template/lib/populate.js delete mode 100644 packages/common/node_modules/@babel/template/lib/string.js delete mode 120000 packages/common/node_modules/@babel/template/node_modules/.bin/parser delete mode 100644 packages/common/node_modules/@babel/template/package.json delete mode 100644 packages/common/node_modules/@babel/types/LICENSE delete mode 100644 packages/common/node_modules/@babel/types/README.md delete mode 100644 packages/common/node_modules/@babel/types/lib/asserts/assertNode.js delete mode 100644 packages/common/node_modules/@babel/types/lib/asserts/generated/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/builders/builder.js delete mode 100644 packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js delete mode 100644 packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js delete mode 100644 packages/common/node_modules/@babel/types/lib/builders/generated/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js delete mode 100644 packages/common/node_modules/@babel/types/lib/clone/clone.js delete mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js delete mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js delete mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneNode.js delete mode 100644 packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/addComment.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/addComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/comments/removeComments.js delete mode 100644 packages/common/node_modules/@babel/types/lib/constants/generated/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/constants/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toBlock.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toExpression.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/toStatement.js delete mode 100644 packages/common/node_modules/@babel/types/lib/converters/valueToNode.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/core.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/es2015.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/experimental.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/flow.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/jsx.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/misc.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/placeholders.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/typescript.js delete mode 100644 packages/common/node_modules/@babel/types/lib/definitions/utils.js delete mode 100644 packages/common/node_modules/@babel/types/lib/index.d.ts delete mode 100644 packages/common/node_modules/@babel/types/lib/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/index.js.flow delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/inherits.js delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js delete mode 100644 packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js delete mode 100644 packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js delete mode 100644 packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js delete mode 100644 packages/common/node_modules/@babel/types/lib/traverse/traverse.js delete mode 100644 packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js delete mode 100644 packages/common/node_modules/@babel/types/lib/utils/inherit.js delete mode 100644 packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js delete mode 100644 packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/generated/index.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/is.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isBinding.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isImmutable.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isLet.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isNode.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isReferenced.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isScope.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isType.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/isVar.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js delete mode 100644 packages/common/node_modules/@babel/types/lib/validators/validate.js delete mode 100644 packages/common/node_modules/@babel/types/package.json delete mode 100644 packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/docs.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/flow.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/generators/typescript.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js delete mode 100644 packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js delete mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts delete mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map delete mode 100644 packages/common/node_modules/@jest/transform/build/ScriptTransformer.js delete mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts delete mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map delete mode 100644 packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js delete mode 100644 packages/common/node_modules/@jest/transform/build/index.d.ts delete mode 100644 packages/common/node_modules/@jest/transform/build/index.d.ts.map delete mode 100644 packages/common/node_modules/@jest/transform/build/index.js delete mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts delete mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map delete mode 100644 packages/common/node_modules/@jest/transform/build/shouldInstrument.js delete mode 100644 packages/common/node_modules/@jest/transform/build/types.d.ts delete mode 100644 packages/common/node_modules/@jest/transform/build/types.d.ts.map delete mode 100644 packages/common/node_modules/@jest/transform/build/types.js delete mode 100644 packages/common/node_modules/@jest/transform/package.json delete mode 100644 packages/common/node_modules/@jest/types/LICENSE delete mode 100644 packages/common/node_modules/@jest/types/build/Circus.d.ts delete mode 100644 packages/common/node_modules/@jest/types/build/Circus.d.ts.map delete mode 100644 packages/common/node_modules/@jest/types/build/Circus.js delete mode 100644 packages/common/node_modules/@jest/types/build/Config.d.ts delete mode 100644 packages/common/node_modules/@jest/types/build/Config.d.ts.map delete mode 100644 packages/common/node_modules/@jest/types/build/Config.js delete mode 100644 packages/common/node_modules/@jest/types/build/Global.d.ts delete mode 100644 packages/common/node_modules/@jest/types/build/Global.d.ts.map delete mode 100644 packages/common/node_modules/@jest/types/build/Global.js delete mode 100644 packages/common/node_modules/@jest/types/build/index.d.ts delete mode 100644 packages/common/node_modules/@jest/types/build/index.d.ts.map delete mode 100644 packages/common/node_modules/@jest/types/build/index.js delete mode 100644 packages/common/node_modules/@jest/types/package.json delete mode 100644 packages/common/node_modules/@types/yargs/LICENSE delete mode 100644 packages/common/node_modules/@types/yargs/README.md delete mode 100644 packages/common/node_modules/@types/yargs/index.d.ts delete mode 100644 packages/common/node_modules/@types/yargs/package.json delete mode 100644 packages/common/node_modules/@types/yargs/yargs.d.ts delete mode 100644 packages/common/node_modules/ansi-styles/index.js delete mode 100644 packages/common/node_modules/ansi-styles/license delete mode 100644 packages/common/node_modules/ansi-styles/package.json delete mode 100644 packages/common/node_modules/ansi-styles/readme.md delete mode 100644 packages/common/node_modules/anymatch/LICENSE delete mode 100644 packages/common/node_modules/anymatch/README.md delete mode 100644 packages/common/node_modules/anymatch/index.js delete mode 100644 packages/common/node_modules/anymatch/package.json delete mode 100644 packages/common/node_modules/babel-jest/LICENSE delete mode 100644 packages/common/node_modules/babel-jest/README.md delete mode 100644 packages/common/node_modules/babel-jest/build/index.d.ts delete mode 100644 packages/common/node_modules/babel-jest/build/index.d.ts.map delete mode 100644 packages/common/node_modules/babel-jest/build/index.js delete mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts delete mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map delete mode 100644 packages/common/node_modules/babel-jest/build/loadBabelConfig.js delete mode 100644 packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts delete mode 100644 packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts delete mode 100644 packages/common/node_modules/babel-jest/package.json delete mode 100644 packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md delete mode 100644 packages/common/node_modules/babel-plugin-istanbul/LICENSE delete mode 100644 packages/common/node_modules/babel-plugin-istanbul/README.md delete mode 100644 packages/common/node_modules/babel-plugin-istanbul/lib/index.js delete mode 100644 packages/common/node_modules/babel-plugin-istanbul/package.json delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/LICENSE delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/README.md delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/index.js delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts delete mode 100644 packages/common/node_modules/babel-plugin-jest-hoist/package.json delete mode 100644 packages/common/node_modules/babel-preset-jest/LICENSE delete mode 100644 packages/common/node_modules/babel-preset-jest/README.md delete mode 100644 packages/common/node_modules/babel-preset-jest/index.js delete mode 100644 packages/common/node_modules/babel-preset-jest/package.json delete mode 100644 packages/common/node_modules/braces/LICENSE delete mode 100644 packages/common/node_modules/braces/README.md delete mode 100644 packages/common/node_modules/braces/index.js delete mode 100644 packages/common/node_modules/braces/lib/utils.js delete mode 100644 packages/common/node_modules/braces/package.json delete mode 100644 packages/common/node_modules/chalk/license delete mode 100644 packages/common/node_modules/chalk/package.json delete mode 100644 packages/common/node_modules/chalk/readme.md delete mode 100644 packages/common/node_modules/color-convert/CHANGELOG.md delete mode 100644 packages/common/node_modules/color-convert/LICENSE delete mode 100644 packages/common/node_modules/color-convert/README.md delete mode 100644 packages/common/node_modules/color-convert/conversions.js delete mode 100644 packages/common/node_modules/color-convert/index.js delete mode 100644 packages/common/node_modules/color-convert/package.json delete mode 100644 packages/common/node_modules/color-convert/route.js delete mode 100644 packages/common/node_modules/date-fns/CHANGELOG.md delete mode 100644 packages/common/node_modules/date-fns/LICENSE.md delete mode 100644 packages/common/node_modules/date-fns/README.md delete mode 100644 packages/common/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/_lib/package.json delete mode 100644 packages/common/node_modules/date-fns/add_days/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_days/index.js delete mode 100644 packages/common/node_modules/date-fns/add_days/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_days/package.json delete mode 100644 packages/common/node_modules/date-fns/add_hours/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_hours/index.js delete mode 100644 packages/common/node_modules/date-fns/add_hours/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_hours/package.json delete mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.js delete mode 100644 packages/common/node_modules/date-fns/add_iso_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_iso_years/package.json delete mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/add_milliseconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_milliseconds/package.json delete mode 100644 packages/common/node_modules/date-fns/add_minutes/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_minutes/index.js delete mode 100644 packages/common/node_modules/date-fns/add_minutes/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_minutes/package.json delete mode 100644 packages/common/node_modules/date-fns/add_months/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_months/index.js delete mode 100644 packages/common/node_modules/date-fns/add_months/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_months/package.json delete mode 100644 packages/common/node_modules/date-fns/add_quarters/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_quarters/index.js delete mode 100644 packages/common/node_modules/date-fns/add_quarters/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_quarters/package.json delete mode 100644 packages/common/node_modules/date-fns/add_seconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_seconds/index.js delete mode 100644 packages/common/node_modules/date-fns/add_seconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_seconds/package.json delete mode 100644 packages/common/node_modules/date-fns/add_weeks/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_weeks/index.js delete mode 100644 packages/common/node_modules/date-fns/add_weeks/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_weeks/package.json delete mode 100644 packages/common/node_modules/date-fns/add_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/add_years/index.js delete mode 100644 packages/common/node_modules/date-fns/add_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/add_years/package.json delete mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.js delete mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/are_ranges_overlapping/package.json delete mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.js delete mode 100644 packages/common/node_modules/date-fns/closest_index_to/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/closest_index_to/package.json delete mode 100644 packages/common/node_modules/date-fns/closest_to/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/closest_to/index.js delete mode 100644 packages/common/node_modules/date-fns/closest_to/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/closest_to/package.json delete mode 100644 packages/common/node_modules/date-fns/compare_asc/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/compare_asc/index.js delete mode 100644 packages/common/node_modules/date-fns/compare_asc/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/compare_asc/package.json delete mode 100644 packages/common/node_modules/date-fns/compare_desc/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/compare_desc/index.js delete mode 100644 packages/common/node_modules/date-fns/compare_desc/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/compare_desc/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_days/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_weeks/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_iso_years/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_months/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_quarters/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_weeks/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_calendar_years/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_days/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_days/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_hours/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_hours/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_iso_years/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_milliseconds/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_minutes/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_months/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_months/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_quarters/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_seconds/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_weeks/package.json delete mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.js delete mode 100644 packages/common/node_modules/date-fns/difference_in_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/difference_in_years/package.json delete mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.js delete mode 100644 packages/common/node_modules/date-fns/distance_in_words/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/distance_in_words/package.json delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.js delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_strict/package.json delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.js delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/distance_in_words_to_now/package.json delete mode 100644 packages/common/node_modules/date-fns/docs.json delete mode 100644 packages/common/node_modules/date-fns/each_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/each_day/index.js delete mode 100644 packages/common/node_modules/date-fns/each_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/each_day/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_day/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_day/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_hour/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_hour/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_minute/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_minute/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_month/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_month/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_second/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_second/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_second/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_second/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_today/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_today/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_today/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_today/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_tomorrow/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_week/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_week/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_year/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_year/package.json delete mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.js delete mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/end_of_yesterday/package.json delete mode 100644 packages/common/node_modules/date-fns/format/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/format/index.js delete mode 100644 packages/common/node_modules/date-fns/format/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/format/package.json delete mode 100644 packages/common/node_modules/date-fns/get_date/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_date/index.js delete mode 100644 packages/common/node_modules/date-fns/get_date/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_date/package.json delete mode 100644 packages/common/node_modules/date-fns/get_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_day/index.js delete mode 100644 packages/common/node_modules/date-fns/get_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_day/package.json delete mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.js delete mode 100644 packages/common/node_modules/date-fns/get_day_of_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_day_of_year/package.json delete mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.js delete mode 100644 packages/common/node_modules/date-fns/get_days_in_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_days_in_month/package.json delete mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.js delete mode 100644 packages/common/node_modules/date-fns/get_days_in_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_days_in_year/package.json delete mode 100644 packages/common/node_modules/date-fns/get_hours/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_hours/index.js delete mode 100644 packages/common/node_modules/date-fns/get_hours/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_hours/package.json delete mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.js delete mode 100644 packages/common/node_modules/date-fns/get_iso_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_iso_day/package.json delete mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/get_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.js delete mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_iso_weeks_in_year/package.json delete mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/get_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/get_milliseconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_milliseconds/package.json delete mode 100644 packages/common/node_modules/date-fns/get_minutes/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_minutes/index.js delete mode 100644 packages/common/node_modules/date-fns/get_minutes/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_minutes/package.json delete mode 100644 packages/common/node_modules/date-fns/get_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_month/index.js delete mode 100644 packages/common/node_modules/date-fns/get_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_month/package.json delete mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.js delete mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_overlapping_days_in_ranges/package.json delete mode 100644 packages/common/node_modules/date-fns/get_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/get_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/get_seconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_seconds/index.js delete mode 100644 packages/common/node_modules/date-fns/get_seconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_seconds/package.json delete mode 100644 packages/common/node_modules/date-fns/get_time/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_time/index.js delete mode 100644 packages/common/node_modules/date-fns/get_time/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_time/package.json delete mode 100644 packages/common/node_modules/date-fns/get_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/get_year/index.js delete mode 100644 packages/common/node_modules/date-fns/get_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/get_year/package.json delete mode 100644 packages/common/node_modules/date-fns/index.js delete mode 100644 packages/common/node_modules/date-fns/is_after/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_after/index.js delete mode 100644 packages/common/node_modules/date-fns/is_after/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_after/package.json delete mode 100644 packages/common/node_modules/date-fns/is_before/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_before/index.js delete mode 100644 packages/common/node_modules/date-fns/is_before/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_before/package.json delete mode 100644 packages/common/node_modules/date-fns/is_date/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_date/index.js delete mode 100644 packages/common/node_modules/date-fns/is_date/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_date/package.json delete mode 100644 packages/common/node_modules/date-fns/is_equal/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_equal/index.js delete mode 100644 packages/common/node_modules/date-fns/is_equal/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_equal/package.json delete mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.js delete mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_first_day_of_month/package.json delete mode 100644 packages/common/node_modules/date-fns/is_friday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_friday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_friday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_friday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_future/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_future/index.js delete mode 100644 packages/common/node_modules/date-fns/is_future/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_future/package.json delete mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.js delete mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_last_day_of_month/package.json delete mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.js delete mode 100644 packages/common/node_modules/date-fns/is_leap_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_leap_year/package.json delete mode 100644 packages/common/node_modules/date-fns/is_monday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_monday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_monday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_monday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_past/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_past/index.js delete mode 100644 packages/common/node_modules/date-fns/is_past/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_past/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_day/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_day/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_hour/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_hour/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_minute/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_minute/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_month/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_month/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_second/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_second/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_second/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_second/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_week/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_week/package.json delete mode 100644 packages/common/node_modules/date-fns/is_same_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_same_year/index.js delete mode 100644 packages/common/node_modules/date-fns/is_same_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_same_year/package.json delete mode 100644 packages/common/node_modules/date-fns/is_saturday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_saturday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_saturday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_saturday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_sunday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_sunday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_sunday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_sunday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_hour/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_hour/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_minute/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_minute/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_month/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_month/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_second/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_second/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_second/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_second/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_week/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_week/package.json delete mode 100644 packages/common/node_modules/date-fns/is_this_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_this_year/index.js delete mode 100644 packages/common/node_modules/date-fns/is_this_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_this_year/package.json delete mode 100644 packages/common/node_modules/date-fns/is_thursday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_thursday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_thursday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_thursday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_today/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_today/index.js delete mode 100644 packages/common/node_modules/date-fns/is_today/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_today/package.json delete mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.js delete mode 100644 packages/common/node_modules/date-fns/is_tomorrow/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_tomorrow/package.json delete mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_tuesday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_tuesday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_valid/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_valid/index.js delete mode 100644 packages/common/node_modules/date-fns/is_valid/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_valid/package.json delete mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_wednesday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_wednesday/package.json delete mode 100644 packages/common/node_modules/date-fns/is_weekend/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_weekend/index.js delete mode 100644 packages/common/node_modules/date-fns/is_weekend/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_weekend/package.json delete mode 100644 packages/common/node_modules/date-fns/is_within_range/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_within_range/index.js delete mode 100644 packages/common/node_modules/date-fns/is_within_range/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_within_range/package.json delete mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.js delete mode 100644 packages/common/node_modules/date-fns/is_yesterday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/is_yesterday/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_month/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_week/package.json delete mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.js delete mode 100644 packages/common/node_modules/date-fns/last_day_of_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/last_day_of_year/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/_lib/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ar/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ar/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ar/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ar/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ar/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/be/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/be/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/be/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/be/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/be/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/bg/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/bg/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/bg/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/bg/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/bg/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ca/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ca/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ca/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ca/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ca/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/cs/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/cs/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/cs/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/cs/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/cs/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/da/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/da/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/da/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/da/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/da/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/de/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/de/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/de/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/de/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/de/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/el/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/el/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/el/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/el/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/el/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/en/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/en/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/en/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/en/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/eo/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/eo/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/eo/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/eo/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/eo/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/es/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/es/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/es/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/es/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/es/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/fi/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fi/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fi/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/fi/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fi/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/fil/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fil/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fil/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/fil/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fil/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/fr/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fr/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fr/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/fr/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/fr/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/hr/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hr/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hr/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/hr/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hr/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/hu/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hu/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hu/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/hu/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/hu/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/id/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/id/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/id/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/id/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/id/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/is/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/is/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/is/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/is/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/is/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/it/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/it/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/it/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/it/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/it/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ja/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ja/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ja/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ja/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ja/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ko/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ko/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ko/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ko/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ko/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/mk/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/mk/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/mk/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/mk/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/mk/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/nb/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nb/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nb/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/nb/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nb/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/nl/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nl/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nl/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/nl/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/nl/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/pl/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pl/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pl/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/pl/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pl/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/pt/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pt/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pt/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/pt/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/pt/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ro/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ro/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ro/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ro/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ro/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/ru/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ru/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ru/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/ru/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/ru/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/sk/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sk/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sk/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/sk/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sk/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/sl/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sl/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sl/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/sl/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sl/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/sr/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sr/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sr/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/sr/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sr/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/sv/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sv/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sv/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/sv/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/sv/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/th/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/th/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/th/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/th/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/th/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/tr/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/tr/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/tr/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/tr/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/tr/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_cn/package.json delete mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/build_distance_in_words_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/build_format_locale/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/index.js delete mode 100644 packages/common/node_modules/date-fns/locale/zh_tw/package.json delete mode 100644 packages/common/node_modules/date-fns/max/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/max/index.js delete mode 100644 packages/common/node_modules/date-fns/max/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/max/package.json delete mode 100644 packages/common/node_modules/date-fns/min/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/min/index.js delete mode 100644 packages/common/node_modules/date-fns/min/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/min/package.json delete mode 100644 packages/common/node_modules/date-fns/package.json delete mode 100644 packages/common/node_modules/date-fns/parse/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/parse/index.js delete mode 100644 packages/common/node_modules/date-fns/parse/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/parse/package.json delete mode 100644 packages/common/node_modules/date-fns/set_date/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_date/index.js delete mode 100644 packages/common/node_modules/date-fns/set_date/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_date/package.json delete mode 100644 packages/common/node_modules/date-fns/set_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_day/index.js delete mode 100644 packages/common/node_modules/date-fns/set_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_day/package.json delete mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.js delete mode 100644 packages/common/node_modules/date-fns/set_day_of_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_day_of_year/package.json delete mode 100644 packages/common/node_modules/date-fns/set_hours/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_hours/index.js delete mode 100644 packages/common/node_modules/date-fns/set_hours/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_hours/package.json delete mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.js delete mode 100644 packages/common/node_modules/date-fns/set_iso_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_iso_day/package.json delete mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/set_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/set_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/set_milliseconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_milliseconds/package.json delete mode 100644 packages/common/node_modules/date-fns/set_minutes/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_minutes/index.js delete mode 100644 packages/common/node_modules/date-fns/set_minutes/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_minutes/package.json delete mode 100644 packages/common/node_modules/date-fns/set_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_month/index.js delete mode 100644 packages/common/node_modules/date-fns/set_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_month/package.json delete mode 100644 packages/common/node_modules/date-fns/set_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/set_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/set_seconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_seconds/index.js delete mode 100644 packages/common/node_modules/date-fns/set_seconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_seconds/package.json delete mode 100644 packages/common/node_modules/date-fns/set_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/set_year/index.js delete mode 100644 packages/common/node_modules/date-fns/set_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/set_year/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_day/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_day/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_day/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_day/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_hour/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_hour/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_week/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_iso_year/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_minute/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_minute/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_month/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_month/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_month/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_month/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_quarter/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_quarter/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_second/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_second/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_second/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_second/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_today/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_today/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_today/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_today/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_tomorrow/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_week/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_week/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_week/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_week/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_year/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_year/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_year/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_year/package.json delete mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.js delete mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/start_of_yesterday/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_days/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_days/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_days/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_days/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_hours/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_hours/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_hours/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_hours/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_iso_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_iso_years/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_milliseconds/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_minutes/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_minutes/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_months/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_months/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_months/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_months/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_quarters/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_quarters/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_seconds/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_seconds/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_weeks/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_weeks/package.json delete mode 100644 packages/common/node_modules/date-fns/sub_years/index.d.ts delete mode 100644 packages/common/node_modules/date-fns/sub_years/index.js delete mode 100644 packages/common/node_modules/date-fns/sub_years/index.js.flow delete mode 100644 packages/common/node_modules/date-fns/sub_years/package.json delete mode 100644 packages/common/node_modules/date-fns/typings.d.ts delete mode 100644 packages/common/node_modules/fill-range/LICENSE delete mode 100644 packages/common/node_modules/fill-range/README.md delete mode 100644 packages/common/node_modules/fill-range/index.js delete mode 100644 packages/common/node_modules/fill-range/package.json delete mode 100644 packages/common/node_modules/fsevents/LICENSE delete mode 100644 packages/common/node_modules/fsevents/README.md delete mode 100644 packages/common/node_modules/fsevents/fsevents.js delete mode 100644 packages/common/node_modules/fsevents/package.json delete mode 100644 packages/common/node_modules/has-flag/index.js delete mode 100644 packages/common/node_modules/has-flag/license delete mode 100644 packages/common/node_modules/has-flag/package.json delete mode 100644 packages/common/node_modules/has-flag/readme.md delete mode 100644 packages/common/node_modules/is-number/LICENSE delete mode 100644 packages/common/node_modules/is-number/README.md delete mode 100644 packages/common/node_modules/is-number/index.js delete mode 100644 packages/common/node_modules/is-number/package.json delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/CHANGELOG.md delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/LICENSE delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/README.md delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/index.js delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/lib/coverage-map.js delete mode 100644 packages/common/node_modules/istanbul-lib-coverage/package.json delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/CHANGELOG.md delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/LICENSE delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/README.md delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/constants.js delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/index.js delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/instrumenter.js delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/read-coverage.js delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/source-coverage.js delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/dist/visitor.js delete mode 120000 packages/common/node_modules/istanbul-lib-instrument/node_modules/.bin/parser delete mode 120000 packages/common/node_modules/istanbul-lib-instrument/node_modules/.bin/semver delete mode 100644 packages/common/node_modules/istanbul-lib-instrument/package.json delete mode 100644 packages/common/node_modules/jest-haste-map/LICENSE delete mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/HasteFS.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/ModuleMap.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/blacklist.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/constants.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/constants.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/constants.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/node.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/crawlers/watchman.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/getMockName.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/index.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/index.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/index.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/FSEventsWatcher.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/dependencyExtractor.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/fast_path.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/getPlatformExtension.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/isRegExpSupported.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/lib/normalizePathSep.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/types.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/types.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/types.js delete mode 100644 packages/common/node_modules/jest-haste-map/build/worker.d.ts delete mode 100644 packages/common/node_modules/jest-haste-map/build/worker.d.ts.map delete mode 100644 packages/common/node_modules/jest-haste-map/build/worker.js delete mode 120000 packages/common/node_modules/jest-haste-map/node_modules/.bin/sane delete mode 100644 packages/common/node_modules/jest-haste-map/package.json delete mode 100644 packages/common/node_modules/jest-regex-util/LICENSE delete mode 100644 packages/common/node_modules/jest-regex-util/build/index.d.ts delete mode 100644 packages/common/node_modules/jest-regex-util/build/index.d.ts.map delete mode 100644 packages/common/node_modules/jest-regex-util/build/index.js delete mode 100644 packages/common/node_modules/jest-regex-util/package.json delete mode 100644 packages/common/node_modules/jest-serializer/LICENSE delete mode 100644 packages/common/node_modules/jest-serializer/README.md delete mode 100644 packages/common/node_modules/jest-serializer/build/index.d.ts delete mode 100644 packages/common/node_modules/jest-serializer/build/index.d.ts.map delete mode 100644 packages/common/node_modules/jest-serializer/build/index.js delete mode 100644 packages/common/node_modules/jest-serializer/package.json delete mode 100644 packages/common/node_modules/jest-serializer/v8.d.ts delete mode 100644 packages/common/node_modules/jest-util/LICENSE delete mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/ErrorWithStack.js delete mode 100644 packages/common/node_modules/jest-util/build/clearLine.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/clearLine.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/clearLine.js delete mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/convertDescriptorToString.js delete mode 100644 packages/common/node_modules/jest-util/build/createDirectory.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/createDirectory.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/createDirectory.js delete mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/createProcessObject.js delete mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/deepCyclicCopy.js delete mode 100644 packages/common/node_modules/jest-util/build/index.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/index.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/index.js delete mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/installCommonGlobals.js delete mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/interopRequireDefault.js delete mode 100644 packages/common/node_modules/jest-util/build/isInteractive.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/isInteractive.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/isInteractive.js delete mode 100644 packages/common/node_modules/jest-util/build/isPromise.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/isPromise.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/isPromise.js delete mode 100644 packages/common/node_modules/jest-util/build/pluralize.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/pluralize.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/pluralize.js delete mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/preRunMessage.js delete mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/replacePathSepForGlob.js delete mode 100644 packages/common/node_modules/jest-util/build/setGlobal.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/setGlobal.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/setGlobal.js delete mode 100644 packages/common/node_modules/jest-util/build/specialChars.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/specialChars.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/specialChars.js delete mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.d.ts delete mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map delete mode 100644 packages/common/node_modules/jest-util/build/testPathPatternToRegExp.js delete mode 120000 packages/common/node_modules/jest-util/node_modules/.bin/is-ci delete mode 100644 packages/common/node_modules/jest-util/package.json delete mode 100644 packages/common/node_modules/jest-worker/LICENSE delete mode 100644 packages/common/node_modules/jest-worker/README.md delete mode 100644 packages/common/node_modules/jest-worker/build/Farm.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/Farm.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/Farm.js delete mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/WorkerPool.js delete mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/base/BaseWorkerPool.js delete mode 100644 packages/common/node_modules/jest-worker/build/index.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/index.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/index.js delete mode 100644 packages/common/node_modules/jest-worker/build/types.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/types.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/types.js delete mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/workers/ChildProcessWorker.js delete mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/workers/NodeThreadsWorker.js delete mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/workers/processChild.js delete mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.d.ts delete mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.d.ts.map delete mode 100644 packages/common/node_modules/jest-worker/build/workers/threadChild.js delete mode 100644 packages/common/node_modules/jest-worker/package.json delete mode 100644 packages/common/node_modules/make-dir/index.d.ts delete mode 100644 packages/common/node_modules/make-dir/index.js delete mode 100644 packages/common/node_modules/make-dir/license delete mode 120000 packages/common/node_modules/make-dir/node_modules/.bin/semver delete mode 100644 packages/common/node_modules/make-dir/package.json delete mode 100644 packages/common/node_modules/make-dir/readme.md delete mode 100644 packages/common/node_modules/micromatch/CHANGELOG.md delete mode 100755 packages/common/node_modules/micromatch/LICENSE delete mode 100644 packages/common/node_modules/micromatch/README.md delete mode 100644 packages/common/node_modules/micromatch/index.js delete mode 100644 packages/common/node_modules/micromatch/package.json delete mode 100644 packages/common/node_modules/readable-stream/CONTRIBUTING.md delete mode 100644 packages/common/node_modules/readable-stream/GOVERNANCE.md delete mode 100644 packages/common/node_modules/readable-stream/LICENSE delete mode 100644 packages/common/node_modules/readable-stream/README.md delete mode 100644 packages/common/node_modules/readable-stream/errors-browser.js delete mode 100644 packages/common/node_modules/readable-stream/errors.js delete mode 100644 packages/common/node_modules/readable-stream/experimentalWarning.js delete mode 100644 packages/common/node_modules/readable-stream/lib/_stream_duplex.js delete mode 100644 packages/common/node_modules/readable-stream/lib/_stream_passthrough.js delete mode 100644 packages/common/node_modules/readable-stream/lib/_stream_readable.js delete mode 100644 packages/common/node_modules/readable-stream/lib/_stream_transform.js delete mode 100644 packages/common/node_modules/readable-stream/lib/_stream_writable.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/async_iterator.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/buffer_list.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/destroy.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/end-of-stream.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/pipeline.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/state.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/stream-browser.js delete mode 100644 packages/common/node_modules/readable-stream/lib/internal/streams/stream.js delete mode 100644 packages/common/node_modules/readable-stream/package.json delete mode 100644 packages/common/node_modules/readable-stream/readable-browser.js delete mode 100644 packages/common/node_modules/readable-stream/readable.js delete mode 100644 packages/common/node_modules/realpath-native/LICENSE delete mode 100644 packages/common/node_modules/realpath-native/README.md delete mode 100644 packages/common/node_modules/realpath-native/index.d.ts delete mode 100644 packages/common/node_modules/realpath-native/index.js delete mode 100644 packages/common/node_modules/realpath-native/package.json delete mode 100644 packages/common/node_modules/semver/CHANGELOG.md delete mode 100644 packages/common/node_modules/semver/LICENSE delete mode 100644 packages/common/node_modules/semver/README.md delete mode 100644 packages/common/node_modules/semver/package.json delete mode 100644 packages/common/node_modules/semver/range.bnf delete mode 100644 packages/common/node_modules/semver/semver.js delete mode 100644 packages/common/node_modules/slash/index.js delete mode 100644 packages/common/node_modules/slash/license delete mode 100644 packages/common/node_modules/slash/package.json delete mode 100644 packages/common/node_modules/slash/readme.md delete mode 100644 packages/common/node_modules/supports-color/browser.js delete mode 100644 packages/common/node_modules/supports-color/index.js delete mode 100644 packages/common/node_modules/supports-color/license delete mode 100644 packages/common/node_modules/supports-color/package.json delete mode 100644 packages/common/node_modules/supports-color/readme.md delete mode 100644 packages/common/node_modules/test-exclude/CHANGELOG.md delete mode 100644 packages/common/node_modules/test-exclude/LICENSE.txt delete mode 100644 packages/common/node_modules/test-exclude/README.md delete mode 100644 packages/common/node_modules/test-exclude/index.js delete mode 100644 packages/common/node_modules/test-exclude/package.json delete mode 100644 packages/common/node_modules/to-regex-range/LICENSE delete mode 100644 packages/common/node_modules/to-regex-range/README.md delete mode 100644 packages/common/node_modules/to-regex-range/index.js delete mode 100644 packages/common/node_modules/to-regex-range/package.json delete mode 100644 packages/common/node_modules/which/CHANGELOG.md delete mode 100644 packages/common/node_modules/which/LICENSE delete mode 100644 packages/common/node_modules/which/README.md delete mode 100644 packages/common/node_modules/which/package.json delete mode 100644 packages/common/node_modules/which/which.js delete mode 100644 packages/common/node_modules/write-file-atomic/CHANGELOG.md delete mode 100644 packages/common/node_modules/write-file-atomic/LICENSE delete mode 100644 packages/common/node_modules/write-file-atomic/README.md delete mode 100644 packages/common/node_modules/write-file-atomic/index.js delete mode 100644 packages/common/node_modules/write-file-atomic/package.json delete mode 100644 packages/common/src/schema/types/array.js delete mode 100644 packages/common/src/schema/types/bool.js create mode 100644 packages/common/src/schema/types/boolean.js delete mode 100644 packages/common/src/schema/types/file.js delete mode 100644 packages/common/src/schema/types/object.js create mode 100644 packages/common/src/schema/types/select.js delete mode 100644 packages/common/src/schema/types/string.js create mode 100644 packages/common/src/schema/types/text.js delete mode 100644 packages/common/src/schema/types/typeHelpers.js create mode 100644 packages/common/src/testUtils/testSchema.js delete mode 100644 packages/common/test/templateApi.types.spec.js delete mode 100644 packages/common/test/testSchema.js create mode 100644 packages/common/test/types.spec.js create mode 100644 packages/server/middleware/routes/neo/tests/record.spec.js diff --git a/packages/common/lib/common/apiWrapper.js.map b/packages/common/lib/common/apiWrapper.js.map index a1ed6bc2e7..0be7aeeb0e 100644 --- a/packages/common/lib/common/apiWrapper.js.map +++ b/packages/common/lib/common/apiWrapper.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/apiWrapper.js"],"names":["apiWrapper","app","eventNamespace","isAuthorized","eventContext","func","pushCallStack","handleNotAuthorized","startDate","Date","now","elapsed","publish","onBegin","params","result","publishComplete","publishError","apiWrapperSync","error","err","UnauthorisedError","seedCallId","callId","createCallStack","threadCallId","stack","calls","push","namespace","popCallStack","pop","length","ctx","onError","endcontext","onComplete"],"mappings":"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","sourcesContent":["import { cloneDeep, isUndefined } from \"lodash/fp\"\nimport { generate } from \"shortid\"\nimport { UnauthorisedError } from \"./errors\"\n\nexport const apiWrapper = async (\n app,\n eventNamespace,\n isAuthorized,\n eventContext,\n func,\n ...params\n) => {\n pushCallStack(app, eventNamespace)\n\n if (!isAuthorized(app)) {\n handleNotAuthorized(app, eventContext, eventNamespace)\n return\n }\n\n const startDate = Date.now()\n const elapsed = () => Date.now() - startDate\n\n try {\n await app.publish(eventNamespace.onBegin, eventContext)\n\n const result = await func(...params)\n\n await publishComplete(app, eventContext, eventNamespace, elapsed, result)\n return result\n } catch (error) {\n await publishError(app, eventContext, eventNamespace, elapsed, error)\n throw error\n }\n}\n\nexport const apiWrapperSync = (\n app,\n eventNamespace,\n isAuthorized,\n eventContext,\n func,\n ...params\n) => {\n pushCallStack(app, eventNamespace)\n\n if (!isAuthorized(app)) {\n handleNotAuthorized(app, eventContext, eventNamespace)\n return\n }\n\n const startDate = Date.now()\n const elapsed = () => Date.now() - startDate\n\n try {\n app.publish(eventNamespace.onBegin, eventContext)\n\n const result = func(...params)\n\n publishComplete(app, eventContext, eventNamespace, elapsed, result)\n return result\n } catch (error) {\n publishError(app, eventContext, eventNamespace, elapsed, error)\n throw error\n }\n}\n\nconst handleNotAuthorized = (app, eventContext, eventNamespace) => {\n const err = new UnauthorisedError(`Unauthorized: ${eventNamespace}`)\n publishError(app, eventContext, eventNamespace, () => 0, err)\n throw err\n}\n\nconst pushCallStack = (app, eventNamespace, seedCallId) => {\n const callId = generate()\n\n const createCallStack = () => ({\n seedCallId: !isUndefined(seedCallId) ? seedCallId : callId,\n threadCallId: callId,\n stack: [],\n })\n\n if (isUndefined(app.calls)) {\n app.calls = createCallStack()\n }\n\n app.calls.stack.push({\n namespace: eventNamespace,\n callId,\n })\n}\n\nconst popCallStack = app => {\n app.calls.stack.pop()\n if (app.calls.stack.length === 0) {\n delete app.calls\n }\n}\n\nconst publishError = async (\n app,\n eventContext,\n eventNamespace,\n elapsed,\n err\n) => {\n const ctx = cloneDeep(eventContext)\n ctx.error = err\n ctx.elapsed = elapsed()\n await app.publish(eventNamespace.onError, ctx)\n popCallStack(app)\n}\n\nconst publishComplete = async (\n app,\n eventContext,\n eventNamespace,\n elapsed,\n result\n) => {\n const endcontext = cloneDeep(eventContext)\n endcontext.result = result\n endcontext.elapsed = elapsed()\n await app.publish(eventNamespace.onComplete, endcontext)\n popCallStack(app)\n return result\n}\n\nexport default apiWrapper\n"],"file":"apiWrapper.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/apiWrapper.js"],"names":["apiWrapper","app","eventNamespace","isAuthorized","eventContext","func","pushCallStack","handleNotAuthorized","startDate","Date","now","elapsed","publish","onBegin","params","result","publishComplete","publishError","apiWrapperSync","error","err","UnauthorisedError","seedCallId","callId","createCallStack","threadCallId","stack","calls","push","namespace","popCallStack","pop","length","ctx","onError","endcontext","onComplete"],"mappings":"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","sourcesContent":["import { cloneDeep, isUndefined } from \"lodash/fp\"\r\nimport { generate } from \"shortid\"\r\nimport { UnauthorisedError } from \"./errors\"\r\n\r\nexport const apiWrapper = async (\r\n app,\r\n eventNamespace,\r\n isAuthorized,\r\n eventContext,\r\n func,\r\n ...params\r\n) => {\r\n pushCallStack(app, eventNamespace)\r\n\r\n if (!isAuthorized(app)) {\r\n handleNotAuthorized(app, eventContext, eventNamespace)\r\n return\r\n }\r\n\r\n const startDate = Date.now()\r\n const elapsed = () => Date.now() - startDate\r\n\r\n try {\r\n await app.publish(eventNamespace.onBegin, eventContext)\r\n\r\n const result = await func(...params)\r\n\r\n await publishComplete(app, eventContext, eventNamespace, elapsed, result)\r\n return result\r\n } catch (error) {\r\n await publishError(app, eventContext, eventNamespace, elapsed, error)\r\n throw error\r\n }\r\n}\r\n\r\nexport const apiWrapperSync = (\r\n app,\r\n eventNamespace,\r\n isAuthorized,\r\n eventContext,\r\n func,\r\n ...params\r\n) => {\r\n pushCallStack(app, eventNamespace)\r\n\r\n if (!isAuthorized(app)) {\r\n handleNotAuthorized(app, eventContext, eventNamespace)\r\n return\r\n }\r\n\r\n const startDate = Date.now()\r\n const elapsed = () => Date.now() - startDate\r\n\r\n try {\r\n app.publish(eventNamespace.onBegin, eventContext)\r\n\r\n const result = func(...params)\r\n\r\n publishComplete(app, eventContext, eventNamespace, elapsed, result)\r\n return result\r\n } catch (error) {\r\n publishError(app, eventContext, eventNamespace, elapsed, error)\r\n throw error\r\n }\r\n}\r\n\r\nconst handleNotAuthorized = (app, eventContext, eventNamespace) => {\r\n const err = new UnauthorisedError(`Unauthorized: ${eventNamespace}`)\r\n publishError(app, eventContext, eventNamespace, () => 0, err)\r\n throw err\r\n}\r\n\r\nconst pushCallStack = (app, eventNamespace, seedCallId) => {\r\n const callId = generate()\r\n\r\n const createCallStack = () => ({\r\n seedCallId: !isUndefined(seedCallId) ? seedCallId : callId,\r\n threadCallId: callId,\r\n stack: [],\r\n })\r\n\r\n if (isUndefined(app.calls)) {\r\n app.calls = createCallStack()\r\n }\r\n\r\n app.calls.stack.push({\r\n namespace: eventNamespace,\r\n callId,\r\n })\r\n}\r\n\r\nconst popCallStack = app => {\r\n app.calls.stack.pop()\r\n if (app.calls.stack.length === 0) {\r\n delete app.calls\r\n }\r\n}\r\n\r\nconst publishError = async (\r\n app,\r\n eventContext,\r\n eventNamespace,\r\n elapsed,\r\n err\r\n) => {\r\n const ctx = cloneDeep(eventContext)\r\n ctx.error = err\r\n ctx.elapsed = elapsed()\r\n await app.publish(eventNamespace.onError, ctx)\r\n popCallStack(app)\r\n}\r\n\r\nconst publishComplete = async (\r\n app,\r\n eventContext,\r\n eventNamespace,\r\n elapsed,\r\n result\r\n) => {\r\n const endcontext = cloneDeep(eventContext)\r\n endcontext.result = result\r\n endcontext.elapsed = elapsed()\r\n await app.publish(eventNamespace.onComplete, endcontext)\r\n popCallStack(app)\r\n return result\r\n}\r\n\r\nexport default apiWrapper\r\n"],"file":"apiWrapper.js"} \ No newline at end of file diff --git a/packages/common/lib/common/compileCode.js.map b/packages/common/lib/common/compileCode.js.map index f32cc0ab6c..4004d3743a 100644 --- a/packages/common/lib/common/compileCode.js.map +++ b/packages/common/lib/common/compileCode.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/compileCode.js"],"names":["compileCode","code","func","safeCode","trimmed","trim","endsWith","substring","length","e","message"],"mappings":"wGAAA;AACA;;AAEO,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAAAC,IAAI,EAAI;AACjC,MAAIC,IAAJ;AACA,MAAIC,QAAJ;;AAEA,MAAI,kBAAS,SAAT,EAAoBF,IAApB,CAAJ,EAA+B;AAC7BE,IAAAA,QAAQ,GAAGF,IAAX;AACD,GAFD,MAEO;AACL,QAAIG,OAAO,GAAGH,IAAI,CAACI,IAAL,EAAd;AACAD,IAAAA,OAAO,GAAGA,OAAO,CAACE,QAAR,CAAiB,GAAjB;AACNF,IAAAA,OAAO,CAACG,SAAR,CAAkB,CAAlB,EAAqBH,OAAO,CAACI,MAAR,GAAiB,CAAtC,CADM;AAENJ,IAAAA,OAFJ;AAGAD,IAAAA,QAAQ,qBAAcC,OAAd,MAAR;AACD;;AAED,MAAI;AACFF,IAAAA,IAAI,GAAG,+BAAMC,QAAN,CAAP;AACD,GAFD,CAEE,OAAOM,CAAP,EAAU;AACVA,IAAAA,CAAC,CAACC,OAAF,oCAAsCT,IAAtC,gBAAgDQ,CAAC,CAACC,OAAlD;AACA,UAAMD,CAAN;AACD;;AAED,SAAOP,IAAP;AACD,CAtBM,C","sourcesContent":["import { compileCode as cCode } from \"@nx-js/compiler-util\"\nimport { includes } from \"lodash/fp\"\n\nexport const compileCode = code => {\n let func\n let safeCode\n\n if (includes(\"return \")(code)) {\n safeCode = code\n } else {\n let trimmed = code.trim()\n trimmed = trimmed.endsWith(\";\")\n ? trimmed.substring(0, trimmed.length - 1)\n : trimmed\n safeCode = `return (${trimmed})`\n }\n\n try {\n func = cCode(safeCode)\n } catch (e) {\n e.message = `Error compiling code : ${code} : ${e.message}`\n throw e\n }\n\n return func\n}\n"],"file":"compileCode.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/compileCode.js"],"names":["compileCode","code","func","safeCode","trimmed","trim","endsWith","substring","length","e","message"],"mappings":"wGAAA;AACA;;AAEO,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAAAC,IAAI,EAAI;AACjC,MAAIC,IAAJ;AACA,MAAIC,QAAJ;;AAEA,MAAI,kBAAS,SAAT,EAAoBF,IAApB,CAAJ,EAA+B;AAC7BE,IAAAA,QAAQ,GAAGF,IAAX;AACD,GAFD,MAEO;AACL,QAAIG,OAAO,GAAGH,IAAI,CAACI,IAAL,EAAd;AACAD,IAAAA,OAAO,GAAGA,OAAO,CAACE,QAAR,CAAiB,GAAjB;AACNF,IAAAA,OAAO,CAACG,SAAR,CAAkB,CAAlB,EAAqBH,OAAO,CAACI,MAAR,GAAiB,CAAtC,CADM;AAENJ,IAAAA,OAFJ;AAGAD,IAAAA,QAAQ,qBAAcC,OAAd,MAAR;AACD;;AAED,MAAI;AACFF,IAAAA,IAAI,GAAG,+BAAMC,QAAN,CAAP;AACD,GAFD,CAEE,OAAOM,CAAP,EAAU;AACVA,IAAAA,CAAC,CAACC,OAAF,oCAAsCT,IAAtC,gBAAgDQ,CAAC,CAACC,OAAlD;AACA,UAAMD,CAAN;AACD;;AAED,SAAOP,IAAP;AACD,CAtBM,C","sourcesContent":["import { compileCode as cCode } from \"@nx-js/compiler-util\"\r\nimport { includes } from \"lodash/fp\"\r\n\r\nexport const compileCode = code => {\r\n let func\r\n let safeCode\r\n\r\n if (includes(\"return \")(code)) {\r\n safeCode = code\r\n } else {\r\n let trimmed = code.trim()\r\n trimmed = trimmed.endsWith(\";\")\r\n ? trimmed.substring(0, trimmed.length - 1)\r\n : trimmed\r\n safeCode = `return (${trimmed})`\r\n }\r\n\r\n try {\r\n func = cCode(safeCode)\r\n } catch (e) {\r\n e.message = `Error compiling code : ${code} : ${e.message}`\r\n throw e\r\n }\r\n\r\n return func\r\n}\r\n"],"file":"compileCode.js"} \ No newline at end of file diff --git a/packages/common/lib/common/errors.js.map b/packages/common/lib/common/errors.js.map index 833284900a..c39f05df0f 100644 --- a/packages/common/lib/common/errors.js.map +++ b/packages/common/lib/common/errors.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/errors.js"],"names":["BadRequestError","message","httpStatusCode","Error","UnauthorisedError","ForbiddenError","NotFoundError","ConflictError"],"mappings":"i9CAAaA,e;AACX,2BAAYC,OAAZ,EAAqB;AACnB,8BAAMA,OAAN;AACA,UAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,yEAJkCC,K;;;AAOxBC,iB;AACX,6BAAYH,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,2EAJoCC,K;;;AAO1BE,c;AACX,0BAAYJ,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,wEAJiCC,K;;;AAOvBG,a;AACX,yBAAYL,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,uEAJgCC,K;;;AAOtBI,a;AACX,yBAAYN,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,uEAJgCC,K","sourcesContent":["export class BadRequestError extends Error {\n constructor(message) {\n super(message)\n this.httpStatusCode = 400\n }\n}\n\nexport class UnauthorisedError extends Error {\n constructor(message) {\n super(message)\n this.httpStatusCode = 401\n }\n}\n\nexport class ForbiddenError extends Error {\n constructor(message) {\n super(message)\n this.httpStatusCode = 403\n }\n}\n\nexport class NotFoundError extends Error {\n constructor(message) {\n super(message)\n this.httpStatusCode = 404\n }\n}\n\nexport class ConflictError extends Error {\n constructor(message) {\n super(message)\n this.httpStatusCode = 409\n }\n}\n"],"file":"errors.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/errors.js"],"names":["BadRequestError","message","httpStatusCode","Error","UnauthorisedError","ForbiddenError","NotFoundError","ConflictError"],"mappings":"i9CAAaA,e;AACX,2BAAYC,OAAZ,EAAqB;AACnB,8BAAMA,OAAN;AACA,UAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,yEAJkCC,K;;;AAOxBC,iB;AACX,6BAAYH,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,2EAJoCC,K;;;AAO1BE,c;AACX,0BAAYJ,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,wEAJiCC,K;;;AAOvBG,a;AACX,yBAAYL,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,uEAJgCC,K;;;AAOtBI,a;AACX,yBAAYN,OAAZ,EAAqB;AACnB,gCAAMA,OAAN;AACA,WAAKC,cAAL,GAAsB,GAAtB,CAFmB;AAGpB,G,uEAJgCC,K","sourcesContent":["export class BadRequestError extends Error {\r\n constructor(message) {\r\n super(message)\r\n this.httpStatusCode = 400\r\n }\r\n}\r\n\r\nexport class UnauthorisedError extends Error {\r\n constructor(message) {\r\n super(message)\r\n this.httpStatusCode = 401\r\n }\r\n}\r\n\r\nexport class ForbiddenError extends Error {\r\n constructor(message) {\r\n super(message)\r\n this.httpStatusCode = 403\r\n }\r\n}\r\n\r\nexport class NotFoundError extends Error {\r\n constructor(message) {\r\n super(message)\r\n this.httpStatusCode = 404\r\n }\r\n}\r\n\r\nexport class ConflictError extends Error {\r\n constructor(message) {\r\n super(message)\r\n this.httpStatusCode = 409\r\n }\r\n}\r\n"],"file":"errors.js"} \ No newline at end of file diff --git a/packages/common/lib/common/eventAggregator.js.map b/packages/common/lib/common/eventAggregator.js.map index 8c8719202d..3dd9e6d67b 100644 --- a/packages/common/lib/common/eventAggregator.js.map +++ b/packages/common/lib/common/eventAggregator.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/eventAggregator.js"],"names":["publish","handlers","eventName","context","handler","subscribe","push","createEventAggregator","eventAggregator"],"mappings":"iZAAA,+B;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAAAC,QAAQ,6HAAI,iBAAOC,SAAP,oLAAkBC,OAAlB,2DAA4B,EAA5B;AACrB,2BAAID,SAAJ,EAAeD,QAAf,CADqB;;AAGJA,cAAAA,QAAQ,CAACC,SAAD,CAHJ,sGAGfE,OAHe;AAIlBA,gBAAAA,OAAO,CAACF,SAAD,EAAYC,OAAZ,CAJW,gTAAJ,mEAAxB;;;;AAQA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAAAJ,QAAQ,UAAI,UAACC,SAAD,EAAYE,OAAZ,EAAwB;AACpD,QAAI,CAAC,aAAIF,SAAJ,EAAeD,QAAf,CAAL,EAA+B;AAC7BA,MAAAA,QAAQ,CAACC,SAAD,CAAR,GAAsB,EAAtB;AACD;AACDD,IAAAA,QAAQ,CAACC,SAAD,CAAR,CAAoBI,IAApB,CAAyBF,OAAzB;AACD,GALyB,EAA1B;;AAOO,IAAMG,qBAAqB,GAAG,SAAxBA,qBAAwB,GAAM;AACzC,MAAMN,QAAQ,GAAG,EAAjB;AACA,MAAMO,eAAe,GAAG;AACtBR,IAAAA,OAAO,EAAEA,OAAO,CAACC,QAAD,CADM;AAEtBI,IAAAA,SAAS,EAAEA,SAAS,CAACJ,QAAD,CAFE,EAAxB;;AAIA,SAAOO,eAAP;AACD,CAPM,C;;AASQD,qB","sourcesContent":["import { has } from \"lodash/fp\"\n\nconst publish = handlers => async (eventName, context = {}) => {\n if (!has(eventName)(handlers)) return\n\n for (const handler of handlers[eventName]) {\n await handler(eventName, context)\n }\n}\n\nconst subscribe = handlers => (eventName, handler) => {\n if (!has(eventName)(handlers)) {\n handlers[eventName] = []\n }\n handlers[eventName].push(handler)\n}\n\nexport const createEventAggregator = () => {\n const handlers = {}\n const eventAggregator = {\n publish: publish(handlers),\n subscribe: subscribe(handlers),\n }\n return eventAggregator\n}\n\nexport default createEventAggregator\n"],"file":"eventAggregator.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/eventAggregator.js"],"names":["publish","handlers","eventName","context","handler","subscribe","push","createEventAggregator","eventAggregator"],"mappings":"iZAAA,+B;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAAAC,QAAQ,6HAAI,iBAAOC,SAAP,oLAAkBC,OAAlB,2DAA4B,EAA5B;AACrB,2BAAID,SAAJ,EAAeD,QAAf,CADqB;;AAGJA,cAAAA,QAAQ,CAACC,SAAD,CAHJ,sGAGfE,OAHe;AAIlBA,gBAAAA,OAAO,CAACF,SAAD,EAAYC,OAAZ,CAJW,gTAAJ,mEAAxB;;;;AAQA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAAAJ,QAAQ,UAAI,UAACC,SAAD,EAAYE,OAAZ,EAAwB;AACpD,QAAI,CAAC,aAAIF,SAAJ,EAAeD,QAAf,CAAL,EAA+B;AAC7BA,MAAAA,QAAQ,CAACC,SAAD,CAAR,GAAsB,EAAtB;AACD;AACDD,IAAAA,QAAQ,CAACC,SAAD,CAAR,CAAoBI,IAApB,CAAyBF,OAAzB;AACD,GALyB,EAA1B;;AAOO,IAAMG,qBAAqB,GAAG,SAAxBA,qBAAwB,GAAM;AACzC,MAAMN,QAAQ,GAAG,EAAjB;AACA,MAAMO,eAAe,GAAG;AACtBR,IAAAA,OAAO,EAAEA,OAAO,CAACC,QAAD,CADM;AAEtBI,IAAAA,SAAS,EAAEA,SAAS,CAACJ,QAAD,CAFE,EAAxB;;AAIA,SAAOO,eAAP;AACD,CAPM,C;;AASQD,qB","sourcesContent":["import { has } from \"lodash/fp\"\r\n\r\nconst publish = handlers => async (eventName, context = {}) => {\r\n if (!has(eventName)(handlers)) return\r\n\r\n for (const handler of handlers[eventName]) {\r\n await handler(eventName, context)\r\n }\r\n}\r\n\r\nconst subscribe = handlers => (eventName, handler) => {\r\n if (!has(eventName)(handlers)) {\r\n handlers[eventName] = []\r\n }\r\n handlers[eventName].push(handler)\r\n}\r\n\r\nexport const createEventAggregator = () => {\r\n const handlers = {}\r\n const eventAggregator = {\r\n publish: publish(handlers),\r\n subscribe: subscribe(handlers),\r\n }\r\n return eventAggregator\r\n}\r\n\r\nexport default createEventAggregator\r\n"],"file":"eventAggregator.js"} \ No newline at end of file diff --git a/packages/common/lib/common/events.js.map b/packages/common/lib/common/events.js.map index edf1c04791..f290ec2c42 100644 --- a/packages/common/lib/common/events.js.map +++ b/packages/common/lib/common/events.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/events.js"],"names":["commonPlus","extra","common","_events","recordApi","save","getContext","getNew","load","validate","uploadFile","downloadFile","indexApi","buildIndex","listItems","aggregates","collectionApi","getAllowedRecordTypes","initialise","authApi","authenticate","authenticateTemporaryAccess","createTemporaryAccess","createUser","enableUser","disableUser","loadAccessLevels","getNewAccessLevel","getNewUser","getNewUserAuth","getUsers","saveAccessLevels","isAuthorized","changeMyPassword","setPasswordFromTemporaryCode","scorePassword","isValidPassword","validateUser","validateAccessLevels","setUserAccessLevels","templateApi","saveApplicationHierarchy","saveActionsAndTriggers","actionsApi","execute","_eventsList","makeEvent","area","method","name","areaKey","methodKey","obj","s","push","events","eventsList"],"mappings":"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","sourcesContent":["import { union, reduce } from \"lodash/fp\"\n\nconst commonPlus = extra => union([\"onBegin\", \"onComplete\", \"onError\"])(extra)\n\nconst common = () => commonPlus([])\n\nconst _events = {\n recordApi: {\n save: commonPlus([\"onInvalid\", \"onRecordUpdated\", \"onRecordCreated\"]),\n delete: common(),\n getContext: common(),\n getNew: common(),\n load: common(),\n validate: common(),\n uploadFile: common(),\n downloadFile: common(),\n },\n indexApi: {\n buildIndex: common(),\n listItems: common(),\n delete: common(),\n aggregates: common(),\n },\n collectionApi: {\n getAllowedRecordTypes: common(),\n initialise: common(),\n delete: common(),\n },\n authApi: {\n authenticate: common(),\n authenticateTemporaryAccess: common(),\n createTemporaryAccess: common(),\n createUser: common(),\n enableUser: common(),\n disableUser: common(),\n loadAccessLevels: common(),\n getNewAccessLevel: common(),\n getNewUser: common(),\n getNewUserAuth: common(),\n getUsers: common(),\n saveAccessLevels: common(),\n isAuthorized: common(),\n changeMyPassword: common(),\n setPasswordFromTemporaryCode: common(),\n scorePassword: common(),\n isValidPassword: common(),\n validateUser: common(),\n validateAccessLevels: common(),\n setUserAccessLevels: common(),\n },\n templateApi: {\n saveApplicationHierarchy: common(),\n saveActionsAndTriggers: common(),\n },\n actionsApi: {\n execute: common(),\n },\n}\n\nconst _eventsList = []\n\nconst makeEvent = (area, method, name) => `${area}:${method}:${name}`\n\nfor (const areaKey in _events) {\n for (const methodKey in _events[areaKey]) {\n _events[areaKey][methodKey] = reduce((obj, s) => {\n obj[s] = makeEvent(areaKey, methodKey, s)\n return obj\n }, {})(_events[areaKey][methodKey])\n }\n}\n\nfor (const areaKey in _events) {\n for (const methodKey in _events[areaKey]) {\n for (const name in _events[areaKey][methodKey]) {\n _eventsList.push(_events[areaKey][methodKey][name])\n }\n }\n}\n\nexport const events = _events\n\nexport const eventsList = _eventsList\n\nexport default { events: _events, eventsList: _eventsList }\n"],"file":"events.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/events.js"],"names":["commonPlus","extra","common","_events","recordApi","save","getContext","getNew","load","validate","uploadFile","downloadFile","indexApi","buildIndex","listItems","aggregates","collectionApi","getAllowedRecordTypes","initialise","authApi","authenticate","authenticateTemporaryAccess","createTemporaryAccess","createUser","enableUser","disableUser","loadAccessLevels","getNewAccessLevel","getNewUser","getNewUserAuth","getUsers","saveAccessLevels","isAuthorized","changeMyPassword","setPasswordFromTemporaryCode","scorePassword","isValidPassword","validateUser","validateAccessLevels","setUserAccessLevels","templateApi","saveApplicationHierarchy","saveActionsAndTriggers","actionsApi","execute","_eventsList","makeEvent","area","method","name","areaKey","methodKey","obj","s","push","events","eventsList"],"mappings":"6IAAA;;AAEA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAAAC,KAAK,UAAI,eAAM,CAAC,SAAD,EAAY,YAAZ,EAA0B,SAA1B,CAAN,EAA4CA,KAA5C,CAAJ,EAAxB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,WAAMF,UAAU,CAAC,EAAD,CAAhB,EAAf;;AAEA,IAAMG,OAAO,GAAG;AACdC,EAAAA,SAAS,EAAE;AACTC,IAAAA,IAAI,EAAEL,UAAU,CAAC,CAAC,WAAD,EAAc,iBAAd,EAAiC,iBAAjC,CAAD,CADP;AAET,cAAQE,MAAM,EAFL;AAGTI,IAAAA,UAAU,EAAEJ,MAAM,EAHT;AAITK,IAAAA,MAAM,EAAEL,MAAM,EAJL;AAKTM,IAAAA,IAAI,EAAEN,MAAM,EALH;AAMTO,IAAAA,QAAQ,EAAEP,MAAM,EANP;AAOTQ,IAAAA,UAAU,EAAER,MAAM,EAPT;AAQTS,IAAAA,YAAY,EAAET,MAAM,EARX,EADG;;AAWdU,EAAAA,QAAQ,EAAE;AACRC,IAAAA,UAAU,EAAEX,MAAM,EADV;AAERY,IAAAA,SAAS,EAAEZ,MAAM,EAFT;AAGR,cAAQA,MAAM,EAHN;AAIRa,IAAAA,UAAU,EAAEb,MAAM,EAJV,EAXI;;AAiBdc,EAAAA,aAAa,EAAE;AACbC,IAAAA,qBAAqB,EAAEf,MAAM,EADhB;AAEbgB,IAAAA,UAAU,EAAEhB,MAAM,EAFL;AAGb,cAAQA,MAAM,EAHD,EAjBD;;AAsBdiB,EAAAA,OAAO,EAAE;AACPC,IAAAA,YAAY,EAAElB,MAAM,EADb;AAEPmB,IAAAA,2BAA2B,EAAEnB,MAAM,EAF5B;AAGPoB,IAAAA,qBAAqB,EAAEpB,MAAM,EAHtB;AAIPqB,IAAAA,UAAU,EAAErB,MAAM,EAJX;AAKPsB,IAAAA,UAAU,EAAEtB,MAAM,EALX;AAMPuB,IAAAA,WAAW,EAAEvB,MAAM,EANZ;AAOPwB,IAAAA,gBAAgB,EAAExB,MAAM,EAPjB;AAQPyB,IAAAA,iBAAiB,EAAEzB,MAAM,EARlB;AASP0B,IAAAA,UAAU,EAAE1B,MAAM,EATX;AAUP2B,IAAAA,cAAc,EAAE3B,MAAM,EAVf;AAWP4B,IAAAA,QAAQ,EAAE5B,MAAM,EAXT;AAYP6B,IAAAA,gBAAgB,EAAE7B,MAAM,EAZjB;AAaP8B,IAAAA,YAAY,EAAE9B,MAAM,EAbb;AAcP+B,IAAAA,gBAAgB,EAAE/B,MAAM,EAdjB;AAePgC,IAAAA,4BAA4B,EAAEhC,MAAM,EAf7B;AAgBPiC,IAAAA,aAAa,EAAEjC,MAAM,EAhBd;AAiBPkC,IAAAA,eAAe,EAAElC,MAAM,EAjBhB;AAkBPmC,IAAAA,YAAY,EAAEnC,MAAM,EAlBb;AAmBPoC,IAAAA,oBAAoB,EAAEpC,MAAM,EAnBrB;AAoBPqC,IAAAA,mBAAmB,EAAErC,MAAM,EApBpB,EAtBK;;AA4CdsC,EAAAA,WAAW,EAAE;AACXC,IAAAA,wBAAwB,EAAEvC,MAAM,EADrB;AAEXwC,IAAAA,sBAAsB,EAAExC,MAAM,EAFnB,EA5CC;;AAgDdyC,EAAAA,UAAU,EAAE;AACVC,IAAAA,OAAO,EAAE1C,MAAM,EADL,EAhDE,EAAhB;;;;AAqDA,IAAM2C,WAAW,GAAG,EAApB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,IAAD,EAAOC,MAAP,EAAeC,IAAf,oBAA2BF,IAA3B,cAAmCC,MAAnC,cAA6CC,IAA7C,GAAlB,C;;AAEWC,O;AACEC,EAAAA,U;AACThD,IAAAA,OAAO,CAAC+C,OAAD,CAAP,CAAiBC,UAAjB,IAA8B,gBAAO,UAACC,GAAD,EAAMC,CAAN,EAAY;AAC/CD,MAAAA,GAAG,CAACC,CAAD,CAAH,GAASP,SAAS,CAACI,OAAD,EAAUC,UAAV,EAAqBE,CAArB,CAAlB;AACA,aAAOD,GAAP;AACD,KAH6B,EAG3B,EAH2B,EAGvBjD,OAAO,CAAC+C,OAAD,CAAP,CAAiBC,UAAjB,CAHuB,CAA9B,C,EADF,KAAK,IAAMA,UAAX,IAAwBhD,OAAO,CAAC+C,OAAD,CAA/B,EAA0C,QAA/BC,UAA+B;AAKzC,G,EANH,KAAK,IAAMD,OAAX,IAAsB/C,OAAtB,EAA+B,OAApB+C,OAAoB;AAO9B;;AAED,KAAK,IAAMA,QAAX,IAAsB/C,OAAtB,EAA+B;AAC7B,OAAK,IAAMgD,SAAX,IAAwBhD,OAAO,CAAC+C,QAAD,CAA/B,EAA0C;AACxC,SAAK,IAAMD,IAAX,IAAmB9C,OAAO,CAAC+C,QAAD,CAAP,CAAiBC,SAAjB,CAAnB,EAAgD;AAC9CN,MAAAA,WAAW,CAACS,IAAZ,CAAiBnD,OAAO,CAAC+C,QAAD,CAAP,CAAiBC,SAAjB,EAA4BF,IAA5B,CAAjB;AACD;AACF;AACF;;AAEM,IAAMM,MAAM,GAAGpD,OAAf,C;;AAEA,IAAMqD,UAAU,GAAGX,WAAnB,C;;AAEQ,EAAEU,MAAM,EAAEpD,OAAV,EAAmBqD,UAAU,EAAEX,WAA/B,E","sourcesContent":["import { union, reduce } from \"lodash/fp\"\r\n\r\nconst commonPlus = extra => union([\"onBegin\", \"onComplete\", \"onError\"])(extra)\r\n\r\nconst common = () => commonPlus([])\r\n\r\nconst _events = {\r\n recordApi: {\r\n save: commonPlus([\"onInvalid\", \"onRecordUpdated\", \"onRecordCreated\"]),\r\n delete: common(),\r\n getContext: common(),\r\n getNew: common(),\r\n load: common(),\r\n validate: common(),\r\n uploadFile: common(),\r\n downloadFile: common(),\r\n },\r\n indexApi: {\r\n buildIndex: common(),\r\n listItems: common(),\r\n delete: common(),\r\n aggregates: common(),\r\n },\r\n collectionApi: {\r\n getAllowedRecordTypes: common(),\r\n initialise: common(),\r\n delete: common(),\r\n },\r\n authApi: {\r\n authenticate: common(),\r\n authenticateTemporaryAccess: common(),\r\n createTemporaryAccess: common(),\r\n createUser: common(),\r\n enableUser: common(),\r\n disableUser: common(),\r\n loadAccessLevels: common(),\r\n getNewAccessLevel: common(),\r\n getNewUser: common(),\r\n getNewUserAuth: common(),\r\n getUsers: common(),\r\n saveAccessLevels: common(),\r\n isAuthorized: common(),\r\n changeMyPassword: common(),\r\n setPasswordFromTemporaryCode: common(),\r\n scorePassword: common(),\r\n isValidPassword: common(),\r\n validateUser: common(),\r\n validateAccessLevels: common(),\r\n setUserAccessLevels: common(),\r\n },\r\n templateApi: {\r\n saveApplicationHierarchy: common(),\r\n saveActionsAndTriggers: common(),\r\n },\r\n actionsApi: {\r\n execute: common(),\r\n },\r\n}\r\n\r\nconst _eventsList = []\r\n\r\nconst makeEvent = (area, method, name) => `${area}:${method}:${name}`\r\n\r\nfor (const areaKey in _events) {\r\n for (const methodKey in _events[areaKey]) {\r\n _events[areaKey][methodKey] = reduce((obj, s) => {\r\n obj[s] = makeEvent(areaKey, methodKey, s)\r\n return obj\r\n }, {})(_events[areaKey][methodKey])\r\n }\r\n}\r\n\r\nfor (const areaKey in _events) {\r\n for (const methodKey in _events[areaKey]) {\r\n for (const name in _events[areaKey][methodKey]) {\r\n _eventsList.push(_events[areaKey][methodKey][name])\r\n }\r\n }\r\n}\r\n\r\nexport const events = _events\r\n\r\nexport const eventsList = _eventsList\r\n\r\nexport default { events: _events, eventsList: _eventsList }\r\n"],"file":"events.js"} \ No newline at end of file diff --git a/packages/common/lib/common/index.js.map b/packages/common/lib/common/index.js.map index 775e613d7a..b4ce84d9f5 100644 --- a/packages/common/lib/common/index.js.map +++ b/packages/common/lib/common/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/index.js"],"names":["$$","funcs","arg","$","keySep","trimKeySep","str","splitByKeySep","safeKey","key","joinKey","strs","paramsOrArray","length","s","toString","splitKey","getDirFomKey","dropRight","p","getFileFromKey","takeRight","head","configFolder","fieldDefinitions","templateDefinitions","appDefinitionFile","dirIndex","folderPath","getIndexKeyFromFileKey","ifExists","val","exists","notExists","getOrDefault","defaultVal","not","func","isDefined","isUndefined","isNonNull","isNull","isNotNaN","isNaN","allTrue","funcArgs","result","conditionFunc","anyTrue","insensitiveEquals","str1","str2","trim","toLowerCase","isSomething","isNothing","isNothingOrEmpty","v","somethingOrGetDefault","getDefaultFunc","somethingOrDefault","mapIfSomethingOrDefault","mapFunc","mapIfSomethingOrBlank","none","predicate","collection","all","isNotEmpty","ob","isAsync","fn","constructor","name","isNonEmptyArray","isArray","isNonEmptyString","isString","tryOr","failFunc","args","apply","_","tryAwaitOr","defineError","errorPrefix","err","message","tryOrIgnore","tryAwaitOrIgnore","causesException","e","executesWithoutException","handleErrorWith","returnValInError","handleErrorWithUndefined","undefined","switchCase","cases","value","nextCase","nextResult","isValue","val1","val2","isOneOf","vals","defaultCase","memberMatches","member","match","obj","StartsWith","searchFor","searchIn","contains","array","getHashCode","hash","i","char","l","charCodeAt","awEx","promise","isSafeInteger","n","Number","MAX_SAFE_INTEGER","toDateOrNull","Date","toBoolOrNull","toNumberOrNull","isArrayOfString","opts","pushAll","target","items","push","pause","duration","Promise","res","setTimeout","retry","retries","delay","then","events","eventsList","toNumber","toDate","toBool"],"mappings":"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","sourcesContent":["import {\n head,\n tail,\n findIndex,\n startsWith,\n dropRight,\n flow,\n takeRight,\n trim,\n replace,\n} from \"lodash\"\nimport {\n some,\n reduce,\n isEmpty,\n isArray,\n join,\n isString,\n isInteger,\n isDate,\n toNumber,\n isUndefined,\n isNaN,\n isNull,\n constant,\n split,\n includes,\n filter,\n} from \"lodash/fp\"\nimport { events, eventsList } from \"./events.js\"\n\n// this is the combinator function\nexport const $$ = (...funcs) => arg => flow(funcs)(arg)\n\n// this is the pipe function\nexport const $ = (arg, funcs) => $$(...funcs)(arg)\n\nexport const keySep = \"/\"\nconst trimKeySep = str => trim(str, keySep)\nconst splitByKeySep = str => split(keySep)(str)\nexport const safeKey = key =>\n replace(`${keySep}${trimKeySep(key)}`, `${keySep}${keySep}`, keySep)\nexport const joinKey = (...strs) => {\n const paramsOrArray = (strs.length === 1) & isArray(strs[0]) ? strs[0] : strs\n return $(paramsOrArray, [\n filter(s => !isUndefined(s) && !isNull(s) && s.toString().length > 0),\n join(keySep),\n safeKey,\n ])\n}\nexport const splitKey = $$(trimKeySep, splitByKeySep)\nexport const getDirFomKey = $$(splitKey, dropRight, p => joinKey(...p))\nexport const getFileFromKey = $$(splitKey, takeRight, head)\n\nexport const configFolder = `${keySep}.config`\nexport const fieldDefinitions = joinKey(configFolder, \"fields.json\")\nexport const templateDefinitions = joinKey(configFolder, \"templates.json\")\nexport const appDefinitionFile = joinKey(configFolder, \"appDefinition.json\")\nexport const dirIndex = folderPath =>\n joinKey(configFolder, \"dir\", ...splitKey(folderPath), \"dir.idx\")\nexport const getIndexKeyFromFileKey = $$(getDirFomKey, dirIndex)\n\nexport const ifExists = (val, exists, notExists) =>\n isUndefined(val)\n ? isUndefined(notExists)\n ? (() => {})()\n : notExists()\n : exists()\n\nexport const getOrDefault = (val, defaultVal) =>\n ifExists(\n val,\n () => val,\n () => defaultVal\n )\n\nexport const not = func => val => !func(val)\nexport const isDefined = not(isUndefined)\nexport const isNonNull = not(isNull)\nexport const isNotNaN = not(isNaN)\n\nexport const allTrue = (...funcArgs) => val =>\n reduce(\n (result, conditionFunc) =>\n (isNull(result) || result == true) && conditionFunc(val),\n null\n )(funcArgs)\n\nexport const anyTrue = (...funcArgs) => val =>\n reduce(\n (result, conditionFunc) => result == true || conditionFunc(val),\n null\n )(funcArgs)\n\nexport const insensitiveEquals = (str1, str2) =>\n str1.trim().toLowerCase() === str2.trim().toLowerCase()\n\nexport const isSomething = allTrue(isDefined, isNonNull, isNotNaN)\nexport const isNothing = not(isSomething)\nexport const isNothingOrEmpty = v => isNothing(v) || isEmpty(v)\nexport const somethingOrGetDefault = getDefaultFunc => val =>\n isSomething(val) ? val : getDefaultFunc()\nexport const somethingOrDefault = (val, defaultVal) =>\n somethingOrGetDefault(constant(defaultVal))(val)\n\nexport const mapIfSomethingOrDefault = (mapFunc, defaultVal) => val =>\n isSomething(val) ? mapFunc(val) : defaultVal\n\nexport const mapIfSomethingOrBlank = mapFunc =>\n mapIfSomethingOrDefault(mapFunc, \"\")\n\nexport const none = predicate => collection => !some(predicate)(collection)\n\nexport const all = predicate => collection =>\n none(v => !predicate(v))(collection)\n\nexport const isNotEmpty = ob => !isEmpty(ob)\nexport const isAsync = fn => fn.constructor.name === \"AsyncFunction\"\nexport const isNonEmptyArray = allTrue(isArray, isNotEmpty)\nexport const isNonEmptyString = allTrue(isString, isNotEmpty)\nexport const tryOr = failFunc => (func, ...args) => {\n try {\n return func.apply(null, ...args)\n } catch (_) {\n return failFunc()\n }\n}\n\nexport const tryAwaitOr = failFunc => async (func, ...args) => {\n try {\n return await func.apply(null, ...args)\n } catch (_) {\n return await failFunc()\n }\n}\n\nexport const defineError = (func, errorPrefix) => {\n try {\n return func()\n } catch (err) {\n err.message = `${errorPrefix} : ${err.message}`\n throw err\n }\n}\n\nexport const tryOrIgnore = tryOr(() => {})\nexport const tryAwaitOrIgnore = tryAwaitOr(async () => {})\nexport const causesException = func => {\n try {\n func()\n return false\n } catch (e) {\n return true\n }\n}\n\nexport const executesWithoutException = func => !causesException(func)\n\nexport const handleErrorWith = returnValInError =>\n tryOr(constant(returnValInError))\n\nexport const handleErrorWithUndefined = handleErrorWith(undefined)\n\nexport const switchCase = (...cases) => value => {\n const nextCase = () => head(cases)[0](value)\n const nextResult = () => head(cases)[1](value)\n\n if (isEmpty(cases)) return // undefined\n if (nextCase() === true) return nextResult()\n return switchCase(...tail(cases))(value)\n}\n\nexport const isValue = val1 => val2 => val1 === val2\nexport const isOneOf = (...vals) => val => includes(val)(vals)\nexport const defaultCase = constant(true)\nexport const memberMatches = (member, match) => obj => match(obj[member])\n\nexport const StartsWith = searchFor => searchIn =>\n startsWith(searchIn, searchFor)\n\nexport const contains = val => array => findIndex(array, v => v === val) > -1\n\nexport const getHashCode = s => {\n let hash = 0\n let i\n let char\n let l\n if (s.length == 0) return hash\n for (i = 0, l = s.length; i < l; i++) {\n char = s.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash |= 0 // Convert to 32bit integer\n }\n\n // converting to string, but dont want a \"-\" prefixed\n if (hash < 0) {\n return `n${(hash * -1).toString()}`\n }\n return hash.toString()\n}\n\n// thanks to https://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/\nexport const awEx = async promise => {\n try {\n const result = await promise\n return [undefined, result]\n } catch (error) {\n return [error, undefined]\n }\n}\n\nexport const isSafeInteger = n =>\n isInteger(n) &&\n n <= Number.MAX_SAFE_INTEGER &&\n n >= 0 - Number.MAX_SAFE_INTEGER\n\nexport const toDateOrNull = s =>\n isNull(s) ? null : isDate(s) ? s : new Date(s)\nexport const toBoolOrNull = s => (isNull(s) ? null : s === \"true\" || s === true)\nexport const toNumberOrNull = s => (isNull(s) ? null : toNumber(s))\n\nexport const isArrayOfString = opts => isArray(opts) && all(isString)(opts)\n\nexport const pushAll = (target, items) => {\n for (let i of items) target.push(i)\n}\n\nexport const pause = async duration =>\n new Promise(res => setTimeout(res, duration))\n\nexport const retry = async (fn, retries, delay, ...args) => {\n try {\n return await fn(...args)\n } catch (err) {\n if (retries > 1) {\n return await pause(delay).then(\n async () => await retry(fn, retries - 1, delay, ...args)\n )\n }\n throw err\n }\n}\n\nexport { events } from \"./events.js\"\n\nexport default {\n ifExists,\n getOrDefault,\n isDefined,\n isNonNull,\n isNotNaN,\n allTrue,\n isSomething,\n mapIfSomethingOrDefault,\n mapIfSomethingOrBlank,\n configFolder,\n fieldDefinitions,\n isNothing,\n not,\n switchCase,\n defaultCase,\n StartsWith,\n contains,\n templateDefinitions,\n handleErrorWith,\n handleErrorWithUndefined,\n tryOr,\n tryOrIgnore,\n tryAwaitOr,\n tryAwaitOrIgnore,\n dirIndex,\n keySep,\n $,\n $$,\n getDirFomKey,\n getFileFromKey,\n splitKey,\n somethingOrDefault,\n getIndexKeyFromFileKey,\n joinKey,\n somethingOrGetDefault,\n appDefinitionFile,\n isValue,\n all,\n isOneOf,\n memberMatches,\n defineError,\n anyTrue,\n isNonEmptyArray,\n causesException,\n executesWithoutException,\n none,\n getHashCode,\n awEx,\n events,\n eventsList,\n isNothingOrEmpty,\n isSafeInteger,\n toNumber,\n toDate: toDateOrNull,\n toBool: toBoolOrNull,\n isArrayOfString,\n insensitiveEquals,\n pause,\n retry,\n pushAll,\n}\n"],"file":"index.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/index.js"],"names":["$$","funcs","arg","$","keySep","trimKeySep","str","splitByKeySep","safeKey","key","joinKey","strs","paramsOrArray","length","s","toString","splitKey","getDirFomKey","dropRight","p","getFileFromKey","takeRight","head","configFolder","fieldDefinitions","templateDefinitions","appDefinitionFile","dirIndex","folderPath","getIndexKeyFromFileKey","ifExists","val","exists","notExists","getOrDefault","defaultVal","not","func","isDefined","isUndefined","isNonNull","isNull","isNotNaN","isNaN","allTrue","funcArgs","result","conditionFunc","anyTrue","insensitiveEquals","str1","str2","trim","toLowerCase","isSomething","isNothing","isNothingOrEmpty","v","somethingOrGetDefault","getDefaultFunc","somethingOrDefault","mapIfSomethingOrDefault","mapFunc","mapIfSomethingOrBlank","none","predicate","collection","all","isNotEmpty","ob","isAsync","fn","constructor","name","isNonEmptyArray","isArray","isNonEmptyString","isString","tryOr","failFunc","args","apply","_","tryAwaitOr","defineError","errorPrefix","err","message","tryOrIgnore","tryAwaitOrIgnore","causesException","e","executesWithoutException","handleErrorWith","returnValInError","handleErrorWithUndefined","undefined","switchCase","cases","value","nextCase","nextResult","isValue","val1","val2","isOneOf","vals","defaultCase","memberMatches","member","match","obj","StartsWith","searchFor","searchIn","contains","array","getHashCode","hash","i","char","l","charCodeAt","awEx","promise","isSafeInteger","n","Number","MAX_SAFE_INTEGER","toDateOrNull","Date","toBoolOrNull","toNumberOrNull","isArrayOfString","opts","pushAll","target","items","push","pause","duration","Promise","res","setTimeout","retry","retries","delay","then","events","eventsList","toNumber","toDate","toBool"],"mappings":"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","sourcesContent":["import {\r\n head,\r\n tail,\r\n findIndex,\r\n startsWith,\r\n dropRight,\r\n flow,\r\n takeRight,\r\n trim,\r\n replace,\r\n} from \"lodash\"\r\nimport {\r\n some,\r\n reduce,\r\n isEmpty,\r\n isArray,\r\n join,\r\n isString,\r\n isInteger,\r\n isDate,\r\n toNumber,\r\n isUndefined,\r\n isNaN,\r\n isNull,\r\n constant,\r\n split,\r\n includes,\r\n filter,\r\n} from \"lodash/fp\"\r\nimport { events, eventsList } from \"./events.js\"\r\n\r\n// this is the combinator function\r\nexport const $$ = (...funcs) => arg => flow(funcs)(arg)\r\n\r\n// this is the pipe function\r\nexport const $ = (arg, funcs) => $$(...funcs)(arg)\r\n\r\nexport const keySep = \"/\"\r\nconst trimKeySep = str => trim(str, keySep)\r\nconst splitByKeySep = str => split(keySep)(str)\r\nexport const safeKey = key =>\r\n replace(`${keySep}${trimKeySep(key)}`, `${keySep}${keySep}`, keySep)\r\nexport const joinKey = (...strs) => {\r\n const paramsOrArray = (strs.length === 1) & isArray(strs[0]) ? strs[0] : strs\r\n return $(paramsOrArray, [\r\n filter(s => !isUndefined(s) && !isNull(s) && s.toString().length > 0),\r\n join(keySep),\r\n safeKey,\r\n ])\r\n}\r\nexport const splitKey = $$(trimKeySep, splitByKeySep)\r\nexport const getDirFomKey = $$(splitKey, dropRight, p => joinKey(...p))\r\nexport const getFileFromKey = $$(splitKey, takeRight, head)\r\n\r\nexport const configFolder = `${keySep}.config`\r\nexport const fieldDefinitions = joinKey(configFolder, \"fields.json\")\r\nexport const templateDefinitions = joinKey(configFolder, \"templates.json\")\r\nexport const appDefinitionFile = joinKey(configFolder, \"appDefinition.json\")\r\nexport const dirIndex = folderPath =>\r\n joinKey(configFolder, \"dir\", ...splitKey(folderPath), \"dir.idx\")\r\nexport const getIndexKeyFromFileKey = $$(getDirFomKey, dirIndex)\r\n\r\nexport const ifExists = (val, exists, notExists) =>\r\n isUndefined(val)\r\n ? isUndefined(notExists)\r\n ? (() => {})()\r\n : notExists()\r\n : exists()\r\n\r\nexport const getOrDefault = (val, defaultVal) =>\r\n ifExists(\r\n val,\r\n () => val,\r\n () => defaultVal\r\n )\r\n\r\nexport const not = func => val => !func(val)\r\nexport const isDefined = not(isUndefined)\r\nexport const isNonNull = not(isNull)\r\nexport const isNotNaN = not(isNaN)\r\n\r\nexport const allTrue = (...funcArgs) => val =>\r\n reduce(\r\n (result, conditionFunc) =>\r\n (isNull(result) || result == true) && conditionFunc(val),\r\n null\r\n )(funcArgs)\r\n\r\nexport const anyTrue = (...funcArgs) => val =>\r\n reduce(\r\n (result, conditionFunc) => result == true || conditionFunc(val),\r\n null\r\n )(funcArgs)\r\n\r\nexport const insensitiveEquals = (str1, str2) =>\r\n str1.trim().toLowerCase() === str2.trim().toLowerCase()\r\n\r\nexport const isSomething = allTrue(isDefined, isNonNull, isNotNaN)\r\nexport const isNothing = not(isSomething)\r\nexport const isNothingOrEmpty = v => isNothing(v) || isEmpty(v)\r\nexport const somethingOrGetDefault = getDefaultFunc => val =>\r\n isSomething(val) ? val : getDefaultFunc()\r\nexport const somethingOrDefault = (val, defaultVal) =>\r\n somethingOrGetDefault(constant(defaultVal))(val)\r\n\r\nexport const mapIfSomethingOrDefault = (mapFunc, defaultVal) => val =>\r\n isSomething(val) ? mapFunc(val) : defaultVal\r\n\r\nexport const mapIfSomethingOrBlank = mapFunc =>\r\n mapIfSomethingOrDefault(mapFunc, \"\")\r\n\r\nexport const none = predicate => collection => !some(predicate)(collection)\r\n\r\nexport const all = predicate => collection =>\r\n none(v => !predicate(v))(collection)\r\n\r\nexport const isNotEmpty = ob => !isEmpty(ob)\r\nexport const isAsync = fn => fn.constructor.name === \"AsyncFunction\"\r\nexport const isNonEmptyArray = allTrue(isArray, isNotEmpty)\r\nexport const isNonEmptyString = allTrue(isString, isNotEmpty)\r\nexport const tryOr = failFunc => (func, ...args) => {\r\n try {\r\n return func.apply(null, ...args)\r\n } catch (_) {\r\n return failFunc()\r\n }\r\n}\r\n\r\nexport const tryAwaitOr = failFunc => async (func, ...args) => {\r\n try {\r\n return await func.apply(null, ...args)\r\n } catch (_) {\r\n return await failFunc()\r\n }\r\n}\r\n\r\nexport const defineError = (func, errorPrefix) => {\r\n try {\r\n return func()\r\n } catch (err) {\r\n err.message = `${errorPrefix} : ${err.message}`\r\n throw err\r\n }\r\n}\r\n\r\nexport const tryOrIgnore = tryOr(() => {})\r\nexport const tryAwaitOrIgnore = tryAwaitOr(async () => {})\r\nexport const causesException = func => {\r\n try {\r\n func()\r\n return false\r\n } catch (e) {\r\n return true\r\n }\r\n}\r\n\r\nexport const executesWithoutException = func => !causesException(func)\r\n\r\nexport const handleErrorWith = returnValInError =>\r\n tryOr(constant(returnValInError))\r\n\r\nexport const handleErrorWithUndefined = handleErrorWith(undefined)\r\n\r\nexport const switchCase = (...cases) => value => {\r\n const nextCase = () => head(cases)[0](value)\r\n const nextResult = () => head(cases)[1](value)\r\n\r\n if (isEmpty(cases)) return // undefined\r\n if (nextCase() === true) return nextResult()\r\n return switchCase(...tail(cases))(value)\r\n}\r\n\r\nexport const isValue = val1 => val2 => val1 === val2\r\nexport const isOneOf = (...vals) => val => includes(val)(vals)\r\nexport const defaultCase = constant(true)\r\nexport const memberMatches = (member, match) => obj => match(obj[member])\r\n\r\nexport const StartsWith = searchFor => searchIn =>\r\n startsWith(searchIn, searchFor)\r\n\r\nexport const contains = val => array => findIndex(array, v => v === val) > -1\r\n\r\nexport const getHashCode = s => {\r\n let hash = 0\r\n let i\r\n let char\r\n let l\r\n if (s.length == 0) return hash\r\n for (i = 0, l = s.length; i < l; i++) {\r\n char = s.charCodeAt(i)\r\n hash = (hash << 5) - hash + char\r\n hash |= 0 // Convert to 32bit integer\r\n }\r\n\r\n // converting to string, but dont want a \"-\" prefixed\r\n if (hash < 0) {\r\n return `n${(hash * -1).toString()}`\r\n }\r\n return hash.toString()\r\n}\r\n\r\n// thanks to https://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/\r\nexport const awEx = async promise => {\r\n try {\r\n const result = await promise\r\n return [undefined, result]\r\n } catch (error) {\r\n return [error, undefined]\r\n }\r\n}\r\n\r\nexport const isSafeInteger = n =>\r\n isInteger(n) &&\r\n n <= Number.MAX_SAFE_INTEGER &&\r\n n >= 0 - Number.MAX_SAFE_INTEGER\r\n\r\nexport const toDateOrNull = s =>\r\n isNull(s) ? null : isDate(s) ? s : new Date(s)\r\nexport const toBoolOrNull = s => (isNull(s) ? null : s === \"true\" || s === true)\r\nexport const toNumberOrNull = s => (isNull(s) ? null : toNumber(s))\r\n\r\nexport const isArrayOfString = opts => isArray(opts) && all(isString)(opts)\r\n\r\nexport const pushAll = (target, items) => {\r\n for (let i of items) target.push(i)\r\n}\r\n\r\nexport const pause = async duration =>\r\n new Promise(res => setTimeout(res, duration))\r\n\r\nexport const retry = async (fn, retries, delay, ...args) => {\r\n try {\r\n return await fn(...args)\r\n } catch (err) {\r\n if (retries > 1) {\r\n return await pause(delay).then(\r\n async () => await retry(fn, retries - 1, delay, ...args)\r\n )\r\n }\r\n throw err\r\n }\r\n}\r\n\r\nexport { events } from \"./events.js\"\r\n\r\nexport default {\r\n ifExists,\r\n getOrDefault,\r\n isDefined,\r\n isNonNull,\r\n isNotNaN,\r\n allTrue,\r\n isSomething,\r\n mapIfSomethingOrDefault,\r\n mapIfSomethingOrBlank,\r\n configFolder,\r\n fieldDefinitions,\r\n isNothing,\r\n not,\r\n switchCase,\r\n defaultCase,\r\n StartsWith,\r\n contains,\r\n templateDefinitions,\r\n handleErrorWith,\r\n handleErrorWithUndefined,\r\n tryOr,\r\n tryOrIgnore,\r\n tryAwaitOr,\r\n tryAwaitOrIgnore,\r\n dirIndex,\r\n keySep,\r\n $,\r\n $$,\r\n getDirFomKey,\r\n getFileFromKey,\r\n splitKey,\r\n somethingOrDefault,\r\n getIndexKeyFromFileKey,\r\n joinKey,\r\n somethingOrGetDefault,\r\n appDefinitionFile,\r\n isValue,\r\n all,\r\n isOneOf,\r\n memberMatches,\r\n defineError,\r\n anyTrue,\r\n isNonEmptyArray,\r\n causesException,\r\n executesWithoutException,\r\n none,\r\n getHashCode,\r\n awEx,\r\n events,\r\n eventsList,\r\n isNothingOrEmpty,\r\n isSafeInteger,\r\n toNumber,\r\n toDate: toDateOrNull,\r\n toBool: toBoolOrNull,\r\n isArrayOfString,\r\n insensitiveEquals,\r\n pause,\r\n retry,\r\n pushAll,\r\n}\r\n"],"file":"index.js"} \ No newline at end of file diff --git a/packages/common/lib/common/validationCommon.js.map b/packages/common/lib/common/validationCommon.js.map index 421ded1c61..d196a26738 100644 --- a/packages/common/lib/common/validationCommon.js.map +++ b/packages/common/lib/common/validationCommon.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/common/validationCommon.js"],"names":["stringNotEmpty","s","trim","length","makerule","field","error","isValid","validationError","rule","item","applyRuleSet","ruleSet","itemToValidate","applyRule","isSomething","itemTovalidate"],"mappings":"wXAAA;AACA,gC;;AAEO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAAAC,CAAC,UAAI,wBAAYA,CAAZ,KAAkBA,CAAC,CAACC,IAAF,GAASC,MAAT,GAAkB,CAAxC,EAAxB,C;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQC,KAAR,EAAeC,OAAf,UAA4B,EAAEF,KAAK,EAALA,KAAF,EAASC,KAAK,EAALA,KAAT,EAAgBC,OAAO,EAAPA,OAAhB,EAA5B,EAAjB,C;;AAEA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,IAAP,4BAAsBD,IAAtB,IAA4BC,IAAI,EAAJA,IAA5B,KAAxB,C;;AAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAAAC,OAAO,UAAI,UAAAC,cAAc;AACnD,oBAAED,OAAF,EAAW,CAAC,aAAIE,SAAS,CAACD,cAAD,CAAb,CAAD,EAAiC,gBAAOE,kBAAP,CAAjC,CAAX,CADmD,GAAlB,EAA5B,C;;AAGA,IAAMD,SAAS,GAAG,SAAZA,SAAY,CAAAE,cAAc,UAAI,UAAAP,IAAI;AAC7CA,MAAAA,IAAI,CAACF,OAAL,CAAaS,cAAb,IAA+B,IAA/B,GAAsCR,eAAe,CAACC,IAAD,EAAOO,cAAP,CADR,GAAR,EAAhC,C","sourcesContent":["import { filter, map } from \"lodash/fp\"\nimport { $, isSomething } from \"./index\"\n\nexport const stringNotEmpty = s => isSomething(s) && s.trim().length > 0\n\nexport const makerule = (field, error, isValid) => ({ field, error, isValid })\n\nexport const validationError = (rule, item) => ({ ...rule, item })\n\nexport const applyRuleSet = ruleSet => itemToValidate =>\n $(ruleSet, [map(applyRule(itemToValidate)), filter(isSomething)])\n\nexport const applyRule = itemTovalidate => rule =>\n rule.isValid(itemTovalidate) ? null : validationError(rule, itemTovalidate)\n"],"file":"validationCommon.js"} \ No newline at end of file +{"version":3,"sources":["../../src/common/validationCommon.js"],"names":["stringNotEmpty","s","trim","length","makerule","field","error","isValid","validationError","rule","item","applyRuleSet","ruleSet","itemToValidate","applyRule","isSomething","itemTovalidate"],"mappings":"wXAAA;AACA,gC;;AAEO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAAAC,CAAC,UAAI,wBAAYA,CAAZ,KAAkBA,CAAC,CAACC,IAAF,GAASC,MAAT,GAAkB,CAAxC,EAAxB,C;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQC,KAAR,EAAeC,OAAf,UAA4B,EAAEF,KAAK,EAALA,KAAF,EAASC,KAAK,EAALA,KAAT,EAAgBC,OAAO,EAAPA,OAAhB,EAA5B,EAAjB,C;;AAEA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,IAAP,4BAAsBD,IAAtB,IAA4BC,IAAI,EAAJA,IAA5B,KAAxB,C;;AAEA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAAAC,OAAO,UAAI,UAAAC,cAAc;AACnD,oBAAED,OAAF,EAAW,CAAC,aAAIE,SAAS,CAACD,cAAD,CAAb,CAAD,EAAiC,gBAAOE,kBAAP,CAAjC,CAAX,CADmD,GAAlB,EAA5B,C;;AAGA,IAAMD,SAAS,GAAG,SAAZA,SAAY,CAAAE,cAAc,UAAI,UAAAP,IAAI;AAC7CA,MAAAA,IAAI,CAACF,OAAL,CAAaS,cAAb,IAA+B,IAA/B,GAAsCR,eAAe,CAACC,IAAD,EAAOO,cAAP,CADR,GAAR,EAAhC,C","sourcesContent":["import { filter, map } from \"lodash/fp\"\r\nimport { $, isSomething } from \"./index\"\r\n\r\nexport const stringNotEmpty = s => isSomething(s) && s.trim().length > 0\r\n\r\nexport const makerule = (field, error, isValid) => ({ field, error, isValid })\r\n\r\nexport const validationError = (rule, item) => ({ ...rule, item })\r\n\r\nexport const applyRuleSet = ruleSet => itemToValidate =>\r\n $(ruleSet, [map(applyRule(itemToValidate)), filter(isSomething)])\r\n\r\nexport const applyRule = itemTovalidate => rule =>\r\n rule.isValid(itemTovalidate) ? null : validationError(rule, itemTovalidate)\r\n"],"file":"validationCommon.js"} \ No newline at end of file diff --git a/packages/common/lib/index.js.map b/packages/common/lib/index.js.map index 5b622752d3..b85820dd03 100644 --- a/packages/common/lib/index.js.map +++ b/packages/common/lib/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/index.js"],"names":[],"mappings":"kpBAAA;AACA;AACA;AACA","sourcesContent":["export { validateRecord } from \"./records/validateRecord\";\nexport { events } from \"./common/events\";\nexport { safeParseField } from \"./schema/types\";\nexport { default as schemaValidator } from \"./schemaValidation\";"],"file":"index.js"} \ No newline at end of file +{"version":3,"sources":["../src/index.js"],"names":[],"mappings":"kpBAAA;AACA;AACA;AACA","sourcesContent":["export { validateRecord } from \"./records/validateRecord\";\r\nexport { events } from \"./common/events\";\r\nexport { safeParseField } from \"./schema/types\";\r\nexport { default as schemaValidator } from \"./schemaValidation\";"],"file":"index.js"} \ No newline at end of file diff --git a/packages/common/lib/records/getNewRecord.js b/packages/common/lib/records/getNewRecord.js index b0634d6264..13f9df10f0 100644 --- a/packages/common/lib/records/getNewRecord.js +++ b/packages/common/lib/records/getNewRecord.js @@ -1,17 +1,16 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.getNewRecord = void 0;var _shortid = require("shortid"); -var _types = require("../schema/types");function _createForOfIteratorHelper(o) {if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {var i = 0;var F = function F() {};return { s: F, n: function n() {if (i >= o.length) return { done: true };return { done: false, value: o[i++] };}, e: function e(_e) {throw _e;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var it,normalCompletion = true,didErr = false,err;return { s: function s() {it = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e2) {didErr = true;err = _e2;}, f: function f() {try {if (!normalCompletion && it["return"] != null) it["return"]();} finally {if (didErr) throw err;}} };}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;} var getNewRecord = function getNewRecord(schema, modelName) { var model = schema.findModel(modelName); var record = { _id: (0, _shortid.generate)(), - _modelId: model.id };var _iterator = _createForOfIteratorHelper( + modelId: model._id }; - model.fields),_step;try {for (_iterator.s(); !(_step = _iterator.n()).done;) {var field = _step.value; - record[field.name] = (0, _types.getNewFieldValue)(field); - }} catch (err) {_iterator.e(err);} finally {_iterator.f();} + for (var field in model.schema.properties) { + record[field] = field["default"]; + } return record; };exports.getNewRecord = getNewRecord; diff --git a/packages/common/lib/records/getNewRecord.js.map b/packages/common/lib/records/getNewRecord.js.map index 5c9a88d2a6..c693ff3589 100644 --- a/packages/common/lib/records/getNewRecord.js.map +++ b/packages/common/lib/records/getNewRecord.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/records/getNewRecord.js"],"names":["getNewRecord","schema","modelName","model","findModel","record","_id","_modelId","id","fields","field","name"],"mappings":"yGAAA;AACA,wC;;AAEO,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,MAAD,EAASC,SAAT,EAAuB;AACjD,MAAMC,KAAK,GAAGF,MAAM,CAACG,SAAP,CAAiBF,SAAjB,CAAd;;AAEA,MAAMG,MAAM,GAAG;AACbC,IAAAA,GAAG,EAAE,wBADQ;AAEbC,IAAAA,QAAQ,EAAEJ,KAAK,CAACK,EAFH,EAAf,CAHiD;;;AAQ/BL,EAAAA,KAAK,CAACM,MARyB,aAQjD,oDAAgC,KAAvBC,KAAuB;AAC9BL,MAAAA,MAAM,CAACK,KAAK,CAACC,IAAP,CAAN,GAAqB,6BAAiBD,KAAjB,CAArB;AACD,KAVgD;;AAYjD,SAAOL,MAAP;AACD,CAbM,C","sourcesContent":["import { generate } from \"shortid\"\nimport { getNewFieldValue } from \"../schema/types\"\n\nexport const getNewRecord = (schema, modelName) => {\n const model = schema.findModel(modelName)\n\n const record = {\n _id: generate(),\n _modelId: model.id,\n }\n\n for (let field of model.fields) {\n record[field.name] = getNewFieldValue(field)\n }\n\n return record\n}\n"],"file":"getNewRecord.js"} \ No newline at end of file +{"version":3,"sources":["../../src/records/getNewRecord.js"],"names":["getNewRecord","schema","modelName","model","findModel","record","_id","modelId","field","properties"],"mappings":"yGAAA;;AAEO,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,MAAD,EAASC,SAAT,EAAuB;AACjD,MAAMC,KAAK,GAAGF,MAAM,CAACG,SAAP,CAAiBF,SAAjB,CAAd;;AAEA,MAAMG,MAAM,GAAG;AACbC,IAAAA,GAAG,EAAE,wBADQ;AAEbC,IAAAA,OAAO,EAAEJ,KAAK,CAACG,GAFF,EAAf;;;AAKA,OAAK,IAAIE,KAAT,IAAkBL,KAAK,CAACF,MAAN,CAAaQ,UAA/B,EAA2C;AACzCJ,IAAAA,MAAM,CAACG,KAAD,CAAN,GAAgBA,KAAK,WAArB;AACD;;AAED,SAAOH,MAAP;AACD,CAbM,C","sourcesContent":["import { generate } from \"shortid\"\r\n\r\nexport const getNewRecord = (schema, modelName) => {\r\n const model = schema.findModel(modelName)\r\n\r\n const record = {\r\n _id: generate(),\r\n modelId: model._id,\r\n }\r\n\r\n for (let field in model.schema.properties) {\r\n record[field] = field.default\r\n }\r\n\r\n return record\r\n}\r\n"],"file":"getNewRecord.js"} \ No newline at end of file diff --git a/packages/common/lib/records/recordValidationRules.js.map b/packages/common/lib/records/recordValidationRules.js.map index 789f133bc6..b2436d7b82 100644 --- a/packages/common/lib/records/recordValidationRules.js.map +++ b/packages/common/lib/records/recordValidationRules.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/records/recordValidationRules.js"],"names":["getNewRecordValidationRule","invalidField","messageWhenInvalid","expressionWhenValid","commonRecordValidationRules","fieldNotEmpty","fieldName","fieldBetween","min","max","toString","fieldGreaterThan"],"mappings":"6JAAO,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B;AACxCC,YADwC;AAExCC,kBAFwC;AAGxCC,mBAHwC;AAIpC;AACJF,MAAAA,YAAY,EAAZA,YADI;AAEJC,MAAAA,kBAAkB,EAAlBA,kBAFI;AAGJC,MAAAA,mBAAmB,EAAnBA,mBAHI,EAJoC,GAAnC,C;;;AAUA,IAAMC,2BAA2B,GAAG;AACzCC,EAAAA,aAAa,EAAE,uBAAAC,SAAS;AACtBN,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB;AAGbA,MAAAA,SAHa,2BAGaA,SAHb,mBADJ,GADiB;;;AAQzCC,EAAAA,YAAY,EAAE,sBAACD,SAAD,EAAYE,GAAZ,EAAiBC,GAAjB;AACZT,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB,8BAEQE,GAAG,CAACE,QAAJ,EAFR,kBAE8BD,GAAG,CAACC,QAAJ,EAF9B;AAGbJ,MAAAA,SAHa,mBAGKE,GAHL,0BAGwBF,SAHxB,mBAG0CG,GAH1C,OADd,GAR2B;;;AAezCE,EAAAA,gBAAgB,EAAE,0BAACL,SAAD,EAAYE,GAAZ,EAAiBC,GAAjB;AAChBT,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB,mCAEaE,GAAG,CAACE,QAAJ,EAFb,kBAEmCD,GAAG,CAACC,QAAJ,EAFnC;AAGbJ,MAAAA,SAHa,mBAGKE,GAHL,QADV,GAfuB,EAApC,C","sourcesContent":["export const getNewRecordValidationRule = (\n invalidField,\n messageWhenInvalid,\n expressionWhenValid\n) => ({\n invalidField,\n messageWhenInvalid,\n expressionWhenValid,\n})\n\nexport const commonRecordValidationRules = {\n fieldNotEmpty: fieldName =>\n getNewRecordValidationRule(\n fieldName,\n `${fieldName} is empty`,\n `record['${fieldName}'] && record['${fieldName}'].length > 0`\n ),\n\n fieldBetween: (fieldName, min, max) =>\n getNewRecordValidationRule(\n fieldName,\n `${fieldName} must be between ${min.toString()} and ${max.toString()}`,\n `record['${fieldName}'] >= ${min} && record['${fieldName}'] <= ${max} `\n ),\n\n fieldGreaterThan: (fieldName, min, max) =>\n getNewRecordValidationRule(\n fieldName,\n `${fieldName} must be greater than ${min.toString()} and ${max.toString()}`,\n `record['${fieldName}'] >= ${min} `\n ),\n}\n"],"file":"recordValidationRules.js"} \ No newline at end of file +{"version":3,"sources":["../../src/records/recordValidationRules.js"],"names":["getNewRecordValidationRule","invalidField","messageWhenInvalid","expressionWhenValid","commonRecordValidationRules","fieldNotEmpty","fieldName","fieldBetween","min","max","toString","fieldGreaterThan"],"mappings":"6JAAO,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B;AACxCC,YADwC;AAExCC,kBAFwC;AAGxCC,mBAHwC;AAIpC;AACJF,MAAAA,YAAY,EAAZA,YADI;AAEJC,MAAAA,kBAAkB,EAAlBA,kBAFI;AAGJC,MAAAA,mBAAmB,EAAnBA,mBAHI,EAJoC,GAAnC,C;;;AAUA,IAAMC,2BAA2B,GAAG;AACzCC,EAAAA,aAAa,EAAE,uBAAAC,SAAS;AACtBN,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB;AAGbA,MAAAA,SAHa,2BAGaA,SAHb,mBADJ,GADiB;;;AAQzCC,EAAAA,YAAY,EAAE,sBAACD,SAAD,EAAYE,GAAZ,EAAiBC,GAAjB;AACZT,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB,8BAEQE,GAAG,CAACE,QAAJ,EAFR,kBAE8BD,GAAG,CAACC,QAAJ,EAF9B;AAGbJ,MAAAA,SAHa,mBAGKE,GAHL,0BAGwBF,SAHxB,mBAG0CG,GAH1C,OADd,GAR2B;;;AAezCE,EAAAA,gBAAgB,EAAE,0BAACL,SAAD,EAAYE,GAAZ,EAAiBC,GAAjB;AAChBT,MAAAA,0BAA0B;AACxBM,MAAAA,SADwB;AAErBA,MAAAA,SAFqB,mCAEaE,GAAG,CAACE,QAAJ,EAFb,kBAEmCD,GAAG,CAACC,QAAJ,EAFnC;AAGbJ,MAAAA,SAHa,mBAGKE,GAHL,QADV,GAfuB,EAApC,C","sourcesContent":["export const getNewRecordValidationRule = (\r\n invalidField,\r\n messageWhenInvalid,\r\n expressionWhenValid\r\n) => ({\r\n invalidField,\r\n messageWhenInvalid,\r\n expressionWhenValid,\r\n})\r\n\r\nexport const commonRecordValidationRules = {\r\n fieldNotEmpty: fieldName =>\r\n getNewRecordValidationRule(\r\n fieldName,\r\n `${fieldName} is empty`,\r\n `record['${fieldName}'] && record['${fieldName}'].length > 0`\r\n ),\r\n\r\n fieldBetween: (fieldName, min, max) =>\r\n getNewRecordValidationRule(\r\n fieldName,\r\n `${fieldName} must be between ${min.toString()} and ${max.toString()}`,\r\n `record['${fieldName}'] >= ${min} && record['${fieldName}'] <= ${max} `\r\n ),\r\n\r\n fieldGreaterThan: (fieldName, min, max) =>\r\n getNewRecordValidationRule(\r\n fieldName,\r\n `${fieldName} must be greater than ${min.toString()} and ${max.toString()}`,\r\n `record['${fieldName}'] >= ${min} `\r\n ),\r\n}\r\n"],"file":"recordValidationRules.js"} \ No newline at end of file diff --git a/packages/common/lib/records/validateRecord.js.map b/packages/common/lib/records/validateRecord.js.map index 450ecedab3..84a6151205 100644 --- a/packages/common/lib/records/validateRecord.js.map +++ b/packages/common/lib/records/validateRecord.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/records/validateRecord.js"],"names":["fieldParseError","fieldName","value","fields","message","validateAllFieldParse","record","model","f","name","parseResult","errors","success","push","validateAllTypeConstraints","field","isNonEmptyString","m","e","runRecordValidationRules","runValidationRule","rule","isValid","expressionWhenValid","expressionContext","valid","invalidFields","messageWhenInvalid","validationRules","flatten","r","validateRecord","schema","findModel","_modelId","fieldParseFails","recordValidationRuleFails","typeContraintFails"],"mappings":"2GAAA;AACA;AACA;;;;AAIA,4C;;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,SAAD,EAAYC,KAAZ,UAAuB;AAC7CC,IAAAA,MAAM,EAAE,CAACF,SAAD,CADqC;AAE7CG,IAAAA,OAAO,kCAA2BH,SAA3B,cAAwCC,KAAxC,CAFsC,EAAvB,EAAxB;;;AAKA,IAAMG,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,MAAD,EAASC,KAAT;AAC5B,mBAAEA,KAAK,CAACJ,MAAR,EAAgB;AACd,iBAAI,UAAAK,CAAC,UAAK,EAAEC,IAAI,EAAED,CAAC,CAACC,IAAV,EAAgBC,WAAW,EAAE,+BAAmBF,CAAnB,EAAsBF,MAAtB,CAA7B,EAAL,EAAL,CADc;AAEd,oBAAO,UAACK,MAAD,EAASH,CAAT,EAAe;AACpB,UAAIA,CAAC,CAACE,WAAF,CAAcE,OAAlB,EAA2B,OAAOD,MAAP;AAC3BA,MAAAA,MAAM,CAACE,IAAP,CAAYb,eAAe,CAACQ,CAAC,CAACC,IAAH,EAASD,CAAC,CAACE,WAAF,CAAcR,KAAvB,CAA3B;AACA,aAAOS,MAAP;AACD,KAJD,EAIG,EAJH,CAFc,CAAhB,CAD4B,GAA9B;;;AAUA,IAAMG,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACR,MAAD,EAASC,KAAT,EAAmB;AACpD,MAAMI,MAAM,GAAG,EAAf,CADoD;AAEhCJ,EAAAA,KAAK,CAACJ,MAF0B,+CAEzCY,KAFyC;AAGlD,qBAAE,oCAAwBA,KAAxB,EAA+BT,MAA/B,CAAF,EAA0C;AACxC,sBAAOU,wBAAP,CADwC;AAExC,mBAAI,UAAAC,CAAC,UAAK,EAAEb,OAAO,EAAEa,CAAX,EAAcd,MAAM,EAAE,CAACY,KAAK,CAACN,IAAP,CAAtB,EAAL,EAAL,CAFwC;AAGxC,oBAAK,UAAAS,CAAC,UAAIP,MAAM,CAACE,IAAP,CAAYK,CAAZ,CAAJ,EAAN,CAHwC,CAA1C,EAHkD,EAEpD,oDAAkC;;AAMjC,KARmD;AASpD,SAAOP,MAAP;AACD,CAVD;;AAYA,IAAMQ,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACb,MAAD,EAASC,KAAT,EAAmB;AAClD,MAAMa,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,IAAI,EAAI;AAChC,QAAMC,OAAO,GAAG,8BAAYD,IAAI,CAACE,mBAAjB,CAAhB;AACA,QAAMC,iBAAiB,GAAG,EAAElB,MAAM,EAANA,MAAF,EAA1B;AACA,WAAOgB,OAAO,CAACE,iBAAD,CAAP;AACH,MAAEC,KAAK,EAAE,IAAT,EADG;AAEH;AACEA,MAAAA,KAAK,EAAE,KADT;AAEEtB,MAAAA,MAAM,EAAEkB,IAAI,CAACK,aAFf;AAGEtB,MAAAA,OAAO,EAAEiB,IAAI,CAACM,kBAHhB,EAFJ;;AAOD,GAVD;;AAYA,SAAO,eAAEpB,KAAK,CAACqB,eAAR,EAAyB;AAC9B,eAAIR,iBAAJ,CAD8B;AAE9BS,aAF8B;AAG9B,kBAAO,UAAAC,CAAC,UAAIA,CAAC,CAACL,KAAF,KAAY,KAAhB,EAAR,CAH8B;AAI9B,eAAI,UAAAK,CAAC,UAAK,EAAE3B,MAAM,EAAE2B,CAAC,CAAC3B,MAAZ,EAAoBC,OAAO,EAAE0B,CAAC,CAAC1B,OAA/B,EAAL,EAAL,CAJ8B,CAAzB,CAAP;;AAMD,CAnBD;;AAqBO,IAAM2B,cAAc,GAAG,SAAjBA,cAAiB,CAACC,MAAD,EAAS1B,MAAT,EAAoB;AAChD,MAAMC,KAAK,GAAGyB,MAAM,CAACC,SAAP,CAAiB3B,MAAM,CAAC4B,QAAxB,CAAd;AACA,MAAMC,eAAe,GAAG9B,qBAAqB,CAACC,MAAD,EAASC,KAAT,CAA7C;;AAEA;AACA,MAAI,CAAC,iBAAQ4B,eAAR,CAAL,EAA+B;AAC7B,WAAO,EAAEb,OAAO,EAAE,KAAX,EAAkBX,MAAM,EAAEwB,eAA1B,EAAP;AACD;;AAED,MAAMC,yBAAyB,GAAGjB,wBAAwB,CAACb,MAAD,EAASC,KAAT,CAA1D;AACA,MAAM8B,kBAAkB,GAAGvB,0BAA0B,CAACR,MAAD,EAASC,KAAT,CAArD;;AAEA;AACE,mBAAQ4B,eAAR;AACA,mBAAQC,yBAAR,CADA;AAEA,mBAAQC,kBAAR,CAHF;AAIE;AACA,WAAO,EAAEf,OAAO,EAAE,IAAX,EAAiBX,MAAM,EAAE,EAAzB,EAAP;AACD;;AAED,SAAO;AACLW,IAAAA,OAAO,EAAE,KADJ;AAELX,IAAAA,MAAM,EAAE;AACNwB,IAAAA,eADM;AAENE,IAAAA,kBAFM;AAGND,IAAAA,yBAHM,CAFH,EAAP;;;AAQD,CA5BM,C","sourcesContent":["import { map, reduce, filter, isEmpty, flatten, each, union } from \"lodash/fp\";\nimport { compileCode } from \"../common/compileCode\";\nimport {\n validateFieldParse,\n validateTypeConstraints,\n} from \"../schema/types/index.js\"\nimport { $, isNonEmptyString } from \"../common/index.js\"\n\nconst fieldParseError = (fieldName, value) => ({\n fields: [fieldName],\n message: `Could not parse field ${fieldName}:${value}`,\n})\n\nconst validateAllFieldParse = (record, model) =>\n $(model.fields, [\n map(f => ({ name: f.name, parseResult: validateFieldParse(f, record) })),\n reduce((errors, f) => {\n if (f.parseResult.success) return errors\n errors.push(fieldParseError(f.name, f.parseResult.value))\n return errors\n }, []),\n ])\n\nconst validateAllTypeConstraints = (record, model) => {\n const errors = []\n for (const field of model.fields) {\n $(validateTypeConstraints(field, record), [\n filter(isNonEmptyString),\n map(m => ({ message: m, fields: [field.name] })),\n each(e => errors.push(e)),\n ])\n }\n return errors\n}\n\nconst runRecordValidationRules = (record, model) => {\n const runValidationRule = rule => {\n const isValid = compileCode(rule.expressionWhenValid)\n const expressionContext = { record }\n return isValid(expressionContext)\n ? { valid: true }\n : {\n valid: false,\n fields: rule.invalidFields,\n message: rule.messageWhenInvalid,\n }\n }\n\n return $(model.validationRules, [\n map(runValidationRule),\n flatten,\n filter(r => r.valid === false),\n map(r => ({ fields: r.fields, message: r.message })),\n ])\n}\n\nexport const validateRecord = (schema, record) => {\n const model = schema.findModel(record._modelId)\n const fieldParseFails = validateAllFieldParse(record, model)\n\n // non parsing would cause further issues - exit here\n if (!isEmpty(fieldParseFails)) {\n return { isValid: false, errors: fieldParseFails }\n }\n\n const recordValidationRuleFails = runRecordValidationRules(record, model)\n const typeContraintFails = validateAllTypeConstraints(record, model)\n\n if (\n isEmpty(fieldParseFails) &&\n isEmpty(recordValidationRuleFails) &&\n isEmpty(typeContraintFails)\n ) {\n return { isValid: true, errors: [] }\n }\n\n return {\n isValid: false,\n errors: union(\n fieldParseFails,\n typeContraintFails,\n recordValidationRuleFails\n ),\n }\n}\n"],"file":"validateRecord.js"} \ No newline at end of file +{"version":3,"sources":["../../src/records/validateRecord.js"],"names":["fieldParseError","fieldName","value","fields","message","validateAllFieldParse","record","model","f","name","parseResult","errors","success","push","validateAllTypeConstraints","field","isNonEmptyString","m","e","runRecordValidationRules","runValidationRule","rule","isValid","expressionWhenValid","expressionContext","valid","invalidFields","messageWhenInvalid","validationRules","flatten","r","validateRecord","schema","findModel","_modelId","fieldParseFails","recordValidationRuleFails","typeContraintFails"],"mappings":"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","sourcesContent":["import { map, reduce, filter, isEmpty, flatten, each, union } from \"lodash/fp\";\r\nimport { compileCode } from \"../common/compileCode\";\r\nimport {\r\n validateFieldParse,\r\n validateTypeConstraints,\r\n} from \"../schema/types/index.js\"\r\nimport { $, isNonEmptyString } from \"../common/index.js\"\r\n\r\nconst fieldParseError = (fieldName, value) => ({\r\n fields: [fieldName],\r\n message: `Could not parse field ${fieldName}:${value}`,\r\n})\r\n\r\nconst validateAllFieldParse = (record, model) =>\r\n $(model.fields, [\r\n map(f => ({ name: f.name, parseResult: validateFieldParse(f, record) })),\r\n reduce((errors, f) => {\r\n if (f.parseResult.success) return errors\r\n errors.push(fieldParseError(f.name, f.parseResult.value))\r\n return errors\r\n }, []),\r\n ])\r\n\r\nconst validateAllTypeConstraints = (record, model) => {\r\n const errors = []\r\n for (const field of model.fields) {\r\n $(validateTypeConstraints(field, record), [\r\n filter(isNonEmptyString),\r\n map(m => ({ message: m, fields: [field.name] })),\r\n each(e => errors.push(e)),\r\n ])\r\n }\r\n return errors\r\n}\r\n\r\nconst runRecordValidationRules = (record, model) => {\r\n const runValidationRule = rule => {\r\n const isValid = compileCode(rule.expressionWhenValid)\r\n const expressionContext = { record }\r\n return isValid(expressionContext)\r\n ? { valid: true }\r\n : {\r\n valid: false,\r\n fields: rule.invalidFields,\r\n message: rule.messageWhenInvalid,\r\n }\r\n }\r\n\r\n return $(model.validationRules, [\r\n map(runValidationRule),\r\n flatten,\r\n filter(r => r.valid === false),\r\n map(r => ({ fields: r.fields, message: r.message })),\r\n ])\r\n}\r\n\r\nexport const validateRecord = (schema, record) => {\r\n const model = schema.findModel(record._modelId)\r\n const fieldParseFails = validateAllFieldParse(record, model)\r\n\r\n // non parsing would cause further issues - exit here\r\n if (!isEmpty(fieldParseFails)) {\r\n return { isValid: false, errors: fieldParseFails }\r\n }\r\n\r\n const recordValidationRuleFails = runRecordValidationRules(record, model)\r\n const typeContraintFails = validateAllTypeConstraints(record, model)\r\n\r\n if (\r\n isEmpty(fieldParseFails) &&\r\n isEmpty(recordValidationRuleFails) &&\r\n isEmpty(typeContraintFails)\r\n ) {\r\n return { isValid: true, errors: [] }\r\n }\r\n\r\n return {\r\n isValid: false,\r\n errors: union(\r\n fieldParseFails,\r\n typeContraintFails,\r\n recordValidationRuleFails\r\n ),\r\n }\r\n}\r\n"],"file":"validateRecord.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/createActions.js.map b/packages/common/lib/schema/createActions.js.map index 2362409748..2c0777b2d0 100644 --- a/packages/common/lib/schema/createActions.js.map +++ b/packages/common/lib/schema/createActions.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schema/createActions.js"],"names":["createTrigger","actionName","eventName","optionsCreator","condition","createAction","name","behaviourSource","behaviourName","initialOptions"],"mappings":"iIAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,WAAO;AAClCC,IAAAA,UAAU,EAAE,EADsB;AAElCC,IAAAA,SAAS,EAAE,EAFuB;AAGlC;AACA;AACA;AACAC,IAAAA,cAAc,EAAE,EANkB;AAOlC;AACA;AACAC,IAAAA,SAAS,EAAE,EATuB,EAAP,EAAtB,C;;;AAYA,IAAMC,YAAY,GAAG,SAAfA,YAAe,WAAO;AACjCC,IAAAA,IAAI,EAAE,EAD2B;AAEjCC,IAAAA,eAAe,EAAE,EAFgB;AAGjC;AACAC,IAAAA,aAAa,EAAE,EAJkB;AAKjC;AACA;AACA;AACAC,IAAAA,cAAc,EAAE,EARiB,EAAP,EAArB,C","sourcesContent":["export const createTrigger = () => ({\n actionName: \"\",\n eventName: \"\",\n // function, has access to event context,\n // returns object that is used as parameter to action\n // only used if triggered by event\n optionsCreator: \"\",\n // action runs if true,\n // has access to event context\n condition: \"\",\n})\n\nexport const createAction = () => ({\n name: \"\",\n behaviourSource: \"\",\n // name of function in actionSource\n behaviourName: \"\",\n // parameter passed into behaviour.\n // any other parms passed at runtime e.g.\n // by trigger, or manually, will be merged into this\n initialOptions: {},\n})\n"],"file":"createActions.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schema/createActions.js"],"names":["createTrigger","actionName","eventName","optionsCreator","condition","createAction","name","behaviourSource","behaviourName","initialOptions"],"mappings":"iIAAO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,WAAO;AAClCC,IAAAA,UAAU,EAAE,EADsB;AAElCC,IAAAA,SAAS,EAAE,EAFuB;AAGlC;AACA;AACA;AACAC,IAAAA,cAAc,EAAE,EANkB;AAOlC;AACA;AACAC,IAAAA,SAAS,EAAE,EATuB,EAAP,EAAtB,C;;;AAYA,IAAMC,YAAY,GAAG,SAAfA,YAAe,WAAO;AACjCC,IAAAA,IAAI,EAAE,EAD2B;AAEjCC,IAAAA,eAAe,EAAE,EAFgB;AAGjC;AACAC,IAAAA,aAAa,EAAE,EAJkB;AAKjC;AACA;AACA;AACAC,IAAAA,cAAc,EAAE,EARiB,EAAP,EAArB,C","sourcesContent":["export const createTrigger = () => ({\r\n actionName: \"\",\r\n eventName: \"\",\r\n // function, has access to event context,\r\n // returns object that is used as parameter to action\r\n // only used if triggered by event\r\n optionsCreator: \"\",\r\n // action runs if true,\r\n // has access to event context\r\n condition: \"\",\r\n})\r\n\r\nexport const createAction = () => ({\r\n name: \"\",\r\n behaviourSource: \"\",\r\n // name of function in actionSource\r\n behaviourName: \"\",\r\n // parameter passed into behaviour.\r\n // any other parms passed at runtime e.g.\r\n // by trigger, or manually, will be merged into this\r\n initialOptions: {},\r\n})\r\n"],"file":"createActions.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/fields.js.map b/packages/common/lib/schema/fields.js.map index db27a134e4..968b44c38a 100644 --- a/packages/common/lib/schema/fields.js.map +++ b/packages/common/lib/schema/fields.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schema/fields.js"],"names":["fieldErrors","AddFieldValidationFailed","allowedTypes","all","getNewField","type","id","name","typeOptions","label","getInitialValue","getUndefinedValue","fieldRules","allFields","f","t","typeOptionsRules","field","def","optName","optionDefinitions","keys","o","isValid","requirementDescription","validateField","everySingleField","validateAllFields","recordNode","fields","flatten","addField","recordTemplate","validationMessages","length","errors","m","error","BadRequestError","join","push"],"mappings":"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","sourcesContent":["import { some, map, filter, keys, includes, countBy, flatten } from \"lodash/fp\"\nimport {\n isSomething,\n $,\n isNonEmptyString,\n isNothingOrEmpty,\n isNothing,\n} from \"../common\"\nimport { all, getDefaultOptions } from \"./types/index.js\"\nimport { applyRuleSet, makerule } from \"../common/validationCommon\"\nimport { BadRequestError } from \"../common/errors\"\nimport { generate } from \"shortid\"\n\nexport const fieldErrors = {\n AddFieldValidationFailed: \"Add field validation: \",\n}\n\nexport const allowedTypes = () => keys(all)\n\nexport const getNewField = type => ({\n id: generate(),\n name: \"\", // how field is referenced internally\n type,\n typeOptions: getDefaultOptions(type),\n label: \"\", // how field is displayed\n getInitialValue: \"default\", // function that gets value when initially created\n getUndefinedValue: \"default\", // function that gets value when field undefined on record\n})\n\nconst fieldRules = allFields => [\n makerule(\"name\", \"field name is not set\", f => isNonEmptyString(f.name)),\n makerule(\"type\", \"field type is not set\", f => isNonEmptyString(f.type)),\n makerule(\"label\", \"field label is not set\", f => isNonEmptyString(f.label)),\n makerule(\"getInitialValue\", \"getInitialValue function is not set\", f =>\n isNonEmptyString(f.getInitialValue)\n ),\n makerule(\"getUndefinedValue\", \"getUndefinedValue function is not set\", f =>\n isNonEmptyString(f.getUndefinedValue)\n ),\n makerule(\n \"name\",\n \"field name is duplicated\",\n f => isNothingOrEmpty(f.name) || countBy(\"name\")(allFields)[f.name] === 1\n ),\n makerule(\n \"type\",\n \"type is unknown\",\n f => isNothingOrEmpty(f.type) || some(t => f.type === t)(allowedTypes())\n ),\n]\n\nconst typeOptionsRules = field => {\n const type = all[field.type]\n if (isNothing(type)) return []\n\n const def = optName => type.optionDefinitions[optName]\n\n return $(field.typeOptions, [\n keys,\n filter(o => isSomething(def(o)) && isSomething(def(o).isValid)),\n map(o =>\n makerule(`typeOptions.${o}`, `${def(o).requirementDescription}`, field =>\n def(o).isValid(field.typeOptions[o])\n )\n ),\n ])\n}\n\nexport const validateField = allFields => field => {\n const everySingleField = includes(field)(allFields)\n ? allFields\n : [...allFields, field]\n return applyRuleSet([\n ...fieldRules(everySingleField),\n ...typeOptionsRules(field),\n ])(field)\n}\n\nexport const validateAllFields = recordNode =>\n $(recordNode.fields, [map(validateField(recordNode.fields)), flatten])\n\nexport const addField = (recordTemplate, field) => {\n if (isNothingOrEmpty(field.label)) {\n field.label = field.name\n }\n const validationMessages = validateField([...recordTemplate.fields, field])(\n field\n )\n if (validationMessages.length > 0) {\n const errors = map(m => m.error)(validationMessages)\n throw new BadRequestError(\n `${fieldErrors.AddFieldValidationFailed} ${errors.join(\", \")}`\n )\n }\n recordTemplate.fields.push(field)\n}\n"],"file":"fields.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schema/fields.js"],"names":["fieldErrors","AddFieldValidationFailed","allowedTypes","all","getNewField","type","id","name","typeOptions","label","getInitialValue","getUndefinedValue","fieldRules","allFields","f","t","typeOptionsRules","field","def","optName","optionDefinitions","keys","o","isValid","requirementDescription","validateField","everySingleField","validateAllFields","recordNode","fields","flatten","addField","recordTemplate","validationMessages","length","errors","m","error","BadRequestError","join","push"],"mappings":"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","sourcesContent":["import { some, map, filter, keys, includes, countBy, flatten } from \"lodash/fp\"\r\nimport {\r\n isSomething,\r\n $,\r\n isNonEmptyString,\r\n isNothingOrEmpty,\r\n isNothing,\r\n} from \"../common\"\r\nimport { all, getDefaultOptions } from \"./types/index.js\"\r\nimport { applyRuleSet, makerule } from \"../common/validationCommon\"\r\nimport { BadRequestError } from \"../common/errors\"\r\nimport { generate } from \"shortid\"\r\n\r\nexport const fieldErrors = {\r\n AddFieldValidationFailed: \"Add field validation: \",\r\n}\r\n\r\nexport const allowedTypes = () => keys(all)\r\n\r\nexport const getNewField = type => ({\r\n id: generate(),\r\n name: \"\", // how field is referenced internally\r\n type,\r\n typeOptions: getDefaultOptions(type),\r\n label: \"\", // how field is displayed\r\n getInitialValue: \"default\", // function that gets value when initially created\r\n getUndefinedValue: \"default\", // function that gets value when field undefined on record\r\n})\r\n\r\nconst fieldRules = allFields => [\r\n makerule(\"name\", \"field name is not set\", f => isNonEmptyString(f.name)),\r\n makerule(\"type\", \"field type is not set\", f => isNonEmptyString(f.type)),\r\n makerule(\"label\", \"field label is not set\", f => isNonEmptyString(f.label)),\r\n makerule(\"getInitialValue\", \"getInitialValue function is not set\", f =>\r\n isNonEmptyString(f.getInitialValue)\r\n ),\r\n makerule(\"getUndefinedValue\", \"getUndefinedValue function is not set\", f =>\r\n isNonEmptyString(f.getUndefinedValue)\r\n ),\r\n makerule(\r\n \"name\",\r\n \"field name is duplicated\",\r\n f => isNothingOrEmpty(f.name) || countBy(\"name\")(allFields)[f.name] === 1\r\n ),\r\n makerule(\r\n \"type\",\r\n \"type is unknown\",\r\n f => isNothingOrEmpty(f.type) || some(t => f.type === t)(allowedTypes())\r\n ),\r\n]\r\n\r\nconst typeOptionsRules = field => {\r\n const type = all[field.type]\r\n if (isNothing(type)) return []\r\n\r\n const def = optName => type.optionDefinitions[optName]\r\n\r\n return $(field.typeOptions, [\r\n keys,\r\n filter(o => isSomething(def(o)) && isSomething(def(o).isValid)),\r\n map(o =>\r\n makerule(`typeOptions.${o}`, `${def(o).requirementDescription}`, field =>\r\n def(o).isValid(field.typeOptions[o])\r\n )\r\n ),\r\n ])\r\n}\r\n\r\nexport const validateField = allFields => field => {\r\n const everySingleField = includes(field)(allFields)\r\n ? allFields\r\n : [...allFields, field]\r\n return applyRuleSet([\r\n ...fieldRules(everySingleField),\r\n ...typeOptionsRules(field),\r\n ])(field)\r\n}\r\n\r\nexport const validateAllFields = recordNode =>\r\n $(recordNode.fields, [map(validateField(recordNode.fields)), flatten])\r\n\r\nexport const addField = (recordTemplate, field) => {\r\n if (isNothingOrEmpty(field.label)) {\r\n field.label = field.name\r\n }\r\n const validationMessages = validateField([...recordTemplate.fields, field])(\r\n field\r\n )\r\n if (validationMessages.length > 0) {\r\n const errors = map(m => m.error)(validationMessages)\r\n throw new BadRequestError(\r\n `${fieldErrors.AddFieldValidationFailed} ${errors.join(\", \")}`\r\n )\r\n }\r\n recordTemplate.fields.push(field)\r\n}\r\n"],"file":"fields.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/fullSchema.js.map b/packages/common/lib/schema/fullSchema.js.map index 5eece533a2..2ed48241a5 100644 --- a/packages/common/lib/schema/fullSchema.js.map +++ b/packages/common/lib/schema/fullSchema.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schema/fullSchema.js"],"names":["fullSchema","models","views","findModel","idOrName","find","m","id","name","toLowerCase","findView","findField","modelIdOrName","fieldName","model","fields","f","viewsForModel","modelId","filter","v"],"mappings":"uGAAO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,MAAD,EAASC,KAAT,EAAmB;AAC3C,MAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AACxBH,MAAAA,MAAM,CAACI,IAAP;AACE,gBAAAC,CAAC,UAAIA,CAAC,CAACC,EAAF,KAASH,QAAT,IAAqBE,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBL,QAAQ,CAACK,WAAT,EAAlD,EADH,CADwB,GAA1B;;;AAKA,MAAMC,QAAQ,GAAG,SAAXA,QAAW,CAAAN,QAAQ;AACvBF,MAAAA,KAAK,CAACG,IAAN;AACE,gBAAAC,CAAC,UAAIA,CAAC,CAACC,EAAF,KAASH,QAAT,IAAqBE,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBL,QAAQ,CAACK,WAAT,EAAlD,EADH,CADuB,GAAzB;;;AAKA,MAAME,SAAS,GAAG,SAAZA,SAAY,CAACC,aAAD,EAAgBC,SAAhB,EAA8B;AAC9C,QAAMC,KAAK,GAAGb,MAAM,CAACI,IAAP;AACZ,cAAAC,CAAC;AACCA,QAAAA,CAAC,CAACC,EAAF,KAASK,aAAT;AACAN,QAAAA,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBG,aAAa,CAACH,WAAd,EAF1B,GADW,CAAd;;AAKA,WAAOK,KAAK,CAACC,MAAN,CAAaV,IAAb;AACL,cAAAW,CAAC,UAAIA,CAAC,CAACR,IAAF,CAAOC,WAAP,OAAyBI,SAAS,CAACJ,WAAV,EAA7B,EADI,CAAP;;AAGD,GATD;;AAWA,MAAMQ,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,OAAO,UAAIhB,KAAK,CAACiB,MAAN,CAAa,UAAAC,CAAC,UAAIA,CAAC,CAACF,OAAF,KAAcA,OAAlB,EAAd,CAAJ,EAA7B;;AAEA,SAAO;AACLjB,IAAAA,MAAM,EAANA,MADK;AAELC,IAAAA,KAAK,EAALA,KAFK;AAGLC,IAAAA,SAAS,EAATA,SAHK;AAILQ,IAAAA,SAAS,EAATA,SAJK;AAKLD,IAAAA,QAAQ,EAARA,QALK;AAMLO,IAAAA,aAAa,EAAbA,aANK,EAAP;;AAQD,CAhCM,C","sourcesContent":["export const fullSchema = (models, views) => {\n const findModel = idOrName =>\n models.find(\n m => m.id === idOrName || m.name.toLowerCase() === idOrName.toLowerCase()\n )\n\n const findView = idOrName =>\n views.find(\n m => m.id === idOrName || m.name.toLowerCase() === idOrName.toLowerCase()\n )\n\n const findField = (modelIdOrName, fieldName) => {\n const model = models.find(\n m =>\n m.id === modelIdOrName ||\n m.name.toLowerCase() === modelIdOrName.toLowerCase()\n )\n return model.fields.find(\n f => f.name.toLowerCase() === fieldName.toLowerCase()\n )\n }\n\n const viewsForModel = modelId => views.filter(v => v.modelId === modelId)\n\n return {\n models,\n views,\n findModel,\n findField,\n findView,\n viewsForModel,\n }\n}\n"],"file":"fullSchema.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schema/fullSchema.js"],"names":["fullSchema","models","views","findModel","idOrName","find","m","id","name","toLowerCase","findView","findField","modelIdOrName","fieldName","model","fields","f","viewsForModel","modelId","filter","v"],"mappings":"uGAAO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,MAAD,EAASC,KAAT,EAAmB;AAC3C,MAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,QAAQ;AACxBH,MAAAA,MAAM,CAACI,IAAP;AACE,gBAAAC,CAAC,UAAIA,CAAC,CAACC,EAAF,KAASH,QAAT,IAAqBE,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBL,QAAQ,CAACK,WAAT,EAAlD,EADH,CADwB,GAA1B;;;AAKA,MAAMC,QAAQ,GAAG,SAAXA,QAAW,CAAAN,QAAQ;AACvBF,MAAAA,KAAK,CAACG,IAAN;AACE,gBAAAC,CAAC,UAAIA,CAAC,CAACC,EAAF,KAASH,QAAT,IAAqBE,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBL,QAAQ,CAACK,WAAT,EAAlD,EADH,CADuB,GAAzB;;;AAKA,MAAME,SAAS,GAAG,SAAZA,SAAY,CAACC,aAAD,EAAgBC,SAAhB,EAA8B;AAC9C,QAAMC,KAAK,GAAGb,MAAM,CAACI,IAAP;AACZ,cAAAC,CAAC;AACCA,QAAAA,CAAC,CAACC,EAAF,KAASK,aAAT;AACAN,QAAAA,CAAC,CAACE,IAAF,CAAOC,WAAP,OAAyBG,aAAa,CAACH,WAAd,EAF1B,GADW,CAAd;;AAKA,WAAOK,KAAK,CAACC,MAAN,CAAaV,IAAb;AACL,cAAAW,CAAC,UAAIA,CAAC,CAACR,IAAF,CAAOC,WAAP,OAAyBI,SAAS,CAACJ,WAAV,EAA7B,EADI,CAAP;;AAGD,GATD;;AAWA,MAAMQ,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,OAAO,UAAIhB,KAAK,CAACiB,MAAN,CAAa,UAAAC,CAAC,UAAIA,CAAC,CAACF,OAAF,KAAcA,OAAlB,EAAd,CAAJ,EAA7B;;AAEA,SAAO;AACLjB,IAAAA,MAAM,EAANA,MADK;AAELC,IAAAA,KAAK,EAALA,KAFK;AAGLC,IAAAA,SAAS,EAATA,SAHK;AAILQ,IAAAA,SAAS,EAATA,SAJK;AAKLD,IAAAA,QAAQ,EAARA,QALK;AAMLO,IAAAA,aAAa,EAAbA,aANK,EAAP;;AAQD,CAhCM,C","sourcesContent":["export const fullSchema = (models, views) => {\r\n const findModel = idOrName =>\r\n models.find(\r\n m => m.id === idOrName || m.name.toLowerCase() === idOrName.toLowerCase()\r\n )\r\n\r\n const findView = idOrName =>\r\n views.find(\r\n m => m.id === idOrName || m.name.toLowerCase() === idOrName.toLowerCase()\r\n )\r\n\r\n const findField = (modelIdOrName, fieldName) => {\r\n const model = models.find(\r\n m =>\r\n m.id === modelIdOrName ||\r\n m.name.toLowerCase() === modelIdOrName.toLowerCase()\r\n )\r\n return model.fields.find(\r\n f => f.name.toLowerCase() === fieldName.toLowerCase()\r\n )\r\n }\r\n\r\n const viewsForModel = modelId => views.filter(v => v.modelId === modelId)\r\n\r\n return {\r\n models,\r\n views,\r\n findModel,\r\n findField,\r\n findView,\r\n viewsForModel,\r\n }\r\n}\r\n"],"file":"fullSchema.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/models.js b/packages/common/lib/schema/models.js index 4f39b50c02..5350f416a6 100644 --- a/packages/common/lib/schema/models.js +++ b/packages/common/lib/schema/models.js @@ -1,20 +1,25 @@ "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.canDeleteModel = exports.newModel = void 0;var _shortid = require("shortid");function _createForOfIteratorHelper(o) {if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {var i = 0;var F = function F() {};return { s: F, n: function n() {if (i >= o.length) return { done: true };return { done: false, value: o[i++] };}, e: function e(_e) {throw _e;}, f: F };}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var it,normalCompletion = true,didErr = false,err;return { s: function s() {it = o[Symbol.iterator]();}, n: function n() {var step = it.next();normalCompletion = step.done;return step;}, e: function e(_e2) {didErr = true;err = _e2;}, f: function f() {try {if (!normalCompletion && it["return"] != null) it["return"]();} finally {if (didErr) throw err;}} };}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;} var newModel = function newModel() {return { - id: (0, _shortid.generate)(), + _id: (0, _shortid.generate)(), name: "", - fields: [], - validationRules: [], - primaryField: "", - views: [] };}; + type: "model", + key: "name", + schema: { + type: "object", + properties: { + name: { type: "string" } }, + + required: ["name"] } };}; + /** - * - * @param {Array} models - * @param {string} modelId - * @returns {} - */exports.newModel = newModel; + * + * @param {Array} models + * @param {string} modelId + * @returns {} + */exports.newModel = newModel; var canDeleteModel = function canDeleteModel(models, modelId) { var errors = [];var _iterator = _createForOfIteratorHelper( diff --git a/packages/common/lib/schema/models.js.map b/packages/common/lib/schema/models.js.map index 506f0d734f..0ba5da05e8 100644 --- a/packages/common/lib/schema/models.js.map +++ b/packages/common/lib/schema/models.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schema/models.js"],"names":["newModel","id","name","fields","validationRules","primaryField","views","canDeleteModel","models","modelId","errors","model","links","filter","f","type","typeOptions","link","push","canDelete","length"],"mappings":"8HAAA,kC;;AAEO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,WAAO;AAC7BC,IAAAA,EAAE,EAAE,wBADyB;AAE7BC,IAAAA,IAAI,EAAE,EAFuB;AAG7BC,IAAAA,MAAM,EAAE,EAHqB;AAI7BC,IAAAA,eAAe,EAAE,EAJY;AAK7BC,IAAAA,YAAY,EAAE,EALe;AAM7BC,IAAAA,KAAK,EAAE,EANsB,EAAP,EAAjB;;;AASP;;;;;;AAMO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACC,MAAD,EAASC,OAAT,EAAqB;AACjD,MAAMC,MAAM,GAAG,EAAf,CADiD;;AAG/BF,EAAAA,MAH+B,aAGjD,oDAA0B,KAAjBG,KAAiB;AACxB,UAAMC,KAAK,GAAGD,KAAK,CAACR,MAAN,CAAaU,MAAb;AACZ,gBAAAC,CAAC,UAAIA,CAAC,CAACC,IAAF,KAAW,MAAX,IAAqBD,CAAC,CAACE,WAAF,CAAcP,OAAd,KAA0BA,OAAnD,EADW,CAAd,CADwB;;;AAKPG,MAAAA,KALO,cAKxB,uDAAwB,KAAfK,IAAe;AACtBP,UAAAA,MAAM,CAACQ,IAAP;AACUP,UAAAA,KAAK,CAACT,IADhB,uDAC+De,IAAI,CAACf,IADpE;;AAGD,SATuB;AAUzB,KAbgD;;AAejD,SAAO;AACLQ,IAAAA,MAAM,EAANA,MADK;AAELS,IAAAA,SAAS,EAAET,MAAM,CAACU,MAAP,GAAgB,CAFtB,EAAP;;AAID,CAnBM,C","sourcesContent":["import { generate } from \"shortid\"\n\nexport const newModel = () => ({\n id: generate(),\n name: \"\",\n fields: [],\n validationRules: [],\n primaryField: \"\",\n views: [],\n})\n\n/**\n *\n * @param {Array} models\n * @param {string} modelId\n * @returns {}\n */\nexport const canDeleteModel = (models, modelId) => {\n const errors = []\n\n for (let model of models) {\n const links = model.fields.filter(\n f => f.type === \"link\" && f.typeOptions.modelId === modelId\n )\n\n for (let link of links) {\n errors.push(\n `The \"${model.name}\" model links to this model, via field \"${link.name}\"`\n )\n }\n }\n\n return {\n errors,\n canDelete: errors.length > 0,\n }\n}\n"],"file":"models.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schema/models.js"],"names":["newModel","_id","name","type","key","schema","properties","required","canDeleteModel","models","modelId","errors","model","links","fields","filter","f","typeOptions","link","push","canDelete","length"],"mappings":"8HAAA,kC;;AAEO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,WAAO;AAC7BC,IAAAA,GAAG,EAAE,wBADwB;AAE7BC,IAAAA,IAAI,EAAE,EAFuB;AAG7BC,IAAAA,IAAI,EAAE,OAHuB;AAI7BC,IAAAA,GAAG,EAAE,MAJwB;AAK7BC,IAAAA,MAAM,EAAE;AACNF,MAAAA,IAAI,EAAE,QADA;AAENG,MAAAA,UAAU,EAAE;AACVJ,QAAAA,IAAI,EAAE,EAAEC,IAAI,EAAE,QAAR,EADI,EAFN;;AAKNI,MAAAA,QAAQ,EAAE,CAAC,MAAD,CALJ,EALqB,EAAP,EAAjB;;;;AAcP;;;;;;AAMO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACC,MAAD,EAASC,OAAT,EAAqB;AACjD,MAAMC,MAAM,GAAG,EAAf,CADiD;;AAG/BF,EAAAA,MAH+B,aAGjD,oDAA0B,KAAjBG,KAAiB;AACxB,UAAMC,KAAK,GAAGD,KAAK,CAACE,MAAN,CAAaC,MAAb;AACZ,gBAAAC,CAAC,UAAIA,CAAC,CAACb,IAAF,KAAW,MAAX,IAAqBa,CAAC,CAACC,WAAF,CAAcP,OAAd,KAA0BA,OAAnD,EADW,CAAd,CADwB;;;AAKPG,MAAAA,KALO,cAKxB,uDAAwB,KAAfK,IAAe;AACtBP,UAAAA,MAAM,CAACQ,IAAP;AACUP,UAAAA,KAAK,CAACV,IADhB,uDAC+DgB,IAAI,CAAChB,IADpE;;AAGD,SATuB;AAUzB,KAbgD;;AAejD,SAAO;AACLS,IAAAA,MAAM,EAANA,MADK;AAELS,IAAAA,SAAS,EAAET,MAAM,CAACU,MAAP,GAAgB,CAFtB,EAAP;;AAID,CAnBM,C","sourcesContent":["import { generate } from \"shortid\"\r\n\r\nexport const newModel = () => ({\r\n _id: generate(),\r\n name: \"\",\r\n type: \"model\",\r\n key: \"name\",\r\n schema: {\r\n type: \"object\",\r\n properties: {\r\n name: { type: \"string\" },\r\n },\r\n required: [\"name\"],\r\n },\r\n})\r\n\r\n/**\r\n *\r\n * @param {Array} models\r\n * @param {string} modelId\r\n * @returns {}\r\n */\r\nexport const canDeleteModel = (models, modelId) => {\r\n const errors = []\r\n\r\n for (let model of models) {\r\n const links = model.fields.filter(\r\n f => f.type === \"link\" && f.typeOptions.modelId === modelId\r\n )\r\n\r\n for (let link of links) {\r\n errors.push(\r\n `The \"${model.name}\" model links to this model, via field \"${link.name}\"`\r\n )\r\n }\r\n }\r\n\r\n return {\r\n errors,\r\n canDelete: errors.length > 0,\r\n }\r\n}\r\n"],"file":"models.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/array.js.map b/packages/common/lib/schema/types/array.js.map index 056ecd769d..fd7a9761e2 100644 --- a/packages/common/lib/schema/types/array.js.map +++ b/packages/common/lib/schema/types/array.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/array.js"],"names":["arrayFunctions","mapToParsedArrary","type","i","safeParseValue","parsedSuccess","arrayTryParse","isArray","defaultCase","parsedFailed","typeName","options","maxLength","defaultValue","isValid","isSafeInteger","requirementDescription","parse","toNumberOrNull","minLength","n","typeConstraints","val","opts","length","name","sampleValue","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;;;;;;;AAQA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AACrB,oCAAc;AACZ,iBAAS,kBAAS,EAAT,CADG,EAAd,CADqB,GAAvB;;;AAKA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,IAAI;AAC5B;AACE,iBAAI,UAAAC,CAAC,UAAID,IAAI,CAACE,cAAL,CAAoBD,CAApB,CAAJ,EAAL,CADF;AAEEE,8BAFF,CAD4B,GAA9B;;;AAMA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAAJ,IAAI;AACxB,2BAAW,CAACK,WAAD,EAAUN,iBAAiB,CAACC,IAAD,CAA3B,CAAX,EAA+C,CAACM,kBAAD,EAAcC,yBAAd,CAA/C,CADwB,GAA1B;;AAGA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAAAR,IAAI,0BAAaA,IAAb,QAArB;;AAEA,IAAMS,OAAO,GAAG;AACdC,EAAAA,SAAS,EAAE;AACTC,IAAAA,YAAY,EAAE,KADL;AAETC,IAAAA,OAAO,EAAEC,oBAFA;AAGTC,IAAAA,sBAAsB,EAAE,4BAHf;AAITC,IAAAA,KAAK,EAAEC,qBAJE,EADG;;AAOdC,EAAAA,SAAS,EAAE;AACTN,IAAAA,YAAY,EAAE,CADL;AAETC,IAAAA,OAAO,EAAE,iBAAAM,CAAC,UAAI,0BAAcA,CAAd,KAAoBA,CAAC,IAAI,CAA7B,EAFD;AAGTJ,IAAAA,sBAAsB,EAAE,4BAHf;AAITC,IAAAA,KAAK,EAAEC,qBAJE,EAPG,EAAhB;;;;AAeA,IAAMG,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN,UAAeD,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACE,MAAJ,IAAcD,IAAI,CAACJ,SAAlD,EADF;AAEE,UAACG,GAAD,EAAMC,IAAN,gCAA8BA,IAAI,CAACJ,SAAnC,uBAFF,CADsB;;AAKtB;AACE,UAACG,GAAD,EAAMC,IAAN,UAAeD,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACE,MAAJ,IAAcD,IAAI,CAACX,SAAlD,EADF;AAEE,UAACU,GAAD,EAAMC,IAAN,4CAA0CA,IAAI,CAACX,SAA/C,eAFF,CALsB,CAAxB,C;;;;AAWe,kBAAAV,IAAI;AACjB;AACEQ,IAAAA,QAAQ,CAACR,IAAI,CAACuB,IAAN,CADV;AAEEnB,IAAAA,aAAa,CAACJ,IAAD,CAFf;AAGEF,IAAAA,cAAc,CAACE,IAAD,CAHhB;AAIES,IAAAA,OAJF;AAKEU,IAAAA,eALF;AAME,KAACnB,IAAI,CAACwB,WAAN,CANF;AAOEC,IAAAA,IAAI,CAACC,SAPP,CADiB,G","sourcesContent":["import { map, constant, isArray } from \"lodash/fp\"\nimport {\n typeFunctions,\n makerule,\n parsedFailed,\n getDefaultExport,\n parsedSuccess,\n} from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n toNumberOrNull,\n $$,\n isSafeInteger,\n} from \"../../common/index.js\"\n\nconst arrayFunctions = () =>\n typeFunctions({\n default: constant([]),\n })\n\nconst mapToParsedArrary = type =>\n $$(\n map(i => type.safeParseValue(i)),\n parsedSuccess\n )\n\nconst arrayTryParse = type =>\n switchCase([isArray, mapToParsedArrary(type)], [defaultCase, parsedFailed])\n\nconst typeName = type => `array<${type}>`\n\nconst options = {\n maxLength: {\n defaultValue: 10000,\n isValid: isSafeInteger,\n requirementDescription: \"must be a positive integer\",\n parse: toNumberOrNull,\n },\n minLength: {\n defaultValue: 0,\n isValid: n => isSafeInteger(n) && n >= 0,\n requirementDescription: \"must be a positive integer\",\n parse: toNumberOrNull,\n },\n}\n\nconst typeConstraints = [\n makerule(\n (val, opts) => val === null || val.length >= opts.minLength,\n (val, opts) => `must choose ${opts.minLength} or more options`\n ),\n makerule(\n (val, opts) => val === null || val.length <= opts.maxLength,\n (val, opts) => `cannot choose more than ${opts.maxLength} options`\n ),\n]\n\nexport default type =>\n getDefaultExport(\n typeName(type.name),\n arrayTryParse(type),\n arrayFunctions(type),\n options,\n typeConstraints,\n [type.sampleValue],\n JSON.stringify\n )\n"],"file":"array.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/array.js"],"names":["arrayFunctions","mapToParsedArrary","type","i","safeParseValue","parsedSuccess","arrayTryParse","isArray","defaultCase","parsedFailed","typeName","options","maxLength","defaultValue","isValid","isSafeInteger","requirementDescription","parse","toNumberOrNull","minLength","n","typeConstraints","val","opts","length","name","sampleValue","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;;;;;;;AAQA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AACrB,oCAAc;AACZ,iBAAS,kBAAS,EAAT,CADG,EAAd,CADqB,GAAvB;;;AAKA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,IAAI;AAC5B;AACE,iBAAI,UAAAC,CAAC,UAAID,IAAI,CAACE,cAAL,CAAoBD,CAApB,CAAJ,EAAL,CADF;AAEEE,8BAFF,CAD4B,GAA9B;;;AAMA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAAJ,IAAI;AACxB,2BAAW,CAACK,WAAD,EAAUN,iBAAiB,CAACC,IAAD,CAA3B,CAAX,EAA+C,CAACM,kBAAD,EAAcC,yBAAd,CAA/C,CADwB,GAA1B;;AAGA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAAAR,IAAI,0BAAaA,IAAb,QAArB;;AAEA,IAAMS,OAAO,GAAG;AACdC,EAAAA,SAAS,EAAE;AACTC,IAAAA,YAAY,EAAE,KADL;AAETC,IAAAA,OAAO,EAAEC,oBAFA;AAGTC,IAAAA,sBAAsB,EAAE,4BAHf;AAITC,IAAAA,KAAK,EAAEC,qBAJE,EADG;;AAOdC,EAAAA,SAAS,EAAE;AACTN,IAAAA,YAAY,EAAE,CADL;AAETC,IAAAA,OAAO,EAAE,iBAAAM,CAAC,UAAI,0BAAcA,CAAd,KAAoBA,CAAC,IAAI,CAA7B,EAFD;AAGTJ,IAAAA,sBAAsB,EAAE,4BAHf;AAITC,IAAAA,KAAK,EAAEC,qBAJE,EAPG,EAAhB;;;;AAeA,IAAMG,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN,UAAeD,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACE,MAAJ,IAAcD,IAAI,CAACJ,SAAlD,EADF;AAEE,UAACG,GAAD,EAAMC,IAAN,gCAA8BA,IAAI,CAACJ,SAAnC,uBAFF,CADsB;;AAKtB;AACE,UAACG,GAAD,EAAMC,IAAN,UAAeD,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACE,MAAJ,IAAcD,IAAI,CAACX,SAAlD,EADF;AAEE,UAACU,GAAD,EAAMC,IAAN,4CAA0CA,IAAI,CAACX,SAA/C,eAFF,CALsB,CAAxB,C;;;;AAWe,kBAAAV,IAAI;AACjB;AACEQ,IAAAA,QAAQ,CAACR,IAAI,CAACuB,IAAN,CADV;AAEEnB,IAAAA,aAAa,CAACJ,IAAD,CAFf;AAGEF,IAAAA,cAAc,CAACE,IAAD,CAHhB;AAIES,IAAAA,OAJF;AAKEU,IAAAA,eALF;AAME,KAACnB,IAAI,CAACwB,WAAN,CANF;AAOEC,IAAAA,IAAI,CAACC,SAPP,CADiB,G","sourcesContent":["import { map, constant, isArray } from \"lodash/fp\"\r\nimport {\r\n typeFunctions,\r\n makerule,\r\n parsedFailed,\r\n getDefaultExport,\r\n parsedSuccess,\r\n} from \"./typeHelpers\"\r\nimport {\r\n switchCase,\r\n defaultCase,\r\n toNumberOrNull,\r\n $$,\r\n isSafeInteger,\r\n} from \"../../common/index.js\"\r\n\r\nconst arrayFunctions = () =>\r\n typeFunctions({\r\n default: constant([]),\r\n })\r\n\r\nconst mapToParsedArrary = type =>\r\n $$(\r\n map(i => type.safeParseValue(i)),\r\n parsedSuccess\r\n )\r\n\r\nconst arrayTryParse = type =>\r\n switchCase([isArray, mapToParsedArrary(type)], [defaultCase, parsedFailed])\r\n\r\nconst typeName = type => `array<${type}>`\r\n\r\nconst options = {\r\n maxLength: {\r\n defaultValue: 10000,\r\n isValid: isSafeInteger,\r\n requirementDescription: \"must be a positive integer\",\r\n parse: toNumberOrNull,\r\n },\r\n minLength: {\r\n defaultValue: 0,\r\n isValid: n => isSafeInteger(n) && n >= 0,\r\n requirementDescription: \"must be a positive integer\",\r\n parse: toNumberOrNull,\r\n },\r\n}\r\n\r\nconst typeConstraints = [\r\n makerule(\r\n (val, opts) => val === null || val.length >= opts.minLength,\r\n (val, opts) => `must choose ${opts.minLength} or more options`\r\n ),\r\n makerule(\r\n (val, opts) => val === null || val.length <= opts.maxLength,\r\n (val, opts) => `cannot choose more than ${opts.maxLength} options`\r\n ),\r\n]\r\n\r\nexport default type =>\r\n getDefaultExport(\r\n typeName(type.name),\r\n arrayTryParse(type),\r\n arrayFunctions(type),\r\n options,\r\n typeConstraints,\r\n [type.sampleValue],\r\n JSON.stringify\r\n )\r\n"],"file":"array.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/bool.js.map b/packages/common/lib/schema/types/bool.js.map index 749e49a9c1..33a028f904 100644 --- a/packages/common/lib/schema/types/bool.js.map +++ b/packages/common/lib/schema/types/bool.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/bool.js"],"names":["boolFunctions","boolTryParse","isBoolean","parsedSuccess","isNull","defaultCase","parsedFailed","options","allowNulls","defaultValue","isValid","requirementDescription","parse","toBoolOrNull","typeConstraints","val","opts","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;;;;;;AAOA,IAAMA,aAAa,GAAG,gCAAc;AAClC,aAAS,kBAAS,IAAT,CADyB,EAAd,CAAtB;;;AAIA,IAAMC,YAAY,GAAG;AACnB,CAACC,aAAD,EAAYC,0BAAZ,CADmB;AAEnB,CAACC,UAAD,EAASD,0BAAT,CAFmB;AAGnB,CAAC,oBAAQ,MAAR,EAAgB,GAAhB,EAAqB,KAArB,EAA4B,IAA5B,CAAD,EAAoC,oBAAM,gCAAc,IAAd,CAAN,EAApC,CAHmB;AAInB,CAAC,oBAAQ,OAAR,EAAiB,GAAjB,EAAsB,IAAtB,EAA4B,KAA5B,CAAD,EAAqC,oBAAM,gCAAc,KAAd,CAAN,EAArC,CAJmB;AAKnB,CAACE,kBAAD,EAAcC,yBAAd,CALmB,CAArB;;;AAQA,IAAMC,OAAO,GAAG;AACdC,EAAAA,UAAU,EAAE;AACVC,IAAAA,YAAY,EAAE,IADJ;AAEVC,IAAAA,OAAO,EAAER,aAFC;AAGVS,IAAAA,sBAAsB,EAAE,yBAHd;AAIVC,IAAAA,KAAK,EAAEC,mBAJG,EADE,EAAhB;;;;AASA,IAAMC,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN,UAAeA,IAAI,CAACR,UAAL,KAAoB,IAApB,IAA4BO,GAAG,KAAK,IAAnD,EADF;AAEE,oBAAM,sBAAN,EAFF,CADsB,CAAxB,C;;;;AAOe;AACb,MADa;AAEbd,YAFa;AAGbD,aAHa;AAIbO,OAJa;AAKbO,eALa;AAMb,IANa;AAObG,IAAI,CAACC,SAPQ,C","sourcesContent":["import { constant, isBoolean, isNull } from \"lodash/fp\"\nimport {\n typeFunctions,\n makerule,\n parsedFailed,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n isOneOf,\n toBoolOrNull,\n} from \"../../common/index.js\"\n\nconst boolFunctions = typeFunctions({\n default: constant(null),\n})\n\nconst boolTryParse = switchCase(\n [isBoolean, parsedSuccess],\n [isNull, parsedSuccess],\n [isOneOf(\"true\", \"1\", \"yes\", \"on\"), () => parsedSuccess(true)],\n [isOneOf(\"false\", \"0\", \"no\", \"off\"), () => parsedSuccess(false)],\n [defaultCase, parsedFailed]\n)\n\nconst options = {\n allowNulls: {\n defaultValue: true,\n isValid: isBoolean,\n requirementDescription: \"must be a true or false\",\n parse: toBoolOrNull,\n },\n}\n\nconst typeConstraints = [\n makerule(\n (val, opts) => opts.allowNulls === true || val !== null,\n () => \"field cannot be null\"\n ),\n]\n\nexport default getDefaultExport(\n \"bool\",\n boolTryParse,\n boolFunctions,\n options,\n typeConstraints,\n true,\n JSON.stringify\n)\n"],"file":"bool.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/bool.js"],"names":["boolFunctions","boolTryParse","isBoolean","parsedSuccess","isNull","defaultCase","parsedFailed","options","allowNulls","defaultValue","isValid","requirementDescription","parse","toBoolOrNull","typeConstraints","val","opts","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;;;;;;AAOA,IAAMA,aAAa,GAAG,gCAAc;AAClC,aAAS,kBAAS,IAAT,CADyB,EAAd,CAAtB;;;AAIA,IAAMC,YAAY,GAAG;AACnB,CAACC,aAAD,EAAYC,0BAAZ,CADmB;AAEnB,CAACC,UAAD,EAASD,0BAAT,CAFmB;AAGnB,CAAC,oBAAQ,MAAR,EAAgB,GAAhB,EAAqB,KAArB,EAA4B,IAA5B,CAAD,EAAoC,oBAAM,gCAAc,IAAd,CAAN,EAApC,CAHmB;AAInB,CAAC,oBAAQ,OAAR,EAAiB,GAAjB,EAAsB,IAAtB,EAA4B,KAA5B,CAAD,EAAqC,oBAAM,gCAAc,KAAd,CAAN,EAArC,CAJmB;AAKnB,CAACE,kBAAD,EAAcC,yBAAd,CALmB,CAArB;;;AAQA,IAAMC,OAAO,GAAG;AACdC,EAAAA,UAAU,EAAE;AACVC,IAAAA,YAAY,EAAE,IADJ;AAEVC,IAAAA,OAAO,EAAER,aAFC;AAGVS,IAAAA,sBAAsB,EAAE,yBAHd;AAIVC,IAAAA,KAAK,EAAEC,mBAJG,EADE,EAAhB;;;;AASA,IAAMC,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN,UAAeA,IAAI,CAACR,UAAL,KAAoB,IAApB,IAA4BO,GAAG,KAAK,IAAnD,EADF;AAEE,oBAAM,sBAAN,EAFF,CADsB,CAAxB,C;;;;AAOe;AACb,MADa;AAEbd,YAFa;AAGbD,aAHa;AAIbO,OAJa;AAKbO,eALa;AAMb,IANa;AAObG,IAAI,CAACC,SAPQ,C","sourcesContent":["import { constant, isBoolean, isNull } from \"lodash/fp\"\r\nimport {\r\n typeFunctions,\r\n makerule,\r\n parsedFailed,\r\n parsedSuccess,\r\n getDefaultExport,\r\n} from \"./typeHelpers\"\r\nimport {\r\n switchCase,\r\n defaultCase,\r\n isOneOf,\r\n toBoolOrNull,\r\n} from \"../../common/index.js\"\r\n\r\nconst boolFunctions = typeFunctions({\r\n default: constant(null),\r\n})\r\n\r\nconst boolTryParse = switchCase(\r\n [isBoolean, parsedSuccess],\r\n [isNull, parsedSuccess],\r\n [isOneOf(\"true\", \"1\", \"yes\", \"on\"), () => parsedSuccess(true)],\r\n [isOneOf(\"false\", \"0\", \"no\", \"off\"), () => parsedSuccess(false)],\r\n [defaultCase, parsedFailed]\r\n)\r\n\r\nconst options = {\r\n allowNulls: {\r\n defaultValue: true,\r\n isValid: isBoolean,\r\n requirementDescription: \"must be a true or false\",\r\n parse: toBoolOrNull,\r\n },\r\n}\r\n\r\nconst typeConstraints = [\r\n makerule(\r\n (val, opts) => opts.allowNulls === true || val !== null,\r\n () => \"field cannot be null\"\r\n ),\r\n]\r\n\r\nexport default getDefaultExport(\r\n \"bool\",\r\n boolTryParse,\r\n boolFunctions,\r\n options,\r\n typeConstraints,\r\n true,\r\n JSON.stringify\r\n)\r\n"],"file":"bool.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/datetime.js b/packages/common/lib/schema/types/datetime.js index 5fcaa8f0f7..982e98bdb7 100644 --- a/packages/common/lib/schema/types/datetime.js +++ b/packages/common/lib/schema/types/datetime.js @@ -1,78 +1,18 @@ -"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _fp = require("lodash/fp"); -var _typeHelpers = require("./typeHelpers"); +"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _default2 = { + isType: function isType(schema) {return ( + schema.anyOf && + schema.anyOf.filter(function (s) {return s.type === "string" && s.format === "date-time";}). + length > 0);}, + fromSchema: function fromSchema(schema) {return { + type: "datetime", + "default": schema["default"] };}, + toSchema: function toSchema() {return { + anyOf: [{ type: "string", format: "date-time" }, { "const": "" }], + "default": "" };}, - - - -var _common = require("../../common"); - -var dateFunctions = (0, _typeHelpers.typeFunctions)({ - "default": (0, _fp.constant)(null), - now: function now() {return new Date();} }); - - -var isValidDate = function isValidDate(d) {return d instanceof Date && !isNaN(d);}; - -var parseStringToDate = function parseStringToDate(s) {return ( - (0, _common.switchCase)( - [isValidDate, _typeHelpers.parsedSuccess], - [_common.defaultCase, _typeHelpers.parsedFailed])( - new Date(s)));}; - -var isNullOrEmpty = function isNullOrEmpty(d) {return (0, _fp.isNull)(d) || (d || "").toString() === "";}; - -var isDateOrEmpty = function isDateOrEmpty(d) {return (0, _fp.isDate)(d) || isNullOrEmpty(d);}; - -var dateTryParse = (0, _common.switchCase)( -[isDateOrEmpty, _typeHelpers.parsedSuccess], -[_fp.isString, parseStringToDate], -[_common.defaultCase, _typeHelpers.parsedFailed]); - - -var options = { - maxValue: { - defaultValue: null, - //defaultValue: new Date(32503680000000), - isValid: isDateOrEmpty, - requirementDescription: "must be a valid date", - parse: _common.toDateOrNull }, - - minValue: { - defaultValue: null, - //defaultValue: new Date(-8520336000000), - isValid: isDateOrEmpty, - requirementDescription: "must be a valid date", - parse: _common.toDateOrNull } }; - - - -var typeConstraints = [ -(0, _typeHelpers.makerule)( -function (val, opts) {return ( - val === null || isNullOrEmpty(opts.minValue) || val >= opts.minValue);}, -function (val, opts) {return "value (".concat( - val.toString(), ") must be greater than or equal to ").concat( - opts.minValue);}), - - -(0, _typeHelpers.makerule)( -function (val, opts) {return ( - val === null || isNullOrEmpty(opts.maxValue) || val <= opts.maxValue);}, -function (val, opts) {return "value (".concat( - val.toString(), ") must be less than or equal to ").concat( - opts.minValue, " options");})];var _default = - - - - -(0, _typeHelpers.getDefaultExport)( -"datetime", -dateTryParse, -dateFunctions, -options, -typeConstraints, -new Date(1984, 4, 1), -function (date) {return JSON.stringify(date).replace(new RegExp('"', "g"), "");});exports["default"] = _default; + "default": function _default() {return { + type: "datetime", + "default": "" };} };exports["default"] = _default2; //# sourceMappingURL=datetime.js.map \ No newline at end of file diff --git a/packages/common/lib/schema/types/datetime.js.map b/packages/common/lib/schema/types/datetime.js.map index 6559a7758e..bd3f1e0271 100644 --- a/packages/common/lib/schema/types/datetime.js.map +++ b/packages/common/lib/schema/types/datetime.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/datetime.js"],"names":["dateFunctions","now","Date","isValidDate","d","isNaN","parseStringToDate","s","parsedSuccess","defaultCase","parsedFailed","isNullOrEmpty","toString","isDateOrEmpty","dateTryParse","isString","options","maxValue","defaultValue","isValid","requirementDescription","parse","toDateOrNull","minValue","typeConstraints","val","opts","date","JSON","stringify","replace","RegExp"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;AAEA,IAAMA,aAAa,GAAG,gCAAc;AAClC,aAAS,kBAAS,IAAT,CADyB;AAElCC,EAAAA,GAAG,EAAE,uBAAM,IAAIC,IAAJ,EAAN,EAF6B,EAAd,CAAtB;;;AAKA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,CAAC,UAAIA,CAAC,YAAYF,IAAb,IAAqB,CAACG,KAAK,CAACD,CAAD,CAA/B,EAArB;;AAEA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,CAAC;AACzB;AACE,KAACJ,WAAD,EAAcK,0BAAd,CADF;AAEE,KAACC,mBAAD,EAAcC,yBAAd,CAFF;AAGE,QAAIR,IAAJ,CAASK,CAAT,CAHF,CADyB,GAA3B;;AAMA,IAAMI,aAAa,GAAG,SAAhBA,aAAgB,CAAAP,CAAC,UAAI,gBAAOA,CAAP,KAAa,CAACA,CAAC,IAAI,EAAN,EAAUQ,QAAV,OAAyB,EAA1C,EAAvB;;AAEA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAAT,CAAC,UAAI,gBAAOA,CAAP,KAAaO,aAAa,CAACP,CAAD,CAA9B,EAAvB;;AAEA,IAAMU,YAAY,GAAG;AACnB,CAACD,aAAD,EAAgBL,0BAAhB,CADmB;AAEnB,CAACO,YAAD,EAAWT,iBAAX,CAFmB;AAGnB,CAACG,mBAAD,EAAcC,yBAAd,CAHmB,CAArB;;;AAMA,IAAMM,OAAO,GAAG;AACdC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,YAAY,EAAE,IADN;AAER;AACAC,IAAAA,OAAO,EAAEN,aAHD;AAIRO,IAAAA,sBAAsB,EAAE,sBAJhB;AAKRC,IAAAA,KAAK,EAAEC,oBALC,EADI;;AAQdC,EAAAA,QAAQ,EAAE;AACRL,IAAAA,YAAY,EAAE,IADN;AAER;AACAC,IAAAA,OAAO,EAAEN,aAHD;AAIRO,IAAAA,sBAAsB,EAAE,sBAJhB;AAKRC,IAAAA,KAAK,EAAEC,oBALC,EARI,EAAhB;;;;AAiBA,IAAME,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR,IAAgBd,aAAa,CAACe,IAAI,CAACH,QAAN,CAA7B,IAAgDE,GAAG,IAAIC,IAAI,CAACH,QAD9D,GADF;AAGE,UAACE,GAAD,EAAMC,IAAN;AACYD,EAAAA,GAAG,CAACb,QAAJ,EADZ;AAEIc,EAAAA,IAAI,CAACH,QAFT,GAHF,CADsB;;;AAStB;AACE,UAACE,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR,IAAgBd,aAAa,CAACe,IAAI,CAACT,QAAN,CAA7B,IAAgDQ,GAAG,IAAIC,IAAI,CAACT,QAD9D,GADF;AAGE,UAACQ,GAAD,EAAMC,IAAN;AACYD,EAAAA,GAAG,CAACb,QAAJ,EADZ;AAEIc,EAAAA,IAAI,CAACH,QAFT,eAHF,CATsB,CAAxB,C;;;;;AAmBe;AACb,UADa;AAEbT,YAFa;AAGbd,aAHa;AAIbgB,OAJa;AAKbQ,eALa;AAMb,IAAItB,IAAJ,CAAS,IAAT,EAAe,CAAf,EAAkB,CAAlB,CANa;AAOb,UAAAyB,IAAI,UAAIC,IAAI,CAACC,SAAL,CAAeF,IAAf,EAAqBG,OAArB,CAA6B,IAAIC,MAAJ,CAAW,GAAX,EAAgB,GAAhB,CAA7B,EAAmD,EAAnD,CAAJ,EAPS,C","sourcesContent":["import { constant, isDate, isString, isNull } from \"lodash/fp\"\nimport {\n makerule,\n typeFunctions,\n parsedFailed,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport { switchCase, defaultCase, toDateOrNull } from \"../../common\"\n\nconst dateFunctions = typeFunctions({\n default: constant(null),\n now: () => new Date(),\n})\n\nconst isValidDate = d => d instanceof Date && !isNaN(d)\n\nconst parseStringToDate = s =>\n switchCase(\n [isValidDate, parsedSuccess],\n [defaultCase, parsedFailed]\n )(new Date(s))\n\nconst isNullOrEmpty = d => isNull(d) || (d || \"\").toString() === \"\"\n\nconst isDateOrEmpty = d => isDate(d) || isNullOrEmpty(d)\n\nconst dateTryParse = switchCase(\n [isDateOrEmpty, parsedSuccess],\n [isString, parseStringToDate],\n [defaultCase, parsedFailed]\n)\n\nconst options = {\n maxValue: {\n defaultValue: null,\n //defaultValue: new Date(32503680000000),\n isValid: isDateOrEmpty,\n requirementDescription: \"must be a valid date\",\n parse: toDateOrNull,\n },\n minValue: {\n defaultValue: null,\n //defaultValue: new Date(-8520336000000),\n isValid: isDateOrEmpty,\n requirementDescription: \"must be a valid date\",\n parse: toDateOrNull,\n },\n}\n\nconst typeConstraints = [\n makerule(\n (val, opts) =>\n val === null || isNullOrEmpty(opts.minValue) || val >= opts.minValue,\n (val, opts) =>\n `value (${val.toString()}) must be greater than or equal to ${\n opts.minValue\n }`\n ),\n makerule(\n (val, opts) =>\n val === null || isNullOrEmpty(opts.maxValue) || val <= opts.maxValue,\n (val, opts) =>\n `value (${val.toString()}) must be less than or equal to ${\n opts.minValue\n } options`\n ),\n]\n\nexport default getDefaultExport(\n \"datetime\",\n dateTryParse,\n dateFunctions,\n options,\n typeConstraints,\n new Date(1984, 4, 1),\n date => JSON.stringify(date).replace(new RegExp('\"', \"g\"), \"\")\n)\n"],"file":"datetime.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/datetime.js"],"names":["isType","schema","anyOf","filter","s","type","format","length","fromSchema","toSchema"],"mappings":"uHAAe;AACbA,EAAAA,MAAM,EAAE,gBAAAC,MAAM;AACZA,MAAAA,MAAM,CAACC,KAAP;AACAD,MAAAA,MAAM,CAACC,KAAP,CAAaC,MAAb,CAAoB,UAAAC,CAAC,UAAIA,CAAC,CAACC,IAAF,KAAW,QAAX,IAAuBD,CAAC,CAACE,MAAF,KAAa,WAAxC,EAArB;AACGC,MAAAA,MADH,GACY,CAHA,GADD;;AAMbC,EAAAA,UAAU,EAAE,oBAAAP,MAAM,UAAK;AACrBI,MAAAA,IAAI,EAAE,UADe;AAErB,iBAASJ,MAAM,WAFM,EAAL,EANL;;AAUbQ,EAAAA,QAAQ,EAAE,4BAAO;AACfP,MAAAA,KAAK,EAAE,CAAC,EAAEG,IAAI,EAAE,QAAR,EAAkBC,MAAM,EAAE,WAA1B,EAAD,EAA0C,EAAE,SAAO,EAAT,EAA1C,CADQ;AAEf,iBAAS,EAFM,EAAP,EAVG;;AAcb,aAAS,4BAAO;AACdD,MAAAA,IAAI,EAAE,UADQ;AAEd,iBAAS,EAFK,EAAP,EAdI,E","sourcesContent":["export default {\r\n isType: schema =>\r\n schema.anyOf &&\r\n schema.anyOf.filter(s => s.type === \"string\" && s.format === \"date-time\")\r\n .length > 0,\r\n\r\n fromSchema: schema => ({\r\n type: \"datetime\",\r\n default: schema.default,\r\n }),\r\n toSchema: () => ({\r\n anyOf: [{ type: \"string\", format: \"date-time\" }, { const: \"\" }],\r\n default: \"\",\r\n }),\r\n default: () => ({\r\n type: \"datetime\",\r\n default: \"\",\r\n }),\r\n}\r\n"],"file":"datetime.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/file.js.map b/packages/common/lib/schema/types/file.js.map index c08e34a911..17b9a9fc52 100644 --- a/packages/common/lib/schema/types/file.js.map +++ b/packages/common/lib/schema/types/file.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/file.js"],"names":["illegalCharacters","isLegalFilename","filePath","fn","fileName","length","split","f","fileNothing","relativePath","size","fileFunctions","fileTryParse","v","isValidFile","parsedSuccess","isNull","defaultCase","parsedFailed","splitKey","last","options","typeConstraints","JSON","stringify"],"mappings":"iIAAA;AACA;;;;;;AAMA;;;;;;;;AAQA,IAAMA,iBAAiB,GAAG,mBAA1B;;AAEO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,QAAQ,EAAI;AACzC,MAAMC,EAAE,GAAGC,QAAQ,CAACF,QAAD,CAAnB;AACA;AACEC,IAAAA,EAAE,CAACE,MAAH,IAAa,GAAb;AACA,0BAAaF,EAAE,CAACG,KAAH,CAAS,EAAT,CAAb,EAA2BN,iBAAiB,CAACM,KAAlB,CAAwB,EAAxB,CAA3B,EAAwDD,MAAxD,KAAmE,CADnE;AAEA,qBAAK,UAAAE,CAAC,UAAIA,CAAC,KAAK,IAAV,EAAN,EAAsB,qBAASL,QAAT,CAAtB,CAHF;;AAKD,CAPM,C;;AASP,IAAMM,WAAW,GAAG,SAAdA,WAAc,WAAO,EAAEC,YAAY,EAAE,EAAhB,EAAoBC,IAAI,EAAE,CAA1B,EAAP,EAApB;;AAEA,IAAMC,aAAa,GAAG,gCAAc;AAClC,aAASH,WADyB,EAAd,CAAtB;;;AAIA,IAAMI,YAAY,GAAG,SAAfA,YAAe,CAAAC,CAAC;AACpB;AACE,KAACC,WAAD,EAAcC,0BAAd,CADF;AAEE,KAACC,UAAD,EAAS,oBAAM,gCAAcR,WAAW,EAAzB,CAAN,EAAT,CAFF;AAGE,KAACS,kBAAD,EAAcC,yBAAd,CAHF;AAIEL,IAAAA,CAJF,CADoB,GAAtB;;AAOA,IAAMT,QAAQ,GAAG,SAAXA,QAAW,CAAAF,QAAQ,UAAI,cAAEA,QAAF,EAAY,CAACiB,eAAD,EAAWC,QAAX,CAAZ,CAAJ,EAAzB;;AAEA,IAAMN,WAAW,GAAG,SAAdA,WAAc,CAAAP,CAAC;AACnB,KAAC,gBAAOA,CAAP,CAAD;AACA,iBAAI,cAAJ,EAAoBA,CAApB,CADA;AAEA,iBAAI,MAAJ,EAAYA,CAAZ,CAFA;AAGA,sBAASA,CAAC,CAACG,IAAX,CAHA;AAIA,sBAASH,CAAC,CAACE,YAAX,CAJA;AAKAR,IAAAA,eAAe,CAACM,CAAC,CAACE,YAAH,CANI,GAArB;;AAQA,IAAMY,OAAO,GAAG,EAAhB;;AAEA,IAAMC,eAAe,GAAG,EAAxB,C;;AAEe;AACb,MADa;AAEbV,YAFa;AAGbD,aAHa;AAIbU,OAJa;AAKbC,eALa;AAMb,EAAEb,YAAY,EAAE,eAAhB,EAAiCC,IAAI,EAAE,IAAvC,EANa;AAOba,IAAI,CAACC,SAPQ,C","sourcesContent":["import { last, has, isString, intersection, isNull, isNumber } from \"lodash/fp\"\nimport {\n typeFunctions,\n parsedFailed,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n none,\n $,\n splitKey,\n} from \"../../common/index.js\"\n\nconst illegalCharacters = \"*?\\\\/:<>|\\0\\b\\f\\v\"\n\nexport const isLegalFilename = filePath => {\n const fn = fileName(filePath)\n return (\n fn.length <= 255 &&\n intersection(fn.split(\"\"))(illegalCharacters.split(\"\")).length === 0 &&\n none(f => f === \"..\")(splitKey(filePath))\n )\n}\n\nconst fileNothing = () => ({ relativePath: \"\", size: 0 })\n\nconst fileFunctions = typeFunctions({\n default: fileNothing,\n})\n\nconst fileTryParse = v =>\n switchCase(\n [isValidFile, parsedSuccess],\n [isNull, () => parsedSuccess(fileNothing())],\n [defaultCase, parsedFailed]\n )(v)\n\nconst fileName = filePath => $(filePath, [splitKey, last])\n\nconst isValidFile = f =>\n !isNull(f) &&\n has(\"relativePath\")(f) &&\n has(\"size\")(f) &&\n isNumber(f.size) &&\n isString(f.relativePath) &&\n isLegalFilename(f.relativePath)\n\nconst options = {}\n\nconst typeConstraints = []\n\nexport default getDefaultExport(\n \"file\",\n fileTryParse,\n fileFunctions,\n options,\n typeConstraints,\n { relativePath: \"some_file.jpg\", size: 1000 },\n JSON.stringify\n)\n"],"file":"file.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/file.js"],"names":["illegalCharacters","isLegalFilename","filePath","fn","fileName","length","split","f","fileNothing","relativePath","size","fileFunctions","fileTryParse","v","isValidFile","parsedSuccess","isNull","defaultCase","parsedFailed","splitKey","last","options","typeConstraints","JSON","stringify"],"mappings":"iIAAA;AACA;;;;;;AAMA;;;;;;;;AAQA,IAAMA,iBAAiB,GAAG,mBAA1B;;AAEO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAAC,QAAQ,EAAI;AACzC,MAAMC,EAAE,GAAGC,QAAQ,CAACF,QAAD,CAAnB;AACA;AACEC,IAAAA,EAAE,CAACE,MAAH,IAAa,GAAb;AACA,0BAAaF,EAAE,CAACG,KAAH,CAAS,EAAT,CAAb,EAA2BN,iBAAiB,CAACM,KAAlB,CAAwB,EAAxB,CAA3B,EAAwDD,MAAxD,KAAmE,CADnE;AAEA,qBAAK,UAAAE,CAAC,UAAIA,CAAC,KAAK,IAAV,EAAN,EAAsB,qBAASL,QAAT,CAAtB,CAHF;;AAKD,CAPM,C;;AASP,IAAMM,WAAW,GAAG,SAAdA,WAAc,WAAO,EAAEC,YAAY,EAAE,EAAhB,EAAoBC,IAAI,EAAE,CAA1B,EAAP,EAApB;;AAEA,IAAMC,aAAa,GAAG,gCAAc;AAClC,aAASH,WADyB,EAAd,CAAtB;;;AAIA,IAAMI,YAAY,GAAG,SAAfA,YAAe,CAAAC,CAAC;AACpB;AACE,KAACC,WAAD,EAAcC,0BAAd,CADF;AAEE,KAACC,UAAD,EAAS,oBAAM,gCAAcR,WAAW,EAAzB,CAAN,EAAT,CAFF;AAGE,KAACS,kBAAD,EAAcC,yBAAd,CAHF;AAIEL,IAAAA,CAJF,CADoB,GAAtB;;AAOA,IAAMT,QAAQ,GAAG,SAAXA,QAAW,CAAAF,QAAQ,UAAI,cAAEA,QAAF,EAAY,CAACiB,eAAD,EAAWC,QAAX,CAAZ,CAAJ,EAAzB;;AAEA,IAAMN,WAAW,GAAG,SAAdA,WAAc,CAAAP,CAAC;AACnB,KAAC,gBAAOA,CAAP,CAAD;AACA,iBAAI,cAAJ,EAAoBA,CAApB,CADA;AAEA,iBAAI,MAAJ,EAAYA,CAAZ,CAFA;AAGA,sBAASA,CAAC,CAACG,IAAX,CAHA;AAIA,sBAASH,CAAC,CAACE,YAAX,CAJA;AAKAR,IAAAA,eAAe,CAACM,CAAC,CAACE,YAAH,CANI,GAArB;;AAQA,IAAMY,OAAO,GAAG,EAAhB;;AAEA,IAAMC,eAAe,GAAG,EAAxB,C;;AAEe;AACb,MADa;AAEbV,YAFa;AAGbD,aAHa;AAIbU,OAJa;AAKbC,eALa;AAMb,EAAEb,YAAY,EAAE,eAAhB,EAAiCC,IAAI,EAAE,IAAvC,EANa;AAOba,IAAI,CAACC,SAPQ,C","sourcesContent":["import { last, has, isString, intersection, isNull, isNumber } from \"lodash/fp\"\r\nimport {\r\n typeFunctions,\r\n parsedFailed,\r\n parsedSuccess,\r\n getDefaultExport,\r\n} from \"./typeHelpers\"\r\nimport {\r\n switchCase,\r\n defaultCase,\r\n none,\r\n $,\r\n splitKey,\r\n} from \"../../common/index.js\"\r\n\r\nconst illegalCharacters = \"*?\\\\/:<>|\\0\\b\\f\\v\"\r\n\r\nexport const isLegalFilename = filePath => {\r\n const fn = fileName(filePath)\r\n return (\r\n fn.length <= 255 &&\r\n intersection(fn.split(\"\"))(illegalCharacters.split(\"\")).length === 0 &&\r\n none(f => f === \"..\")(splitKey(filePath))\r\n )\r\n}\r\n\r\nconst fileNothing = () => ({ relativePath: \"\", size: 0 })\r\n\r\nconst fileFunctions = typeFunctions({\r\n default: fileNothing,\r\n})\r\n\r\nconst fileTryParse = v =>\r\n switchCase(\r\n [isValidFile, parsedSuccess],\r\n [isNull, () => parsedSuccess(fileNothing())],\r\n [defaultCase, parsedFailed]\r\n )(v)\r\n\r\nconst fileName = filePath => $(filePath, [splitKey, last])\r\n\r\nconst isValidFile = f =>\r\n !isNull(f) &&\r\n has(\"relativePath\")(f) &&\r\n has(\"size\")(f) &&\r\n isNumber(f.size) &&\r\n isString(f.relativePath) &&\r\n isLegalFilename(f.relativePath)\r\n\r\nconst options = {}\r\n\r\nconst typeConstraints = []\r\n\r\nexport default getDefaultExport(\r\n \"file\",\r\n fileTryParse,\r\n fileFunctions,\r\n options,\r\n typeConstraints,\r\n { relativePath: \"some_file.jpg\", size: 1000 },\r\n JSON.stringify\r\n)\r\n"],"file":"file.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/index.js b/packages/common/lib/schema/types/index.js index f77aeb3c4f..86a6412828 100644 --- a/packages/common/lib/schema/types/index.js +++ b/packages/common/lib/schema/types/index.js @@ -1,85 +1,54 @@ -"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports, "__esModule", { value: true });exports.detectType = exports.validateTypeConstraints = exports.getDefaultOptions = exports.validateFieldParse = exports.safeParseField = exports.getNewFieldValue = exports.getSampleFieldValue = exports.getType = exports.all = void 0;var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _lodash = require("lodash"); -var _fp = require("lodash/fp"); - - - - - - - - - - -var _common = require("../../common"); -var _typeHelpers = require("./typeHelpers"); -var _string = _interopRequireDefault(require("./string")); -var _bool = _interopRequireDefault(require("./bool")); -var _number = _interopRequireDefault(require("./number")); +"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports, "__esModule", { value: true });exports.listTypes = listTypes;exports.newField = newField;exports.fieldsToSchema = fieldsToSchema;exports.schemaToFields = schemaToFields;var _boolean2 = _interopRequireDefault(require("./boolean")); var _datetime = _interopRequireDefault(require("./datetime")); -var _array = _interopRequireDefault(require("./array")); var _link = _interopRequireDefault(require("./link")); -var _file = _interopRequireDefault(require("./file")); -var _errors = require("../../common/errors"); +var _number = _interopRequireDefault(require("./number")); +var _select = _interopRequireDefault(require("./select")); +var _text = _interopRequireDefault(require("./text")); -var allTypes = function allTypes() { - var basicTypes = { - string: _string["default"], - number: _number["default"], - datetime: _datetime["default"], - bool: _bool["default"], - link: _link["default"], - file: _file["default"] }; +var allTypes = { + "boolean": _boolean2["default"], + datetime: _datetime["default"], + link: _link["default"], + number: _number["default"], + select: _select["default"], + text: _text["default"] }; - var arrays = (0, _common.$)(basicTypes, [ - _fp.keys, - (0, _fp.map)(function (k) { - var kvType = {}; - var concreteArray = (0, _array["default"])(basicTypes[k]); - kvType[concreteArray.name] = concreteArray; - return kvType; - }), - function (types) {return _lodash.assign.apply(void 0, [{}].concat((0, _toConsumableArray2["default"])(types)));}]); +function listTypes() { + return Object.keys(allTypes); +} +function newField(name, type) { + var field = allTypes[type]["default"](); + field.name = name; + field.required = false; + return field; +} - return (0, _lodash.merge)({}, basicTypes, arrays); -}; +function fieldsToSchema(fields) { + var required = fields.filter(function (f) {return f.required;}).map(function (f) {return f.name;}); -var all = allTypes();exports.all = all; + return { + type: "object", + required: required, + properties: fields.reduce(function (sch, field) { + sch[field.name] = allTypes[field.type].toSchema(field); + return sch; + }, {}) }; -var getType = function getType(typeName) { - if (!(0, _fp.has)(typeName)(all)) - throw new _errors.BadRequestError("Do not recognise type ".concat(typeName)); - return all[typeName]; -};exports.getType = getType; +} -var getSampleFieldValue = function getSampleFieldValue(field) {return getType(field.type).sampleValue;};exports.getSampleFieldValue = getSampleFieldValue; - -var getNewFieldValue = function getNewFieldValue(field) {return getType(field.type).getNew(field);};exports.getNewFieldValue = getNewFieldValue; - -var safeParseField = function safeParseField(field, record) {return ( - getType(field.type).safeParseField(field, record));};exports.safeParseField = safeParseField; - -var validateFieldParse = function validateFieldParse(field, record) {return ( - (0, _fp.has)(field.name)(record) ? - getType(field.type).tryParse(record[field.name]) : - (0, _typeHelpers.parsedSuccess)(undefined));}; // fields may be undefined by default -exports.validateFieldParse = validateFieldParse; -var getDefaultOptions = function getDefaultOptions(type) {return getType(type).getDefaultOptions();};exports.getDefaultOptions = getDefaultOptions; - -var validateTypeConstraints = function validateTypeConstraints(field, record) {return ( - getType(field.type).validateTypeConstraints(field, record));};exports.validateTypeConstraints = validateTypeConstraints; - -var detectType = function detectType(value) { - if ((0, _fp.isString)(value)) return _string["default"]; - if ((0, _fp.isBoolean)(value)) return _bool["default"]; - if ((0, _fp.isNumber)(value)) return _number["default"]; - if ((0, _fp.isDate)(value)) return _datetime["default"]; - if ((0, _fp.isArray)(value)) return (0, _array["default"])(detectType(value[0])); - if ((0, _fp.isObject)(value) && (0, _fp.has)("key")(value) && (0, _fp.has)("value")(value)) return _link["default"]; - if ((0, _fp.isObject)(value) && (0, _fp.has)("relativePath")(value) && (0, _fp.has)("size")(value)) - return _file["default"]; - - throw new _errors.BadRequestError("cannot determine type: ".concat(JSON.stringify(value))); -};exports.detectType = detectType; +function schemaToFields(modelSchema) { + return Object.keys(modelSchema.properties).map(function (key) { + var schema = modelSchema.properties[key]; + for (var type in allTypes) { + if (allTypes[type].isType(schema)) { + var field = allTypes[type].fromSchema(schema); + field.required = modelSchema.required.includes(key); + field.name = key; + return field; + } + } + }); +} //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/common/lib/schema/types/index.js.map b/packages/common/lib/schema/types/index.js.map index 5e1aa0307c..cfebb139f9 100644 --- a/packages/common/lib/schema/types/index.js.map +++ b/packages/common/lib/schema/types/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/index.js"],"names":["allTypes","basicTypes","string","number","datetime","bool","link","file","arrays","keys","k","kvType","concreteArray","name","types","assign","all","getType","typeName","BadRequestError","getSampleFieldValue","field","type","sampleValue","getNewFieldValue","getNew","safeParseField","record","validateFieldParse","tryParse","undefined","getDefaultOptions","validateTypeConstraints","detectType","value","JSON","stringify"],"mappings":"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","sourcesContent":["import { assign, merge } from \"lodash\"\nimport {\n map,\n isString,\n isNumber,\n isBoolean,\n isDate,\n keys,\n isObject,\n isArray,\n has,\n} from \"lodash/fp\"\nimport { $ } from \"../../common\"\nimport { parsedSuccess } from \"./typeHelpers\"\nimport string from \"./string\"\nimport bool from \"./bool\"\nimport number from \"./number\"\nimport datetime from \"./datetime\"\nimport array from \"./array\"\nimport link from \"./link\"\nimport file from \"./file\"\nimport { BadRequestError } from \"../../common/errors\"\n\nconst allTypes = () => {\n const basicTypes = {\n string,\n number,\n datetime,\n bool,\n link,\n file,\n }\n\n const arrays = $(basicTypes, [\n keys,\n map(k => {\n const kvType = {}\n const concreteArray = array(basicTypes[k])\n kvType[concreteArray.name] = concreteArray\n return kvType\n }),\n types => assign({}, ...types),\n ])\n\n return merge({}, basicTypes, arrays)\n}\n\nexport const all = allTypes()\n\nexport const getType = typeName => {\n if (!has(typeName)(all))\n throw new BadRequestError(`Do not recognise type ${typeName}`)\n return all[typeName]\n}\n\nexport const getSampleFieldValue = field => getType(field.type).sampleValue\n\nexport const getNewFieldValue = field => getType(field.type).getNew(field)\n\nexport const safeParseField = (field, record) =>\n getType(field.type).safeParseField(field, record)\n\nexport const validateFieldParse = (field, record) =>\n has(field.name)(record)\n ? getType(field.type).tryParse(record[field.name])\n : parsedSuccess(undefined) // fields may be undefined by default\n\nexport const getDefaultOptions = type => getType(type).getDefaultOptions()\n\nexport const validateTypeConstraints = (field, record) =>\n getType(field.type).validateTypeConstraints(field, record)\n\nexport const detectType = value => {\n if (isString(value)) return string\n if (isBoolean(value)) return bool\n if (isNumber(value)) return number\n if (isDate(value)) return datetime\n if (isArray(value)) return array(detectType(value[0]))\n if (isObject(value) && has(\"key\")(value) && has(\"value\")(value)) return link\n if (isObject(value) && has(\"relativePath\")(value) && has(\"size\")(value))\n return file\n\n throw new BadRequestError(`cannot determine type: ${JSON.stringify(value)}`)\n}\n"],"file":"index.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/index.js"],"names":["allTypes","datetime","link","number","select","text","listTypes","Object","keys","newField","name","type","field","required","fieldsToSchema","fields","filter","f","map","properties","reduce","sch","toSchema","schemaToFields","modelSchema","key","schema","isType","fromSchema","includes"],"mappings":"0SAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMA,QAAQ,GAAG;AACf,iCADe;AAEfC,EAAAA,QAAQ,EAARA,oBAFe;AAGfC,EAAAA,IAAI,EAAJA,gBAHe;AAIfC,EAAAA,MAAM,EAANA,kBAJe;AAKfC,EAAAA,MAAM,EAANA,kBALe;AAMfC,EAAAA,IAAI,EAAJA,gBANe,EAAjB;;;AASO,SAASC,SAAT,GAAqB;AAC1B,SAAOC,MAAM,CAACC,IAAP,CAAYR,QAAZ,CAAP;AACD;;AAEM,SAASS,QAAT,CAAkBC,IAAlB,EAAwBC,IAAxB,EAA8B;AACnC,MAAMC,KAAK,GAAGZ,QAAQ,CAACW,IAAD,CAAR,aAAd;AACAC,EAAAA,KAAK,CAACF,IAAN,GAAaA,IAAb;AACAE,EAAAA,KAAK,CAACC,QAAN,GAAiB,KAAjB;AACA,SAAOD,KAAP;AACD;;AAEM,SAASE,cAAT,CAAwBC,MAAxB,EAAgC;AACrC,MAAMF,QAAQ,GAAGE,MAAM,CAACC,MAAP,CAAc,UAAAC,CAAC,UAAIA,CAAC,CAACJ,QAAN,EAAf,EAA+BK,GAA/B,CAAmC,UAAAD,CAAC,UAAIA,CAAC,CAACP,IAAN,EAApC,CAAjB;;AAEA,SAAO;AACLC,IAAAA,IAAI,EAAE,QADD;AAELE,IAAAA,QAAQ,EAARA,QAFK;AAGLM,IAAAA,UAAU,EAAEJ,MAAM,CAACK,MAAP,CAAc,UAACC,GAAD,EAAMT,KAAN,EAAgB;AACxCS,MAAAA,GAAG,CAACT,KAAK,CAACF,IAAP,CAAH,GAAkBV,QAAQ,CAACY,KAAK,CAACD,IAAP,CAAR,CAAqBW,QAArB,CAA8BV,KAA9B,CAAlB;AACA,aAAOS,GAAP;AACD,KAHW,EAGT,EAHS,CAHP,EAAP;;AAQD;;AAEM,SAASE,cAAT,CAAwBC,WAAxB,EAAqC;AAC1C,SAAOjB,MAAM,CAACC,IAAP,CAAYgB,WAAW,CAACL,UAAxB,EAAoCD,GAApC,CAAwC,UAAAO,GAAG,EAAI;AACpD,QAAMC,MAAM,GAAGF,WAAW,CAACL,UAAZ,CAAuBM,GAAvB,CAAf;AACA,SAAK,IAAId,IAAT,IAAiBX,QAAjB,EAA2B;AACzB,UAAIA,QAAQ,CAACW,IAAD,CAAR,CAAegB,MAAf,CAAsBD,MAAtB,CAAJ,EAAmC;AACjC,YAAMd,KAAK,GAAGZ,QAAQ,CAACW,IAAD,CAAR,CAAeiB,UAAf,CAA0BF,MAA1B,CAAd;AACAd,QAAAA,KAAK,CAACC,QAAN,GAAiBW,WAAW,CAACX,QAAZ,CAAqBgB,QAArB,CAA8BJ,GAA9B,CAAjB;AACAb,QAAAA,KAAK,CAACF,IAAN,GAAae,GAAb;AACA,eAAOb,KAAP;AACD;AACF;AACF,GAVM,CAAP;AAWD","sourcesContent":["import boolean from \"./boolean\"\r\nimport datetime from \"./datetime\"\r\nimport link from \"./link\"\r\nimport number from \"./number\"\r\nimport select from \"./select\"\r\nimport text from \"./text\"\r\n\r\nconst allTypes = {\r\n boolean,\r\n datetime,\r\n link,\r\n number,\r\n select,\r\n text,\r\n}\r\n\r\nexport function listTypes() {\r\n return Object.keys(allTypes)\r\n}\r\n\r\nexport function newField(name, type) {\r\n const field = allTypes[type].default()\r\n field.name = name\r\n field.required = false\r\n return field\r\n}\r\n\r\nexport function fieldsToSchema(fields) {\r\n const required = fields.filter(f => f.required).map(f => f.name)\r\n\r\n return {\r\n type: \"object\",\r\n required,\r\n properties: fields.reduce((sch, field) => {\r\n sch[field.name] = allTypes[field.type].toSchema(field)\r\n return sch\r\n }, {}),\r\n }\r\n}\r\n\r\nexport function schemaToFields(modelSchema) {\r\n return Object.keys(modelSchema.properties).map(key => {\r\n const schema = modelSchema.properties[key]\r\n for (let type in allTypes) {\r\n if (allTypes[type].isType(schema)) {\r\n const field = allTypes[type].fromSchema(schema)\r\n field.required = modelSchema.required.includes(key)\r\n field.name = key\r\n return field\r\n }\r\n }\r\n })\r\n}\r\n"],"file":"index.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/link.js b/packages/common/lib/schema/types/link.js index 85a4626523..cc7013df2b 100644 --- a/packages/common/lib/schema/types/link.js +++ b/packages/common/lib/schema/types/link.js @@ -1,42 +1,26 @@ -"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _fp = require("lodash/fp"); -var _typeHelpers = require("./typeHelpers"); -var _index = require("../../common/index.js"); +"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _default2 = { + isType: function isType(schema) {return schema.type === "object" && schema.properties.modelId;}, + + fromSchema: function fromSchema(schema) {return { + type: "link", + modelId: schema.properties.modelId["const"], + viewId: schema.properties.viewId["const"], + "default": schema["default"] };}, + toSchema: function toSchema(field) {return { + type: "object", + properties: { + _id: { type: "string" }, + viewId: field.viewId ? { "const": field.viewId } : undefined, + modelId: field.modelId ? { "const": field.modelId } : undefined }, + + required: ["_id"], + "default": { _id: "" } };}, - -var linkNothing = function linkNothing() {return "";}; - -var linkFunctions = (0, _typeHelpers.typeFunctions)({ - "default": linkNothing }); - - -var linkTryParse = function linkTryParse(v) {return ( - (0, _index.switchCase)( - [_fp.isString, function (s) {return (0, _typeHelpers.parsedSuccess)(s);}], - [_fp.isNull, function () {return (0, _typeHelpers.parsedSuccess)(linkNothing());}], - [_fp.isUndefined, function () {return (0, _typeHelpers.parsedSuccess)(linkNothing());}], - [_index.defaultCase, function (s) {return (0, _typeHelpers.parsedSuccess)(s.toString());}])( - v));}; - -var options = { - modelId: { - defaultValue: "", - isValid: _index.isNonEmptyString, - requirementDescription: "must choose a model", - parse: function parse(s) {return s;} } }; - - - -var typeConstraints = [];var _default = - -(0, _typeHelpers.getDefaultExport)( -"link", -linkTryParse, -linkFunctions, -options, -typeConstraints, -"abcd1234", -JSON.stringify);exports["default"] = _default; + "default": function _default() {return { + type: "link", + modelId: null, + viewId: null };} };exports["default"] = _default2; //# sourceMappingURL=link.js.map \ No newline at end of file diff --git a/packages/common/lib/schema/types/link.js.map b/packages/common/lib/schema/types/link.js.map index 8bd94f4726..b9930a2c18 100644 --- a/packages/common/lib/schema/types/link.js.map +++ b/packages/common/lib/schema/types/link.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/link.js"],"names":["linkNothing","linkFunctions","linkTryParse","v","isString","s","isNull","isUndefined","defaultCase","toString","options","modelId","defaultValue","isValid","isNonEmptyString","requirementDescription","parse","typeConstraints","JSON","stringify"],"mappings":"uGAAA;AACA;AACA;;;;;;AAMA,IAAMA,WAAW,GAAG,SAAdA,WAAc,WAAM,EAAN,EAApB;;AAEA,IAAMC,aAAa,GAAG,gCAAc;AAClC,aAASD,WADyB,EAAd,CAAtB;;;AAIA,IAAME,YAAY,GAAG,SAAfA,YAAe,CAAAC,CAAC;AACpB;AACE,KAACC,YAAD,EAAW,UAAAC,CAAC,UAAI,gCAAcA,CAAd,CAAJ,EAAZ,CADF;AAEE,KAACC,UAAD,EAAS,oBAAM,gCAAcN,WAAW,EAAzB,CAAN,EAAT,CAFF;AAGE,KAACO,eAAD,EAAc,oBAAM,gCAAcP,WAAW,EAAzB,CAAN,EAAd,CAHF;AAIE,KAACQ,kBAAD,EAAc,UAAAH,CAAC,UAAI,gCAAcA,CAAC,CAACI,QAAF,EAAd,CAAJ,EAAf,CAJF;AAKEN,IAAAA,CALF,CADoB,GAAtB;;AAQA,IAAMO,OAAO,GAAG;AACdC,EAAAA,OAAO,EAAE;AACPC,IAAAA,YAAY,EAAE,EADP;AAEPC,IAAAA,OAAO,EAAEC,uBAFF;AAGPC,IAAAA,sBAAsB,EAAE,qBAHjB;AAIPC,IAAAA,KAAK,EAAE,eAAAX,CAAC,UAAIA,CAAJ,EAJD,EADK,EAAhB;;;;AASA,IAAMY,eAAe,GAAG,EAAxB,C;;AAEe;AACb,MADa;AAEbf,YAFa;AAGbD,aAHa;AAIbS,OAJa;AAKbO,eALa;AAMb,UANa;AAObC,IAAI,CAACC,SAPQ,C","sourcesContent":["import { isString, isUndefined, isNull } from \"lodash/fp\"\nimport { typeFunctions, parsedSuccess, getDefaultExport } from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n isNonEmptyString,\n} from \"../../common/index.js\"\n\nconst linkNothing = () => \"\"\n\nconst linkFunctions = typeFunctions({\n default: linkNothing,\n})\n\nconst linkTryParse = v =>\n switchCase(\n [isString, s => parsedSuccess(s)],\n [isNull, () => parsedSuccess(linkNothing())],\n [isUndefined, () => parsedSuccess(linkNothing())],\n [defaultCase, s => parsedSuccess(s.toString())]\n )(v)\n\nconst options = {\n modelId: {\n defaultValue: \"\",\n isValid: isNonEmptyString,\n requirementDescription: \"must choose a model\",\n parse: s => s,\n },\n}\n\nconst typeConstraints = []\n\nexport default getDefaultExport(\n \"link\",\n linkTryParse,\n linkFunctions,\n options,\n typeConstraints,\n \"abcd1234\",\n JSON.stringify\n)\n"],"file":"link.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/link.js"],"names":["isType","schema","type","properties","modelId","fromSchema","viewId","toSchema","field","_id","undefined","required"],"mappings":"uHAAe;AACbA,EAAAA,MAAM,EAAE,gBAAAC,MAAM,UAAIA,MAAM,CAACC,IAAP,KAAgB,QAAhB,IAA4BD,MAAM,CAACE,UAAP,CAAkBC,OAAlD,EADD;;AAGbC,EAAAA,UAAU,EAAE,oBAAAJ,MAAM,UAAK;AACrBC,MAAAA,IAAI,EAAE,MADe;AAErBE,MAAAA,OAAO,EAAEH,MAAM,CAACE,UAAP,CAAkBC,OAAlB,SAFY;AAGrBE,MAAAA,MAAM,EAAEL,MAAM,CAACE,UAAP,CAAkBG,MAAlB,SAHa;AAIrB,iBAASL,MAAM,WAJM,EAAL,EAHL;;;AAUbM,EAAAA,QAAQ,EAAE,kBAAAC,KAAK,UAAK;AAClBN,MAAAA,IAAI,EAAE,QADY;AAElBC,MAAAA,UAAU,EAAE;AACVM,QAAAA,GAAG,EAAE,EAAEP,IAAI,EAAE,QAAR,EADK;AAEVI,QAAAA,MAAM,EAAEE,KAAK,CAACF,MAAN,GAAe,EAAE,SAAOE,KAAK,CAACF,MAAf,EAAf,GAAyCI,SAFvC;AAGVN,QAAAA,OAAO,EAAEI,KAAK,CAACJ,OAAN,GAAgB,EAAE,SAAOI,KAAK,CAACJ,OAAf,EAAhB,GAA2CM,SAH1C,EAFM;;AAOlBC,MAAAA,QAAQ,EAAE,CAAC,KAAD,CAPQ;AAQlB,iBAAS,EAAEF,GAAG,EAAE,EAAP,EARS,EAAL,EAVF;;;AAqBb,aAAS,4BAAO;AACdP,MAAAA,IAAI,EAAE,MADQ;AAEdE,MAAAA,OAAO,EAAE,IAFK;AAGdE,MAAAA,MAAM,EAAE,IAHM,EAAP,EArBI,E","sourcesContent":["export default {\r\n isType: schema => schema.type === \"object\" && schema.properties.modelId,\r\n\r\n fromSchema: schema => ({\r\n type: \"link\",\r\n modelId: schema.properties.modelId.const,\r\n viewId: schema.properties.viewId.const,\r\n default: schema.default,\r\n }),\r\n\r\n toSchema: field => ({\r\n type: \"object\",\r\n properties: {\r\n _id: { type: \"string\" },\r\n viewId: field.viewId ? { const: field.viewId } : undefined,\r\n modelId: field.modelId ? { const: field.modelId } : undefined,\r\n },\r\n required: [\"_id\"],\r\n default: { _id: \"\" },\r\n }),\r\n\r\n default: () => ({\r\n type: \"link\",\r\n modelId: null,\r\n viewId: null,\r\n }),\r\n}\r\n"],"file":"link.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/number.js b/packages/common/lib/schema/types/number.js index 2ce66eb376..ef20ee930e 100644 --- a/packages/common/lib/schema/types/number.js +++ b/packages/common/lib/schema/types/number.js @@ -1,94 +1,14 @@ -"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _fp = require("lodash/fp"); -var _typeHelpers = require("./typeHelpers"); +"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports["default"] = void 0;var _default2 = { + isType: function isType(schema) {return schema.type === "number";}, + fromSchema: function fromSchema(schema) {return schema;}, + toSchema: function toSchema(field) {return { + type: "number", + maximum: field.maximum, + minimum: field.minimum, + "default": undefined };}, - - - - - -var _index = require("../../common/index.js"); - - - - - - -var numberFunctions = (0, _typeHelpers.typeFunctions)({ - "default": (0, _fp.constant)(null) }); - - -var parseStringtoNumberOrNull = function parseStringtoNumberOrNull(s) { - var num = Number(s); - return isNaN(num) ? (0, _typeHelpers.parsedFailed)(s) : (0, _typeHelpers.parsedSuccess)(num); -}; - -var numberTryParse = (0, _index.switchCase)( -[_fp.isNumber, _typeHelpers.parsedSuccess], -[_fp.isString, parseStringtoNumberOrNull], -[_fp.isNull, _typeHelpers.parsedSuccess], -[_index.defaultCase, _typeHelpers.parsedFailed]); - - -var options = { - maxValue: { - defaultValue: Number.MAX_SAFE_INTEGER, - isValid: _index.isSafeInteger, - requirementDescription: "must be a valid integer", - parse: _index.toNumberOrNull }, - - minValue: { - defaultValue: 0 - Number.MAX_SAFE_INTEGER, - isValid: _index.isSafeInteger, - requirementDescription: "must be a valid integer", - parse: _index.toNumberOrNull }, - - decimalPlaces: { - defaultValue: 0, - isValid: function isValid(n) {return (0, _index.isSafeInteger)(n) && n >= 0;}, - requirementDescription: "must be a positive integer", - parse: _index.toNumberOrNull } }; - - - -var getDecimalPlaces = function getDecimalPlaces(val) { - var splitDecimal = val.toString().split("."); - if (splitDecimal.length === 1) return 0; - return splitDecimal[1].length; -}; - -var typeConstraints = [ -(0, _typeHelpers.makerule)( -function (val, opts) {return ( - val === null || opts.minValue === null || val >= opts.minValue);}, -function (val, opts) {return "value (".concat( - val.toString(), ") must be greater than or equal to ").concat( - opts.minValue);}), - - -(0, _typeHelpers.makerule)( -function (val, opts) {return ( - val === null || opts.maxValue === null || val <= opts.maxValue);}, -function (val, opts) {return "value (".concat( - val.toString(), ") must be less than or equal to ").concat( - opts.minValue, " options");}), - - -(0, _typeHelpers.makerule)( -function (val, opts) {return ( - val === null || opts.decimalPlaces >= getDecimalPlaces(val));}, -function (val, opts) {return "value (".concat( - val.toString(), ") must have ").concat( - opts.decimalPlaces, " decimal places or less");})];var _default = - - - - -(0, _typeHelpers.getDefaultExport)( -"number", -numberTryParse, -numberFunctions, -options, -typeConstraints, -1, -function (num) {return num.toString();});exports["default"] = _default; + "default": function _default() {return { + type: "number", + maximum: null, + minimum: null };} };exports["default"] = _default2; //# sourceMappingURL=number.js.map \ No newline at end of file diff --git a/packages/common/lib/schema/types/number.js.map b/packages/common/lib/schema/types/number.js.map index 9d2b7cf610..1f8afe4adf 100644 --- a/packages/common/lib/schema/types/number.js.map +++ b/packages/common/lib/schema/types/number.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/number.js"],"names":["numberFunctions","parseStringtoNumberOrNull","s","num","Number","isNaN","numberTryParse","isNumber","parsedSuccess","isString","isNull","defaultCase","parsedFailed","options","maxValue","defaultValue","MAX_SAFE_INTEGER","isValid","isSafeInteger","requirementDescription","parse","toNumberOrNull","minValue","decimalPlaces","n","getDecimalPlaces","val","splitDecimal","toString","split","length","typeConstraints","opts"],"mappings":"uGAAA;AACA;;;;;;;AAOA;;;;;;;AAOA,IAAMA,eAAe,GAAG,gCAAc;AACpC,aAAS,kBAAS,IAAT,CAD2B,EAAd,CAAxB;;;AAIA,IAAMC,yBAAyB,GAAG,SAA5BA,yBAA4B,CAAAC,CAAC,EAAI;AACrC,MAAMC,GAAG,GAAGC,MAAM,CAACF,CAAD,CAAlB;AACA,SAAOG,KAAK,CAACF,GAAD,CAAL,GAAa,+BAAaD,CAAb,CAAb,GAA+B,gCAAcC,GAAd,CAAtC;AACD,CAHD;;AAKA,IAAMG,cAAc,GAAG;AACrB,CAACC,YAAD,EAAWC,0BAAX,CADqB;AAErB,CAACC,YAAD,EAAWR,yBAAX,CAFqB;AAGrB,CAACS,UAAD,EAASF,0BAAT,CAHqB;AAIrB,CAACG,kBAAD,EAAcC,yBAAd,CAJqB,CAAvB;;;AAOA,IAAMC,OAAO,GAAG;AACdC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,YAAY,EAAEX,MAAM,CAACY,gBADb;AAERC,IAAAA,OAAO,EAAEC,oBAFD;AAGRC,IAAAA,sBAAsB,EAAE,yBAHhB;AAIRC,IAAAA,KAAK,EAAEC,qBAJC,EADI;;AAOdC,EAAAA,QAAQ,EAAE;AACRP,IAAAA,YAAY,EAAE,IAAIX,MAAM,CAACY,gBADjB;AAERC,IAAAA,OAAO,EAAEC,oBAFD;AAGRC,IAAAA,sBAAsB,EAAE,yBAHhB;AAIRC,IAAAA,KAAK,EAAEC,qBAJC,EAPI;;AAadE,EAAAA,aAAa,EAAE;AACbR,IAAAA,YAAY,EAAE,CADD;AAEbE,IAAAA,OAAO,EAAE,iBAAAO,CAAC,UAAI,0BAAcA,CAAd,KAAoBA,CAAC,IAAI,CAA7B,EAFG;AAGbL,IAAAA,sBAAsB,EAAE,4BAHX;AAIbC,IAAAA,KAAK,EAAEC,qBAJM,EAbD,EAAhB;;;;AAqBA,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAmB,CAAAC,GAAG,EAAI;AAC9B,MAAMC,YAAY,GAAGD,GAAG,CAACE,QAAJ,GAAeC,KAAf,CAAqB,GAArB,CAArB;AACA,MAAIF,YAAY,CAACG,MAAb,KAAwB,CAA5B,EAA+B,OAAO,CAAP;AAC/B,SAAOH,YAAY,CAAC,CAAD,CAAZ,CAAgBG,MAAvB;AACD,CAJD;;AAMA,IAAMC,eAAe,GAAG;AACtB;AACE,UAACL,GAAD,EAAMM,IAAN;AACEN,IAAAA,GAAG,KAAK,IAAR,IAAgBM,IAAI,CAACV,QAAL,KAAkB,IAAlC,IAA0CI,GAAG,IAAIM,IAAI,CAACV,QADxD,GADF;AAGE,UAACI,GAAD,EAAMM,IAAN;AACYN,EAAAA,GAAG,CAACE,QAAJ,EADZ;AAEII,EAAAA,IAAI,CAACV,QAFT,GAHF,CADsB;;;AAStB;AACE,UAACI,GAAD,EAAMM,IAAN;AACEN,IAAAA,GAAG,KAAK,IAAR,IAAgBM,IAAI,CAAClB,QAAL,KAAkB,IAAlC,IAA0CY,GAAG,IAAIM,IAAI,CAAClB,QADxD,GADF;AAGE,UAACY,GAAD,EAAMM,IAAN;AACYN,EAAAA,GAAG,CAACE,QAAJ,EADZ;AAEII,EAAAA,IAAI,CAACV,QAFT,eAHF,CATsB;;;AAiBtB;AACE,UAACI,GAAD,EAAMM,IAAN;AACEN,IAAAA,GAAG,KAAK,IAAR,IAAgBM,IAAI,CAACT,aAAL,IAAsBE,gBAAgB,CAACC,GAAD,CADxD,GADF;AAGE,UAACA,GAAD,EAAMM,IAAN;AACYN,EAAAA,GAAG,CAACE,QAAJ,EADZ;AAEII,EAAAA,IAAI,CAACT,aAFT,8BAHF,CAjBsB,CAAxB,C;;;;;AA2Be;AACb,QADa;AAEbjB,cAFa;AAGbN,eAHa;AAIba,OAJa;AAKbkB,eALa;AAMb,CANa;AAOb,UAAA5B,GAAG,UAAIA,GAAG,CAACyB,QAAJ,EAAJ,EAPU,C","sourcesContent":["import { constant, isNumber, isString, isNull } from \"lodash/fp\"\nimport {\n makerule,\n typeFunctions,\n parsedFailed,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n toNumberOrNull,\n isSafeInteger,\n} from \"../../common/index.js\"\n\nconst numberFunctions = typeFunctions({\n default: constant(null),\n})\n\nconst parseStringtoNumberOrNull = s => {\n const num = Number(s)\n return isNaN(num) ? parsedFailed(s) : parsedSuccess(num)\n}\n\nconst numberTryParse = switchCase(\n [isNumber, parsedSuccess],\n [isString, parseStringtoNumberOrNull],\n [isNull, parsedSuccess],\n [defaultCase, parsedFailed]\n)\n\nconst options = {\n maxValue: {\n defaultValue: Number.MAX_SAFE_INTEGER,\n isValid: isSafeInteger,\n requirementDescription: \"must be a valid integer\",\n parse: toNumberOrNull,\n },\n minValue: {\n defaultValue: 0 - Number.MAX_SAFE_INTEGER,\n isValid: isSafeInteger,\n requirementDescription: \"must be a valid integer\",\n parse: toNumberOrNull,\n },\n decimalPlaces: {\n defaultValue: 0,\n isValid: n => isSafeInteger(n) && n >= 0,\n requirementDescription: \"must be a positive integer\",\n parse: toNumberOrNull,\n },\n}\n\nconst getDecimalPlaces = val => {\n const splitDecimal = val.toString().split(\".\")\n if (splitDecimal.length === 1) return 0\n return splitDecimal[1].length\n}\n\nconst typeConstraints = [\n makerule(\n (val, opts) =>\n val === null || opts.minValue === null || val >= opts.minValue,\n (val, opts) =>\n `value (${val.toString()}) must be greater than or equal to ${\n opts.minValue\n }`\n ),\n makerule(\n (val, opts) =>\n val === null || opts.maxValue === null || val <= opts.maxValue,\n (val, opts) =>\n `value (${val.toString()}) must be less than or equal to ${\n opts.minValue\n } options`\n ),\n makerule(\n (val, opts) =>\n val === null || opts.decimalPlaces >= getDecimalPlaces(val),\n (val, opts) =>\n `value (${val.toString()}) must have ${\n opts.decimalPlaces\n } decimal places or less`\n ),\n]\n\nexport default getDefaultExport(\n \"number\",\n numberTryParse,\n numberFunctions,\n options,\n typeConstraints,\n 1,\n num => num.toString()\n)\n"],"file":"number.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/number.js"],"names":["isType","schema","type","fromSchema","toSchema","field","maximum","minimum","undefined"],"mappings":"uHAAe;AACbA,EAAAA,MAAM,EAAE,gBAAAC,MAAM,UAAIA,MAAM,CAACC,IAAP,KAAgB,QAApB,EADD;AAEbC,EAAAA,UAAU,EAAE,oBAAAF,MAAM,UAAIA,MAAJ,EAFL;AAGbG,EAAAA,QAAQ,EAAE,kBAAAC,KAAK,UAAK;AAClBH,MAAAA,IAAI,EAAE,QADY;AAElBI,MAAAA,OAAO,EAAED,KAAK,CAACC,OAFG;AAGlBC,MAAAA,OAAO,EAAEF,KAAK,CAACE,OAHG;AAIlB,iBAASC,SAJS,EAAL,EAHF;;AASb,aAAS,4BAAO;AACdN,MAAAA,IAAI,EAAE,QADQ;AAEdI,MAAAA,OAAO,EAAE,IAFK;AAGdC,MAAAA,OAAO,EAAE,IAHK,EAAP,EATI,E","sourcesContent":["export default {\r\n isType: schema => schema.type === \"number\",\r\n fromSchema: schema => schema,\r\n toSchema: field => ({\r\n type: \"number\",\r\n maximum: field.maximum,\r\n minimum: field.minimum,\r\n default: undefined,\r\n }),\r\n default: () => ({\r\n type: \"number\",\r\n maximum: null,\r\n minimum: null,\r\n }),\r\n}\r\n"],"file":"number.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/object.js.map b/packages/common/lib/schema/types/object.js.map index 3ff33f277a..17b00f7537 100644 --- a/packages/common/lib/schema/types/object.js.map +++ b/packages/common/lib/schema/types/object.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/object.js"],"names":["objectFunctions","definition","allTypes","initialise","defClone","k","getNew","parseObject","record","type","safeParseValue","objectTryParse","isNull","parsedSuccess","isObject","defaultCase","parsedFailed","typeName","defaultOptions","typeConstraints","sampleValue","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;AAMA;;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,UAAD,EAAaC,QAAb;AACtB,oCAAc;AACZ,iBAAS,sBAAS,IAAT,CADG;AAEZC,MAAAA,UAAU,EAAE;AACV,wBAAE,kBAAKF,UAAL,CAAF,EAAoB;AAClB,2BAAI,YAAM;AACR,gBAAMG,QAAQ,GAAG,mBAAMH,UAAN,CAAjB;AACA,iBAAK,IAAMI,CAAX,IAAgBD,QAAhB,EAA0B;AACxBA,cAAAA,QAAQ,CAACC,CAAD,CAAR,GAAcH,QAAQ,CAACG,CAAD,CAAR,CAAYC,MAAZ,EAAd;AACD;AACD,mBAAOF,QAAP;AACD,WAND,CADkB,CAApB,CADU,GAFA,EAAd,CADsB,GAAxB;;;;AAeA,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAACN,UAAD,EAAaC,QAAb,UAA0B,UAAAM,MAAM,EAAI;AACtD,QAAMJ,QAAQ,GAAG,mBAAMH,UAAN,CAAjB;AACA,SAAK,IAAMI,CAAX,IAAgBD,QAAhB,EAA0B;AACxB,UAAMK,IAAI,GAAGP,QAAQ,CAACE,QAAQ,CAACC,CAAD,CAAT,CAArB;AACAD,MAAAA,QAAQ,CAACC,CAAD,CAAR,GAAc,iBAAIG,MAAJ,EAAYH,CAAZ;AACVI,MAAAA,IAAI,CAACC,cAAL,CAAoBF,MAAM,CAACH,CAAD,CAA1B,CADU;AAEVI,MAAAA,IAAI,CAACH,MAAL,EAFJ;AAGD;AACD,WAAO,gCAAcF,QAAd,CAAP;AACD,GATmB,EAApB;;AAWA,IAAMO,cAAc,GAAG,SAAjBA,cAAiB,CAACV,UAAD,EAAaC,QAAb;AACrB;AACE,KAACU,cAAD,EAASC,0BAAT,CADF;AAEE,KAACC,gBAAD,EAAWP,WAAW,CAACN,UAAD,EAAaC,QAAb,CAAtB,CAFF;AAGE,KAACa,kBAAD,EAAcC,yBAAd,CAHF,CADqB,GAAvB,C;;;AAOe;AACbC,QADa;AAEbhB,UAFa;AAGbC,QAHa;AAIbgB,cAJa;AAKbC,eALa;AAMbC,WANa;;AAQb;AACEH,IAAAA,QADF;AAEEN,IAAAA,cAAc,CAACV,UAAD,EAAaC,QAAb,CAFhB;AAGEF,IAAAA,eAAe,CAACC,UAAD,EAAaC,QAAb,CAHjB;AAIEgB,IAAAA,cAJF;AAKEC,IAAAA,eALF;AAMEC,IAAAA,WANF;AAOEC,IAAAA,IAAI,CAACC,SAPP,CARa,G","sourcesContent":["import { keys, isObject, has, clone, map, isNull, constant } from \"lodash\"\nimport {\n typeFunctions,\n parsedFailed,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport { switchCase, defaultCase, $ } from \"../../common/index.js\"\n\nconst objectFunctions = (definition, allTypes) =>\n typeFunctions({\n default: constant(null),\n initialise: () =>\n $(keys(definition), [\n map(() => {\n const defClone = clone(definition)\n for (const k in defClone) {\n defClone[k] = allTypes[k].getNew()\n }\n return defClone\n }),\n ]),\n })\n\nconst parseObject = (definition, allTypes) => record => {\n const defClone = clone(definition)\n for (const k in defClone) {\n const type = allTypes[defClone[k]]\n defClone[k] = has(record, k)\n ? type.safeParseValue(record[k])\n : type.getNew()\n }\n return parsedSuccess(defClone)\n}\n\nconst objectTryParse = (definition, allTypes) =>\n switchCase(\n [isNull, parsedSuccess],\n [isObject, parseObject(definition, allTypes)],\n [defaultCase, parsedFailed]\n )\n\nexport default (\n typeName,\n definition,\n allTypes,\n defaultOptions,\n typeConstraints,\n sampleValue\n) =>\n getDefaultExport(\n typeName,\n objectTryParse(definition, allTypes),\n objectFunctions(definition, allTypes),\n defaultOptions,\n typeConstraints,\n sampleValue,\n JSON.stringify\n )\n"],"file":"object.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/object.js"],"names":["objectFunctions","definition","allTypes","initialise","defClone","k","getNew","parseObject","record","type","safeParseValue","objectTryParse","isNull","parsedSuccess","isObject","defaultCase","parsedFailed","typeName","defaultOptions","typeConstraints","sampleValue","JSON","stringify"],"mappings":"uGAAA;AACA;;;;;;AAMA;;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,UAAD,EAAaC,QAAb;AACtB,oCAAc;AACZ,iBAAS,sBAAS,IAAT,CADG;AAEZC,MAAAA,UAAU,EAAE;AACV,wBAAE,kBAAKF,UAAL,CAAF,EAAoB;AAClB,2BAAI,YAAM;AACR,gBAAMG,QAAQ,GAAG,mBAAMH,UAAN,CAAjB;AACA,iBAAK,IAAMI,CAAX,IAAgBD,QAAhB,EAA0B;AACxBA,cAAAA,QAAQ,CAACC,CAAD,CAAR,GAAcH,QAAQ,CAACG,CAAD,CAAR,CAAYC,MAAZ,EAAd;AACD;AACD,mBAAOF,QAAP;AACD,WAND,CADkB,CAApB,CADU,GAFA,EAAd,CADsB,GAAxB;;;;AAeA,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAACN,UAAD,EAAaC,QAAb,UAA0B,UAAAM,MAAM,EAAI;AACtD,QAAMJ,QAAQ,GAAG,mBAAMH,UAAN,CAAjB;AACA,SAAK,IAAMI,CAAX,IAAgBD,QAAhB,EAA0B;AACxB,UAAMK,IAAI,GAAGP,QAAQ,CAACE,QAAQ,CAACC,CAAD,CAAT,CAArB;AACAD,MAAAA,QAAQ,CAACC,CAAD,CAAR,GAAc,iBAAIG,MAAJ,EAAYH,CAAZ;AACVI,MAAAA,IAAI,CAACC,cAAL,CAAoBF,MAAM,CAACH,CAAD,CAA1B,CADU;AAEVI,MAAAA,IAAI,CAACH,MAAL,EAFJ;AAGD;AACD,WAAO,gCAAcF,QAAd,CAAP;AACD,GATmB,EAApB;;AAWA,IAAMO,cAAc,GAAG,SAAjBA,cAAiB,CAACV,UAAD,EAAaC,QAAb;AACrB;AACE,KAACU,cAAD,EAASC,0BAAT,CADF;AAEE,KAACC,gBAAD,EAAWP,WAAW,CAACN,UAAD,EAAaC,QAAb,CAAtB,CAFF;AAGE,KAACa,kBAAD,EAAcC,yBAAd,CAHF,CADqB,GAAvB,C;;;AAOe;AACbC,QADa;AAEbhB,UAFa;AAGbC,QAHa;AAIbgB,cAJa;AAKbC,eALa;AAMbC,WANa;;AAQb;AACEH,IAAAA,QADF;AAEEN,IAAAA,cAAc,CAACV,UAAD,EAAaC,QAAb,CAFhB;AAGEF,IAAAA,eAAe,CAACC,UAAD,EAAaC,QAAb,CAHjB;AAIEgB,IAAAA,cAJF;AAKEC,IAAAA,eALF;AAMEC,IAAAA,WANF;AAOEC,IAAAA,IAAI,CAACC,SAPP,CARa,G","sourcesContent":["import { keys, isObject, has, clone, map, isNull, constant } from \"lodash\"\r\nimport {\r\n typeFunctions,\r\n parsedFailed,\r\n parsedSuccess,\r\n getDefaultExport,\r\n} from \"./typeHelpers\"\r\nimport { switchCase, defaultCase, $ } from \"../../common/index.js\"\r\n\r\nconst objectFunctions = (definition, allTypes) =>\r\n typeFunctions({\r\n default: constant(null),\r\n initialise: () =>\r\n $(keys(definition), [\r\n map(() => {\r\n const defClone = clone(definition)\r\n for (const k in defClone) {\r\n defClone[k] = allTypes[k].getNew()\r\n }\r\n return defClone\r\n }),\r\n ]),\r\n })\r\n\r\nconst parseObject = (definition, allTypes) => record => {\r\n const defClone = clone(definition)\r\n for (const k in defClone) {\r\n const type = allTypes[defClone[k]]\r\n defClone[k] = has(record, k)\r\n ? type.safeParseValue(record[k])\r\n : type.getNew()\r\n }\r\n return parsedSuccess(defClone)\r\n}\r\n\r\nconst objectTryParse = (definition, allTypes) =>\r\n switchCase(\r\n [isNull, parsedSuccess],\r\n [isObject, parseObject(definition, allTypes)],\r\n [defaultCase, parsedFailed]\r\n )\r\n\r\nexport default (\r\n typeName,\r\n definition,\r\n allTypes,\r\n defaultOptions,\r\n typeConstraints,\r\n sampleValue\r\n) =>\r\n getDefaultExport(\r\n typeName,\r\n objectTryParse(definition, allTypes),\r\n objectFunctions(definition, allTypes),\r\n defaultOptions,\r\n typeConstraints,\r\n sampleValue,\r\n JSON.stringify\r\n )\r\n"],"file":"object.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/string.js.map b/packages/common/lib/schema/types/string.js.map index 12eb59c17c..aa3642239b 100644 --- a/packages/common/lib/schema/types/string.js.map +++ b/packages/common/lib/schema/types/string.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/string.js"],"names":["stringFunctions","stringTryParse","isString","parsedSuccess","isNull","defaultCase","v","toString","options","maxLength","defaultValue","isValid","n","requirementDescription","parse","toNumberOrNull","values","length","s","allowDeclaredValuesOnly","isBoolean","toBoolOrNull","typeConstraints","val","opts","str"],"mappings":"uGAAA;AACA;;;;;;AAMA;;;;;;;;;AASA,IAAMA,eAAe,GAAG,gCAAc;AACpC,aAAS,kBAAS,IAAT,CAD2B,EAAd,CAAxB;;;AAIA,IAAMC,cAAc,GAAG;AACrB,CAACC,YAAD,EAAWC,0BAAX,CADqB;AAErB,CAACC,UAAD,EAASD,0BAAT,CAFqB;AAGrB,CAACE,kBAAD,EAAc,UAAAC,CAAC,UAAI,gCAAcA,CAAC,CAACC,QAAF,EAAd,CAAJ,EAAf,CAHqB,CAAvB;;;AAMA,IAAMC,OAAO,GAAG;AACdC,EAAAA,SAAS,EAAE;AACTC,IAAAA,YAAY,EAAE,IADL;AAETC,IAAAA,OAAO,EAAE,iBAAAC,CAAC,UAAIA,CAAC,KAAK,IAAN,IAAe,0BAAcA,CAAd,KAAoBA,CAAC,GAAG,CAA3C,EAFD;AAGTC,IAAAA,sBAAsB;AACpB,uEAJO;AAKTC,IAAAA,KAAK,EAAEC,qBALE,EADG;;AAQdC,EAAAA,MAAM,EAAE;AACNN,IAAAA,YAAY,EAAE,IADR;AAENC,IAAAA,OAAO,EAAE,iBAAAL,CAAC;AACRA,QAAAA,CAAC,KAAK,IAAN,IAAe,4BAAgBA,CAAhB,KAAsBA,CAAC,CAACW,MAAF,GAAW,CAAjC,IAAsCX,CAAC,CAACW,MAAF,GAAW,KADxD,GAFJ;AAINJ,IAAAA,sBAAsB;AACpB,0EALI;AAMNC,IAAAA,KAAK,EAAE,eAAAI,CAAC,UAAIA,CAAJ,EANF,EARM;;AAgBdC,EAAAA,uBAAuB,EAAE;AACvBT,IAAAA,YAAY,EAAE,KADS;AAEvBC,IAAAA,OAAO,EAAES,aAFc;AAGvBP,IAAAA,sBAAsB,EAAE,+CAHD;AAIvBC,IAAAA,KAAK,EAAEO,mBAJgB,EAhBX,EAAhB;;;;AAwBA,IAAMC,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR,IAAgBC,IAAI,CAACf,SAAL,KAAmB,IAAnC,IAA2Cc,GAAG,CAACN,MAAJ,IAAcO,IAAI,CAACf,SADhE,GADF;AAGE,UAACc,GAAD,EAAMC,IAAN,oDAAkDA,IAAI,CAACf,SAAvD,GAHF,CADsB;;AAMtB;AACE,UAACc,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR;AACAC,IAAAA,IAAI,CAACL,uBAAL,KAAiC,KADjC;AAEA,sBAASI,GAAT,EAAcC,IAAI,CAACR,MAAnB,CAHF,GADF;AAKE,UAAAO,GAAG,sBAAQA,GAAR,sDALL,CANsB,CAAxB,C;;;;AAee;AACb,QADa;AAEbtB,cAFa;AAGbD,eAHa;AAIbQ,OAJa;AAKbc,eALa;AAMb,OANa;AAOb,UAAAG,GAAG,UAAIA,GAAJ,EAPU,C","sourcesContent":["import { constant, isString, isNull, includes, isBoolean } from \"lodash/fp\"\nimport {\n typeFunctions,\n makerule,\n parsedSuccess,\n getDefaultExport,\n} from \"./typeHelpers\"\nimport {\n switchCase,\n defaultCase,\n toBoolOrNull,\n toNumberOrNull,\n isSafeInteger,\n isArrayOfString,\n} from \"../../common/index.js\"\n\nconst stringFunctions = typeFunctions({\n default: constant(null),\n})\n\nconst stringTryParse = switchCase(\n [isString, parsedSuccess],\n [isNull, parsedSuccess],\n [defaultCase, v => parsedSuccess(v.toString())]\n)\n\nconst options = {\n maxLength: {\n defaultValue: null,\n isValid: n => n === null || (isSafeInteger(n) && n > 0),\n requirementDescription:\n \"max length must be null (no limit) or a greater than zero integer\",\n parse: toNumberOrNull,\n },\n values: {\n defaultValue: null,\n isValid: v =>\n v === null || (isArrayOfString(v) && v.length > 0 && v.length < 10000),\n requirementDescription:\n \"'values' must be null (no values) or an array of at least one string\",\n parse: s => s,\n },\n allowDeclaredValuesOnly: {\n defaultValue: false,\n isValid: isBoolean,\n requirementDescription: \"allowDeclaredValuesOnly must be true or false\",\n parse: toBoolOrNull,\n },\n}\n\nconst typeConstraints = [\n makerule(\n (val, opts) =>\n val === null || opts.maxLength === null || val.length <= opts.maxLength,\n (val, opts) => `value exceeds maximum length of ${opts.maxLength}`\n ),\n makerule(\n (val, opts) =>\n val === null ||\n opts.allowDeclaredValuesOnly === false ||\n includes(val)(opts.values),\n val => `\"${val}\" does not exist in the list of allowed values`\n ),\n]\n\nexport default getDefaultExport(\n \"string\",\n stringTryParse,\n stringFunctions,\n options,\n typeConstraints,\n \"abcde\",\n str => str\n)\n"],"file":"string.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/string.js"],"names":["stringFunctions","stringTryParse","isString","parsedSuccess","isNull","defaultCase","v","toString","options","maxLength","defaultValue","isValid","n","requirementDescription","parse","toNumberOrNull","values","length","s","allowDeclaredValuesOnly","isBoolean","toBoolOrNull","typeConstraints","val","opts","str"],"mappings":"uGAAA;AACA;;;;;;AAMA;;;;;;;;;AASA,IAAMA,eAAe,GAAG,gCAAc;AACpC,aAAS,kBAAS,IAAT,CAD2B,EAAd,CAAxB;;;AAIA,IAAMC,cAAc,GAAG;AACrB,CAACC,YAAD,EAAWC,0BAAX,CADqB;AAErB,CAACC,UAAD,EAASD,0BAAT,CAFqB;AAGrB,CAACE,kBAAD,EAAc,UAAAC,CAAC,UAAI,gCAAcA,CAAC,CAACC,QAAF,EAAd,CAAJ,EAAf,CAHqB,CAAvB;;;AAMA,IAAMC,OAAO,GAAG;AACdC,EAAAA,SAAS,EAAE;AACTC,IAAAA,YAAY,EAAE,IADL;AAETC,IAAAA,OAAO,EAAE,iBAAAC,CAAC,UAAIA,CAAC,KAAK,IAAN,IAAe,0BAAcA,CAAd,KAAoBA,CAAC,GAAG,CAA3C,EAFD;AAGTC,IAAAA,sBAAsB;AACpB,uEAJO;AAKTC,IAAAA,KAAK,EAAEC,qBALE,EADG;;AAQdC,EAAAA,MAAM,EAAE;AACNN,IAAAA,YAAY,EAAE,IADR;AAENC,IAAAA,OAAO,EAAE,iBAAAL,CAAC;AACRA,QAAAA,CAAC,KAAK,IAAN,IAAe,4BAAgBA,CAAhB,KAAsBA,CAAC,CAACW,MAAF,GAAW,CAAjC,IAAsCX,CAAC,CAACW,MAAF,GAAW,KADxD,GAFJ;AAINJ,IAAAA,sBAAsB;AACpB,0EALI;AAMNC,IAAAA,KAAK,EAAE,eAAAI,CAAC,UAAIA,CAAJ,EANF,EARM;;AAgBdC,EAAAA,uBAAuB,EAAE;AACvBT,IAAAA,YAAY,EAAE,KADS;AAEvBC,IAAAA,OAAO,EAAES,aAFc;AAGvBP,IAAAA,sBAAsB,EAAE,+CAHD;AAIvBC,IAAAA,KAAK,EAAEO,mBAJgB,EAhBX,EAAhB;;;;AAwBA,IAAMC,eAAe,GAAG;AACtB;AACE,UAACC,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR,IAAgBC,IAAI,CAACf,SAAL,KAAmB,IAAnC,IAA2Cc,GAAG,CAACN,MAAJ,IAAcO,IAAI,CAACf,SADhE,GADF;AAGE,UAACc,GAAD,EAAMC,IAAN,oDAAkDA,IAAI,CAACf,SAAvD,GAHF,CADsB;;AAMtB;AACE,UAACc,GAAD,EAAMC,IAAN;AACED,IAAAA,GAAG,KAAK,IAAR;AACAC,IAAAA,IAAI,CAACL,uBAAL,KAAiC,KADjC;AAEA,sBAASI,GAAT,EAAcC,IAAI,CAACR,MAAnB,CAHF,GADF;AAKE,UAAAO,GAAG,sBAAQA,GAAR,sDALL,CANsB,CAAxB,C;;;;AAee;AACb,QADa;AAEbtB,cAFa;AAGbD,eAHa;AAIbQ,OAJa;AAKbc,eALa;AAMb,OANa;AAOb,UAAAG,GAAG,UAAIA,GAAJ,EAPU,C","sourcesContent":["import { constant, isString, isNull, includes, isBoolean } from \"lodash/fp\"\r\nimport {\r\n typeFunctions,\r\n makerule,\r\n parsedSuccess,\r\n getDefaultExport,\r\n} from \"./typeHelpers\"\r\nimport {\r\n switchCase,\r\n defaultCase,\r\n toBoolOrNull,\r\n toNumberOrNull,\r\n isSafeInteger,\r\n isArrayOfString,\r\n} from \"../../common/index.js\"\r\n\r\nconst stringFunctions = typeFunctions({\r\n default: constant(null),\r\n})\r\n\r\nconst stringTryParse = switchCase(\r\n [isString, parsedSuccess],\r\n [isNull, parsedSuccess],\r\n [defaultCase, v => parsedSuccess(v.toString())]\r\n)\r\n\r\nconst options = {\r\n maxLength: {\r\n defaultValue: null,\r\n isValid: n => n === null || (isSafeInteger(n) && n > 0),\r\n requirementDescription:\r\n \"max length must be null (no limit) or a greater than zero integer\",\r\n parse: toNumberOrNull,\r\n },\r\n values: {\r\n defaultValue: null,\r\n isValid: v =>\r\n v === null || (isArrayOfString(v) && v.length > 0 && v.length < 10000),\r\n requirementDescription:\r\n \"'values' must be null (no values) or an array of at least one string\",\r\n parse: s => s,\r\n },\r\n allowDeclaredValuesOnly: {\r\n defaultValue: false,\r\n isValid: isBoolean,\r\n requirementDescription: \"allowDeclaredValuesOnly must be true or false\",\r\n parse: toBoolOrNull,\r\n },\r\n}\r\n\r\nconst typeConstraints = [\r\n makerule(\r\n (val, opts) =>\r\n val === null || opts.maxLength === null || val.length <= opts.maxLength,\r\n (val, opts) => `value exceeds maximum length of ${opts.maxLength}`\r\n ),\r\n makerule(\r\n (val, opts) =>\r\n val === null ||\r\n opts.allowDeclaredValuesOnly === false ||\r\n includes(val)(opts.values),\r\n val => `\"${val}\" does not exist in the list of allowed values`\r\n ),\r\n]\r\n\r\nexport default getDefaultExport(\r\n \"string\",\r\n stringTryParse,\r\n stringFunctions,\r\n options,\r\n typeConstraints,\r\n \"abcde\",\r\n str => str\r\n)\r\n"],"file":"string.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/types/typeHelpers.js.map b/packages/common/lib/schema/types/typeHelpers.js.map index ed19a398da..17b6e203ca 100644 --- a/packages/common/lib/schema/types/typeHelpers.js.map +++ b/packages/common/lib/schema/types/typeHelpers.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/schema/types/typeHelpers.js"],"names":["getSafeFieldParser","tryParse","defaultValueFunctions","field","record","name","getSafeValueParser","getUndefinedValue","value","parsed","success","getNewValue","getInitialValue","typeFunctions","specificFunctions","constant","validateTypeConstraints","validationRules","fieldValue","validateRule","r","isValid","typeOptions","getMessage","errors","err","push","getDefaultOptions","v","defaultValue","makerule","parsedFailed","val","parsedSuccess","getDefaultExport","functions","options","sampleValue","stringify","getNew","safeParseField","safeParseValue","optionDefinitions","undefined","getDefaultValue"],"mappings":"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","sourcesContent":["import { merge } from \"lodash\"\nimport { constant, isUndefined, has, mapValues, cloneDeep } from \"lodash/fp\"\nimport { isNotEmpty } from \"../../common/index.js\"\n\nexport const getSafeFieldParser = (tryParse, defaultValueFunctions) => (\n field,\n record\n) => {\n if (has(field.name)(record)) {\n return getSafeValueParser(\n tryParse,\n defaultValueFunctions\n )(record[field.name])\n }\n return defaultValueFunctions[field.getUndefinedValue]()\n}\n\nexport const getSafeValueParser = (\n tryParse,\n defaultValueFunctions\n) => value => {\n const parsed = tryParse(value)\n if (parsed.success) {\n return parsed.value\n }\n return defaultValueFunctions.default()\n}\n\nexport const getNewValue = (tryParse, defaultValueFunctions) => field => {\n const getInitialValue =\n isUndefined(field) || isUndefined(field.getInitialValue)\n ? \"default\"\n : field.getInitialValue\n\n return has(getInitialValue)(defaultValueFunctions)\n ? defaultValueFunctions[getInitialValue]()\n : getSafeValueParser(tryParse, defaultValueFunctions)(getInitialValue)\n}\n\nexport const typeFunctions = specificFunctions =>\n merge(\n {\n value: constant,\n null: constant(null),\n },\n specificFunctions\n )\n\nexport const validateTypeConstraints = validationRules => (field, record) => {\n const fieldValue = record[field.name]\n const validateRule = r =>\n !r.isValid(fieldValue, field.typeOptions)\n ? r.getMessage(fieldValue, field.typeOptions)\n : \"\"\n\n const errors = []\n for (const r of validationRules) {\n const err = validateRule(r)\n if (isNotEmpty(err)) errors.push(err)\n }\n\n return errors\n}\n\nconst getDefaultOptions = mapValues(v => v.defaultValue)\n\nexport const makerule = (isValid, getMessage) => ({ isValid, getMessage })\nexport const parsedFailed = val => ({ success: false, value: val })\nexport const parsedSuccess = val => ({ success: true, value: val })\nexport const getDefaultExport = (\n name,\n tryParse,\n functions,\n options,\n validationRules,\n sampleValue,\n stringify\n) => ({\n getNew: getNewValue(tryParse, functions),\n safeParseField: getSafeFieldParser(tryParse, functions),\n safeParseValue: getSafeValueParser(tryParse, functions),\n tryParse,\n name,\n getDefaultOptions: () => getDefaultOptions(cloneDeep(options)),\n optionDefinitions: options,\n validateTypeConstraints: validateTypeConstraints(validationRules),\n sampleValue,\n stringify: val => (val === null || val === undefined ? \"\" : stringify(val)),\n getDefaultValue: functions.default,\n})\n"],"file":"typeHelpers.js"} \ No newline at end of file +{"version":3,"sources":["../../../src/schema/types/typeHelpers.js"],"names":["getSafeFieldParser","tryParse","defaultValueFunctions","field","record","name","getSafeValueParser","getUndefinedValue","value","parsed","success","getNewValue","getInitialValue","typeFunctions","specificFunctions","constant","validateTypeConstraints","validationRules","fieldValue","validateRule","r","isValid","typeOptions","getMessage","errors","err","push","getDefaultOptions","v","defaultValue","makerule","parsedFailed","val","parsedSuccess","getDefaultExport","functions","options","sampleValue","stringify","getNew","safeParseField","safeParseValue","optionDefinitions","undefined","getDefaultValue"],"mappings":"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","sourcesContent":["import { merge } from \"lodash\"\r\nimport { constant, isUndefined, has, mapValues, cloneDeep } from \"lodash/fp\"\r\nimport { isNotEmpty } from \"../../common/index.js\"\r\n\r\nexport const getSafeFieldParser = (tryParse, defaultValueFunctions) => (\r\n field,\r\n record\r\n) => {\r\n if (has(field.name)(record)) {\r\n return getSafeValueParser(\r\n tryParse,\r\n defaultValueFunctions\r\n )(record[field.name])\r\n }\r\n return defaultValueFunctions[field.getUndefinedValue]()\r\n}\r\n\r\nexport const getSafeValueParser = (\r\n tryParse,\r\n defaultValueFunctions\r\n) => value => {\r\n const parsed = tryParse(value)\r\n if (parsed.success) {\r\n return parsed.value\r\n }\r\n return defaultValueFunctions.default()\r\n}\r\n\r\nexport const getNewValue = (tryParse, defaultValueFunctions) => field => {\r\n const getInitialValue =\r\n isUndefined(field) || isUndefined(field.getInitialValue)\r\n ? \"default\"\r\n : field.getInitialValue\r\n\r\n return has(getInitialValue)(defaultValueFunctions)\r\n ? defaultValueFunctions[getInitialValue]()\r\n : getSafeValueParser(tryParse, defaultValueFunctions)(getInitialValue)\r\n}\r\n\r\nexport const typeFunctions = specificFunctions =>\r\n merge(\r\n {\r\n value: constant,\r\n null: constant(null),\r\n },\r\n specificFunctions\r\n )\r\n\r\nexport const validateTypeConstraints = validationRules => (field, record) => {\r\n const fieldValue = record[field.name]\r\n const validateRule = r =>\r\n !r.isValid(fieldValue, field.typeOptions)\r\n ? r.getMessage(fieldValue, field.typeOptions)\r\n : \"\"\r\n\r\n const errors = []\r\n for (const r of validationRules) {\r\n const err = validateRule(r)\r\n if (isNotEmpty(err)) errors.push(err)\r\n }\r\n\r\n return errors\r\n}\r\n\r\nconst getDefaultOptions = mapValues(v => v.defaultValue)\r\n\r\nexport const makerule = (isValid, getMessage) => ({ isValid, getMessage })\r\nexport const parsedFailed = val => ({ success: false, value: val })\r\nexport const parsedSuccess = val => ({ success: true, value: val })\r\nexport const getDefaultExport = (\r\n name,\r\n tryParse,\r\n functions,\r\n options,\r\n validationRules,\r\n sampleValue,\r\n stringify\r\n) => ({\r\n getNew: getNewValue(tryParse, functions),\r\n safeParseField: getSafeFieldParser(tryParse, functions),\r\n safeParseValue: getSafeValueParser(tryParse, functions),\r\n tryParse,\r\n name,\r\n getDefaultOptions: () => getDefaultOptions(cloneDeep(options)),\r\n optionDefinitions: options,\r\n validateTypeConstraints: validateTypeConstraints(validationRules),\r\n sampleValue,\r\n stringify: val => (val === null || val === undefined ? \"\" : stringify(val)),\r\n getDefaultValue: functions.default,\r\n})\r\n"],"file":"typeHelpers.js"} \ No newline at end of file diff --git a/packages/common/lib/schema/views.js.map b/packages/common/lib/schema/views.js.map index 07be3044e4..cbdb6f6798 100644 --- a/packages/common/lib/schema/views.js.map +++ b/packages/common/lib/schema/views.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schema/views.js"],"names":["newView","modelId","id","name"],"mappings":"oGAAA;;AAEO,IAAMA,OAAO,GAAG,SAAVA,OAAU,QAACC,OAAD,uEAAW,IAAX,QAAqB;AAC1CC,IAAAA,EAAE,EAAE,wBADsC;AAE1CC,IAAAA,IAAI,EAAE,EAFoC;AAG1CF,IAAAA,OAAO,EAAPA,OAH0C,EAArB,EAAhB,C","sourcesContent":["import { generate } from \"shortid\"\n\nexport const newView = (modelId = null) => ({\n id: generate(),\n name: \"\",\n modelId,\n})\n"],"file":"views.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schema/views.js"],"names":["newView","modelId","id","name"],"mappings":"oGAAA;;AAEO,IAAMA,OAAO,GAAG,SAAVA,OAAU,QAACC,OAAD,uEAAW,IAAX,QAAqB;AAC1CC,IAAAA,EAAE,EAAE,wBADsC;AAE1CC,IAAAA,IAAI,EAAE,EAFoC;AAG1CF,IAAAA,OAAO,EAAPA,OAH0C,EAArB,EAAhB,C","sourcesContent":["import { generate } from \"shortid\"\r\n\r\nexport const newView = (modelId = null) => ({\r\n id: generate(),\r\n name: \"\",\r\n modelId,\r\n})\r\n"],"file":"views.js"} \ No newline at end of file diff --git a/packages/common/lib/schemaValidation/index.js.map b/packages/common/lib/schemaValidation/index.js.map index 009b82c4cf..1dfdf41881 100644 --- a/packages/common/lib/schemaValidation/index.js.map +++ b/packages/common/lib/schemaValidation/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/schemaValidation/index.js"],"names":["ajv","Ajv"],"mappings":"4LAAA;;AAEA,IAAMA,GAAG,GAAG,IAAIC,eAAJ,EAAZ,C;;AAEeD,G","sourcesContent":["import Ajv from \"ajv\";\n\nconst ajv = new Ajv();\n\nexport default ajv;"],"file":"index.js"} \ No newline at end of file +{"version":3,"sources":["../../src/schemaValidation/index.js"],"names":["ajv","Ajv"],"mappings":"4LAAA;;AAEA,IAAMA,GAAG,GAAG,IAAIC,eAAJ,EAAZ,C;;AAEeD,G","sourcesContent":["import Ajv from \"ajv\";\r\n\r\nconst ajv = new Ajv();\r\n\r\nexport default ajv;"],"file":"index.js"} \ No newline at end of file diff --git a/packages/common/node_modules/.bin/babel b/packages/common/node_modules/.bin/babel deleted file mode 120000 index fdb3195111..0000000000 --- a/packages/common/node_modules/.bin/babel +++ /dev/null @@ -1 +0,0 @@ -../@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 deleted file mode 120000 index e8d78df6c2..0000000000 --- a/packages/common/node_modules/.bin/babel-external-helpers +++ /dev/null @@ -1 +0,0 @@ -../@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 deleted file mode 120000 index f68f48ad92..0000000000 --- a/packages/common/node_modules/.bin/cross-env +++ /dev/null @@ -1 +0,0 @@ -../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 deleted file mode 120000 index ee50a76478..0000000000 --- a/packages/common/node_modules/.bin/cross-env-shell +++ /dev/null @@ -1 +0,0 @@ -../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 deleted file mode 120000 index 61c1861542..0000000000 --- a/packages/common/node_modules/.bin/jest +++ /dev/null @@ -1 +0,0 @@ -../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 deleted file mode 120000 index 4cd49a49dd..0000000000 --- a/packages/common/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../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 deleted file mode 100644 index f31575ec77..0000000000 --- a/packages/common/node_modules/@babel/template/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index cf8f944396..0000000000 --- a/packages/common/node_modules/@babel/template/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @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 deleted file mode 100644 index 2a0e629726..0000000000 --- a/packages/common/node_modules/@babel/template/lib/builder.js +++ /dev/null @@ -1,83 +0,0 @@ -"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 deleted file mode 100644 index 59e0984cba..0000000000 --- a/packages/common/node_modules/@babel/template/lib/formatters.js +++ /dev/null @@ -1,63 +0,0 @@ -"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 deleted file mode 100644 index 9c666dbcc1..0000000000 --- a/packages/common/node_modules/@babel/template/lib/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"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 deleted file mode 100644 index 0b8f904582..0000000000 --- a/packages/common/node_modules/@babel/template/lib/literal.js +++ /dev/null @@ -1,82 +0,0 @@ -"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 deleted file mode 100644 index 6039a7bc59..0000000000 --- a/packages/common/node_modules/@babel/template/lib/options.js +++ /dev/null @@ -1,82 +0,0 @@ -"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 deleted file mode 100644 index 31e5849118..0000000000 --- a/packages/common/node_modules/@babel/template/lib/parse.js +++ /dev/null @@ -1,171 +0,0 @@ -"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 deleted file mode 100644 index cbca1917c9..0000000000 --- a/packages/common/node_modules/@babel/template/lib/populate.js +++ /dev/null @@ -1,127 +0,0 @@ -"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 deleted file mode 100644 index 02ad45782e..0000000000 --- a/packages/common/node_modules/@babel/template/lib/string.js +++ /dev/null @@ -1,24 +0,0 @@ -"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 deleted file mode 120000 index ce7bf97efb..0000000000 --- a/packages/common/node_modules/@babel/template/node_modules/.bin/parser +++ /dev/null @@ -1 +0,0 @@ -../@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 deleted file mode 100644 index febdd7eab7..0000000000 --- a/packages/common/node_modules/@babel/template/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index f31575ec77..0000000000 --- a/packages/common/node_modules/@babel/types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 8d33374d3b..0000000000 --- a/packages/common/node_modules/@babel/types/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @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 deleted file mode 100644 index 194ec71681..0000000000 --- a/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js +++ /dev/null @@ -1,17 +0,0 @@ -"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 deleted file mode 100644 index 4a6b22c289..0000000000 --- a/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js +++ /dev/null @@ -1,1444 +0,0 @@ -"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 deleted file mode 100644 index 812cc17933..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/builder.js +++ /dev/null @@ -1,42 +0,0 @@ -"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 deleted file mode 100644 index 4724335f2a..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +++ /dev/null @@ -1,28 +0,0 @@ -"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 deleted file mode 100644 index df76b0107f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js +++ /dev/null @@ -1,22 +0,0 @@ -"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 deleted file mode 100644 index 917d77a3b9..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/generated/index.js +++ /dev/null @@ -1,1218 +0,0 @@ -"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 deleted file mode 100644 index 91e7cbd9ca..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js +++ /dev/null @@ -1,31 +0,0 @@ -"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 deleted file mode 100644 index 9595f6e25c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/clone.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index eb29c53622..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index d8612e9ebb..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index 44032e3f9d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js +++ /dev/null @@ -1,101 +0,0 @@ -"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 deleted file mode 100644 index 34fd172ed7..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index ff586514e7..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/addComment.js +++ /dev/null @@ -1,17 +0,0 @@ -"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 deleted file mode 100644 index f3a61df713..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/addComments.js +++ /dev/null @@ -1,23 +0,0 @@ -"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 deleted file mode 100644 index fbe59dec62..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index ccb02ec55b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index bce1e2d9ac..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index fd942d86cd..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js +++ /dev/null @@ -1,21 +0,0 @@ -"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 deleted file mode 100644 index fe34f1a890..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/removeComments.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index a8b6e78040..0000000000 --- a/packages/common/node_modules/@babel/types/lib/constants/generated/index.js +++ /dev/null @@ -1,97 +0,0 @@ -"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 deleted file mode 100644 index 7553162c66..0000000000 --- a/packages/common/node_modules/@babel/types/lib/constants/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"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 deleted file mode 100644 index 2836b36578..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index fadd0f04be..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +++ /dev/null @@ -1,73 +0,0 @@ -"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 deleted file mode 100644 index b9d165b6fd..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index 19886833fa..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toBlock.js +++ /dev/null @@ -1,34 +0,0 @@ -"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 deleted file mode 100644 index 31e6770f6f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js +++ /dev/null @@ -1,15 +0,0 @@ -"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 deleted file mode 100644 index 6e58b0de4d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toExpression.js +++ /dev/null @@ -1,30 +0,0 @@ -"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 deleted file mode 100644 index e55db41fc4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js +++ /dev/null @@ -1,25 +0,0 @@ -"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 deleted file mode 100644 index c48fd0e7f3..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js +++ /dev/null @@ -1,48 +0,0 @@ -"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 deleted file mode 100644 index 2e221db4e0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js +++ /dev/null @@ -1,23 +0,0 @@ -"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 deleted file mode 100644 index 69b22ae09c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toStatement.js +++ /dev/null @@ -1,44 +0,0 @@ -"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 deleted file mode 100644 index d1118e164b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js +++ /dev/null @@ -1,88 +0,0 @@ -"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 deleted file mode 100644 index 863536d130..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/core.js +++ /dev/null @@ -1,858 +0,0 @@ -"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 deleted file mode 100644 index e80a804aa0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/es2015.js +++ /dev/null @@ -1,467 +0,0 @@ -"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 deleted file mode 100644 index 31734b5355..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/experimental.js +++ /dev/null @@ -1,241 +0,0 @@ -"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 deleted file mode 100644 index a6d74d7aa4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/flow.js +++ /dev/null @@ -1,461 +0,0 @@ -"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 deleted file mode 100644 index 84ca38761e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/index.js +++ /dev/null @@ -1,99 +0,0 @@ -"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 deleted file mode 100644 index c7009414d8..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/jsx.js +++ /dev/null @@ -1,161 +0,0 @@ -"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 deleted file mode 100644 index f72c651151..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/misc.js +++ /dev/null @@ -1,33 +0,0 @@ -"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 deleted file mode 100644 index 0edf7b2e80..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js +++ /dev/null @@ -1,33 +0,0 @@ -"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 deleted file mode 100644 index 531338f1fa..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/typescript.js +++ /dev/null @@ -1,417 +0,0 @@ -"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 deleted file mode 100644 index ab1285fa6d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/utils.js +++ /dev/null @@ -1,315 +0,0 @@ -"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 deleted file mode 100644 index 6e6a2b572d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.d.ts +++ /dev/null @@ -1,2555 +0,0 @@ -// 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 deleted file mode 100644 index 94bdf85a3e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.js +++ /dev/null @@ -1,588 +0,0 @@ -"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 deleted file mode 100644 index c536937f80..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.js.flow +++ /dev/null @@ -1,2138 +0,0 @@ -// 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 deleted file mode 100644 index 6a0ac93c5c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"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 deleted file mode 100644 index 5802683995..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +++ /dev/null @@ -1,74 +0,0 @@ -"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 deleted file mode 100644 index 64d72fcf2f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/inherits.js +++ /dev/null @@ -1,33 +0,0 @@ -"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 deleted file mode 100644 index ee6de0ec33..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +++ /dev/null @@ -1,13 +0,0 @@ -"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 deleted file mode 100644 index f9cf8e6065..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js +++ /dev/null @@ -1,30 +0,0 @@ -"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 deleted file mode 100644 index d11a84a832..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +++ /dev/null @@ -1,17 +0,0 @@ -"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 deleted file mode 100644 index 189f4b8eb3..0000000000 --- a/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +++ /dev/null @@ -1,103 +0,0 @@ -"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 deleted file mode 100644 index 8e1e3cb200..0000000000 --- a/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index 775aed1eed..0000000000 --- a/packages/common/node_modules/@babel/types/lib/traverse/traverse.js +++ /dev/null @@ -1,55 +0,0 @@ -"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 deleted file mode 100644 index f038dd835e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js +++ /dev/null @@ -1,28 +0,0 @@ -"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 deleted file mode 100644 index f6691c7034..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/inherit.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index f0ca13369b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +++ /dev/null @@ -1,47 +0,0 @@ -"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 deleted file mode 100644 index fae259e4fc..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js +++ /dev/null @@ -1,18 +0,0 @@ -"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 deleted file mode 100644 index 0faa29c5d6..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"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 deleted file mode 100644 index e0dd917f37..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/generated/index.js +++ /dev/null @@ -1,4573 +0,0 @@ -"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 deleted file mode 100644 index a68c108861..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/is.js +++ /dev/null @@ -1,35 +0,0 @@ -"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 deleted file mode 100644 index e18ad19760..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isBinding.js +++ /dev/null @@ -1,33 +0,0 @@ -"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 deleted file mode 100644 index 7e6549e03b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index b00b23d4ce..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js +++ /dev/null @@ -1,26 +0,0 @@ -"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 deleted file mode 100644 index 93d7562808..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isLet.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index e88a47aac4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isNode.js +++ /dev/null @@ -1,12 +0,0 @@ -"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 deleted file mode 100644 index 0c3b8ac437..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +++ /dev/null @@ -1,67 +0,0 @@ -"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 deleted file mode 100644 index e8271de0b1..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js +++ /dev/null @@ -1,21 +0,0 @@ -"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 deleted file mode 100644 index 8fd1662348..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js +++ /dev/null @@ -1,116 +0,0 @@ -"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 deleted file mode 100644 index d4cd46c8c4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isScope.js +++ /dev/null @@ -1,28 +0,0 @@ -"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 deleted file mode 100644 index 25431cc273..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index 59d31dfbbf..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isType.js +++ /dev/null @@ -1,24 +0,0 @@ -"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 deleted file mode 100644 index 8455cab269..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index c1adb9afe0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js +++ /dev/null @@ -1,22 +0,0 @@ -"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 deleted file mode 100644 index a34801d18f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isVar.js +++ /dev/null @@ -1,16 +0,0 @@ -"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 deleted file mode 100644 index 538e011f4c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js +++ /dev/null @@ -1,40 +0,0 @@ -"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 deleted file mode 100644 index 57761c2b1b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js +++ /dev/null @@ -1,10 +0,0 @@ -"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 deleted file mode 100644 index 33b30d71e9..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js +++ /dev/null @@ -1,14 +0,0 @@ -"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 deleted file mode 100644 index 4604f4b2ea..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/validate.js +++ /dev/null @@ -1,32 +0,0 @@ -"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 deleted file mode 100644 index 177e1c90bd..0000000000 --- a/packages/common/node_modules/@babel/types/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index bf0b036c18..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js +++ /dev/null @@ -1,29 +0,0 @@ -"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 deleted file mode 100644 index 340dbbc113..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/docs.js +++ /dev/null @@ -1,121 +0,0 @@ -"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 deleted file mode 100644 index ec664e7fe4..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/flow.js +++ /dev/null @@ -1,249 +0,0 @@ -"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 deleted file mode 100644 index 26bdb8dccb..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js +++ /dev/null @@ -1,44 +0,0 @@ -"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 deleted file mode 100644 index 08a5b6fc61..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js +++ /dev/null @@ -1,43 +0,0 @@ -"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 deleted file mode 100644 index 1e4d2cabae..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js +++ /dev/null @@ -1,17 +0,0 @@ -"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 deleted file mode 100644 index 1455f99e5b..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js +++ /dev/null @@ -1,78 +0,0 @@ -"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 deleted file mode 100644 index 298e22e9ee..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/typescript.js +++ /dev/null @@ -1,362 +0,0 @@ -"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 deleted file mode 100644 index 621c468219..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js +++ /dev/null @@ -1,10 +0,0 @@ -"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 deleted file mode 100644 index 9e7b0cee51..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js +++ /dev/null @@ -1,4 +0,0 @@ -"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 deleted file mode 100644 index 2ea1e80357..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js +++ /dev/null @@ -1,66 +0,0 @@ -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 deleted file mode 100644 index 627c9a7d8f..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js +++ /dev/null @@ -1,4 +0,0 @@ -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/build/ScriptTransformer.d.ts b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts deleted file mode 100644 index 220183481a..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts +++ /dev/null @@ -1,39 +0,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. - */ -import { Config } from '@jest/types'; -import { Options, TransformResult } from './types'; -export default class ScriptTransformer { - static EVAL_RESULT_VARIABLE: 'Object.'; - 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): { - code: string; - mapCoverage: boolean; - sourceMapPath: string | null; - }; - 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; -} -//# 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 deleted file mode 100644 index d74a82fe35..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScriptTransformer.d.ts","sourceRoot":"","sources":["../src/ScriptTransformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAanC,OAAO,EACL,OAAO,EAGP,eAAe,EAChB,MAAM,SAAS,CAAC;AAoCjB,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAClD,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;IAqBxC,OAAO,CAAC,YAAY;IAgCpB,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,YAAY;IAUpB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;;;;;IAwF3E,OAAO,CAAC,wBAAwB;IA+DhC,SAAS,CACP,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe;IA2BlB,aAAa,CACX,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM;IAkBT,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;IAsDtB;;OAEG;IAEH,OAAO,CAAC,gBAAgB;IAIxB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;CAQhD"} \ 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 deleted file mode 100644 index 0dbc1d7b66..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js +++ /dev/null @@ -1,863 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _vm() { - const data = _interopRequireDefault(require('vm')); - - _vm = function _vm() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _core() { - const data = require('@babel/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -function _babelPluginIstanbul() { - const data = _interopRequireDefault(require('babel-plugin-istanbul')); - - _babelPluginIstanbul = function _babelPluginIstanbul() { - return data; - }; - - return data; -} - -function _convertSourceMap() { - const data = _interopRequireDefault(require('convert-source-map')); - - _convertSourceMap = function _convertSourceMap() { - return data; - }; - - return data; -} - -function _jestHasteMap() { - const data = _interopRequireDefault(require('jest-haste-map')); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _fastJsonStableStringify() { - const data = _interopRequireDefault(require('fast-json-stable-stringify')); - - _fastJsonStableStringify = function _fastJsonStableStringify() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _writeFileAtomic() { - const data = _interopRequireDefault(require('write-file-atomic')); - - _writeFileAtomic = function _writeFileAtomic() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _pirates() { - const data = require('pirates'); - - _pirates = function _pirates() { - 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 _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; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -// Use `require` to avoid TS rootDir -const _require = require('../package.json'), - VERSION = _require.version; // 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 WeakMap(); // To reset the cache for specific changesets (rather than package version). - -const CACHE_VERSION = '1'; - -function waitForPromiseWithCleanup(_x, _x2) { - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -function _waitForPromiseWithCleanup() { - _waitForPromiseWithCleanup = _asyncToGenerator(function*(promise, cleanup) { - try { - yield promise; - } finally { - cleanup(); - } - }); - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -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(); - let projectCache = projectCaches.get(config); - - if (!projectCache) { - projectCache = { - configString: (0, _fastJsonStableStringify().default)(this._config), - ignorePatternsRegExp: calcIgnorePatternRegExp(this._config), - transformRegExp: calcTransformRegExp(this._config), - transformedFiles: new Map() - }; - projectCaches.set(config, projectCache); - } - - this._cache = projectCache; - } - - _getCacheKey(fileData, filename, instrument) { - const configString = this._cache.configString; - - const transformer = this._getTransformer(filename); - - if (transformer && typeof transformer.getCacheKey === 'function') { - return _crypto() - .default.createHash('md5') - .update( - transformer.getCacheKey(fileData, filename, configString, { - config: this._config, - instrument, - rootDir: this._config.rootDir - }) - ) - .update(CACHE_VERSION) - .digest('hex'); - } else { - return _crypto() - .default.createHash('md5') - .update(fileData) - .update(configString) - .update(instrument ? 'instrument' : '') - .update(filename) - .update(CACHE_VERSION) - .digest('hex'); - } - } - - _getFileCachePath(filename, content, instrument) { - const baseCacheDir = _jestHasteMap().default.getCacheFilePath( - this._config.cacheDirectory, - 'jest-transform-cache-' + this._config.name, - VERSION - ); - - const cacheKey = this._getCacheKey(content, filename, instrument); // Create sub folders based on the cacheKey to avoid creating one - // directory with many files. - - const cacheDir = _path().default.join( - baseCacheDir, - cacheKey[0] + cacheKey[1] - ); - - const cacheFilenamePrefix = _path() - .default.basename(filename, _path().default.extname(filename)) - .replace(/\W/g, ''); - - const cachePath = (0, _slash().default)( - _path().default.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); - - 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) { - const result = (0, _core().transformSync)(content, { - auxiliaryCommentBefore: ' istanbul ignore next ', - babelrc: false, - caller: { - name: '@jest/transform', - supportsStaticESM: false - }, - configFile: false, - filename, - plugins: [ - [ - _babelPluginIstanbul().default, - { - compact: false, - // files outside `cwd` will not be instrumented - cwd: this._config.rootDir, - exclude: [], - useInlineSourceMaps: false - } - ] - ] - }); - - if (result) { - const code = result.code; - - 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); - } - - transformSource(filepath, content, instrument) { - const filename = this._getRealPath(filepath); - - const transform = this._getTransformer(filename); - - const cacheFilePath = this._getFileCachePath(filename, content, instrument); - - 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, - sourceMapPath - }; - } - - let transformed = { - code: content, - map: null - }; - - if (transform && shouldCallTransform) { - const processed = transform.process(content, filename, this._config, { - instrument - }); - - 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) { - //Could be a potential freeze here. - //See: https://github.com/facebook/jest/pull/5177#discussion_r158883570 - const inlineSourceMap = _convertSourceMap().default.fromSource( - transformed.code - ); - - if (inlineSourceMap) { - transformed.map = inlineSourceMap.toJSON(); - } - } - - if (!transformWillInstrument && instrument) { - code = this._instrumentFile(filename, transformed.code); - } 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, - sourceMapPath - }; - } - - _transformAndBuildScript(filename, options, instrument, fileSource) { - const isInternalModule = !!(options && options.isInternalModule); - const isCoreModule = !!(options && options.isCoreModule); - const content = stripShebang( - fileSource || _gracefulFs().default.readFileSync(filename, 'utf8') - ); - let wrappedCode; - let sourceMapPath = null; - let mapCoverage = false; - const willTransform = - !isInternalModule && - !isCoreModule && - (this.shouldTransform(filename) || instrument); - - try { - const extraGlobals = (options && options.extraGlobals) || []; - - if (willTransform) { - const transformedSource = this.transformSource( - filename, - content, - instrument - ); - wrappedCode = wrap(transformedSource.code, ...extraGlobals); - sourceMapPath = transformedSource.sourceMapPath; - mapCoverage = transformedSource.mapCoverage; - } else { - wrappedCode = wrap(content, ...extraGlobals); - } - - return { - mapCoverage, - script: new (_vm()).default.Script(wrappedCode, { - displayErrors: true, - filename: isCoreModule ? 'jest-nodejs-core-' + filename : filename - }), - sourceMapPath - }; - } catch (e) { - if (e.codeFrame) { - e.stack = e.message + '\n' + e.codeFrame; - } - - if ( - e instanceof SyntaxError && - e.message.includes('Unexpected token') && - !e.message.includes(' expected') - ) { - throw (0, _enhanceUnexpectedTokenMessage.default)(e); - } - - throw e; - } - } - - transform(filename, options, fileSource) { - let scriptCacheKey = undefined; - let instrument = false; - - if (!options.isCoreModule) { - instrument = (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 isInternalModule = options.isInternalModule; - const isCoreModule = options.isCoreModule; - const willTransform = - !isInternalModule && !isCoreModule && this.shouldTransform(filename); - - if (willTransform) { - const _this$transformSource = this.transformSource( - filename, - fileSource, - false - ), - transformedJsonSource = _this$transformSource.code; - - 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 this.transformSource(filename, code, false).code || code; - } finally { - transforming = false; - } - }, - { - exts: [_path().default.extname(moduleName)], - 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 - ); - } -} - -exports.default = ScriptTransformer; - -_defineProperty(ScriptTransformer, 'EVAL_RESULT_VARIABLE', void 0); - -const removeFile = path => { - try { - _gracefulFs().default.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 = _crypto() - .default.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 = _crypto() - .default.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 { - _writeFileAtomic().default.sync(cachePath, fileData, { - encoding: 'utf8' - }); - } 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' && - _gracefulFs().default.existsSync(cachePath); - -const readCacheFile = cachePath => { - if (!_gracefulFs().default.existsSync(cachePath)) { - return null; - } - - let fileData; - - try { - fileData = _gracefulFs().default.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 = _gracefulFs().default.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; -}; - -const wrap = (content, ...extras) => { - const globals = new Set([ - 'module', - 'exports', - 'require', - '__dirname', - '__filename', - 'global', - 'jest', - ...extras - ]); - return ( - '({"' + - ScriptTransformer.EVAL_RESULT_VARIABLE + - `":function(${Array.from(globals).join(',')}){` + - content + - '\n}});' - ); -}; // TODO: Can this be added to the static property? - -ScriptTransformer.EVAL_RESULT_VARIABLE = 'Object.'; diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts deleted file mode 100644 index 0a5157cab1..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts +++ /dev/null @@ -1,8 +0,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. - */ -export default function enhanceUnexpectedTokenMessage(e: Error): Error; -//# 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 deleted file mode 100644 index 28bd6de164..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,CAAC,EAAE,KAAK,SA2B7D"} \ 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 deleted file mode 100644 index a05b93a1f2..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = enhanceUnexpectedTokenMessage; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - 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 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 deleted file mode 100644 index 901c979c45..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.d.ts +++ /dev/null @@ -1,10 +0,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. - */ -export { default as ScriptTransformer } from './ScriptTransformer'; -export { default as shouldInstrument } from './shouldInstrument'; -export { Transformer, ShouldInstrumentOptions, Options as TransformationOptions, } from './types'; -//# 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 deleted file mode 100644 index 55a52aecae..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,OAAO,IAAI,qBAAqB,GACjC,MAAM,SAAS,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 deleted file mode 100644 index 481fab49c7..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'ScriptTransformer', { - enumerable: true, - get: function get() { - return _ScriptTransformer.default; - } -}); -Object.defineProperty(exports, 'shouldInstrument', { - enumerable: true, - get: function get() { - return _shouldInstrument.default; - } -}); -Object.defineProperty(exports, 'Transformer', { - enumerable: true, - get: function get() { - return _types.Transformer; - } -}); -Object.defineProperty(exports, 'ShouldInstrumentOptions', { - enumerable: true, - get: function get() { - return _types.ShouldInstrumentOptions; - } -}); -Object.defineProperty(exports, 'TransformationOptions', { - enumerable: true, - get: function get() { - return _types.Options; - } -}); - -var _ScriptTransformer = _interopRequireDefault(require('./ScriptTransformer')); - -var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts deleted file mode 100644 index 4790f5b7b9..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts +++ /dev/null @@ -1,10 +0,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. - */ -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 \ 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 deleted file mode 100644 index 4a45f93081..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shouldInstrument.d.ts","sourceRoot":"","sources":["../src/shouldInstrument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAMhD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,OAAO,CA4ET"} \ 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 deleted file mode 100644 index f6fa147f8c..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = shouldInstrument; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - 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 MOCKS_PATTERN = new RegExp( - (0, _jestRegexUtil().escapePathForRegex)( - _path().default.sep + '__mocks__' + _path().default.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 ( - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(filename), - config.testMatch - ) - ) { - 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 && - !_micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)( - _path().default.relative(config.rootDir, filename) - ), - options.collectCoverageFrom - ) - ) { - 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/types.d.ts b/packages/common/node_modules/@jest/transform/build/types.d.ts deleted file mode 100644 index 2fb6bddb44..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.d.ts +++ /dev/null @@ -1,46 +0,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. - */ -/// -import { Script } from 'vm'; -import { RawSourceMap } from 'source-map'; -import { Config } from '@jest/types'; -export declare type ShouldInstrumentOptions = Pick & { - changedFiles: Set | undefined; -}; -export declare type Options = ShouldInstrumentOptions & Pick & { - isCoreModule?: boolean; - isInternalModule?: boolean; -}; -declare type Omit = Pick>; -interface FixedRawSourceMap extends Omit { - version: number; -} -export declare type TransformedSource = { - code: string; - map?: FixedRawSourceMap | string | null; -}; -export declare type TransformResult = { - script: Script; - mapCoverage: boolean; - sourceMapPath: string | null; -}; -export declare type TransformOptions = { - instrument: boolean; -}; -export declare type CacheKeyOptions = { - config: Config.ProjectConfig; - instrument: boolean; - 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) => string | 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 deleted file mode 100644 index 62ec12b241..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,uBAAuB,GAAG,IAAI,CACxC,MAAM,CAAC,YAAY,EACnB,iBAAiB,GAAG,qBAAqB,GAAG,yBAAyB,CACtE,GAAG;IACF,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,oBAAY,OAAO,GAAG,uBAAuB,GAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAGJ,aAAK,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAI/D,UAAU,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,WAAW,CAAC;IAEnD,WAAW,EAAE,CACX,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,MAAM,GAAG,iBAAiB,CAAC;CACjC"} \ 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 deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/transform/package.json b/packages/common/node_modules/@jest/transform/package.json deleted file mode 100644 index a356f905b7..0000000000 --- a/packages/common/node_modules/@jest/transform/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@jest/transform", - "version": "24.9.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/jest-transform" - }, - "license": "MIT", - "main": "build/index.js", - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", - "micromatch": "^3.1.10", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" - }, - "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": "^3.1.0", - "@types/write-file-atomic": "^2.1.1" - }, - "engines": { - "node": ">= 6" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1" -} diff --git a/packages/common/node_modules/@jest/types/LICENSE b/packages/common/node_modules/@jest/types/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/@jest/types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 5a80960936..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.d.ts +++ /dev/null @@ -1,172 +0,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. - */ -/// -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 declare type EventHandler = (event: Event, state: State) => void; -export declare type Event = { - name: 'include_test_location_in_result'; -} | { - 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: '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: 'error'; - error: Exception; -} | { - name: 'setup'; - testNamePattern?: string; - parentProcess: Process; -} | { - 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 deleted file mode 100644 index cf27dac910..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Circus.d.ts","sourceRoot":"","sources":["../src/Circus.ts"],"names":[],"mappings":"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"} \ 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 deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.js +++ /dev/null @@ -1 +0,0 @@ -'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 deleted file mode 100644 index 35ac465264..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.d.ts +++ /dev/null @@ -1,439 +0,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. - */ -/// -import { Arguments } from 'yargs'; -import { ReportOptions } from 'istanbul-reports'; -export declare type Path = string; -export declare type Glob = string; -export declare type HasteConfig = { - computeSha1?: boolean; - defaultPlatform?: string | null | undefined; - hasteImplModulePath?: string; - platforms?: Array; - providesModuleNodeModules: Array; - throwOnModuleCollision?: boolean; -}; -export declare type ReporterConfig = [string, Record]; -export declare type TransformerConfig = [string, Record]; -export declare type ConfigGlobals = Record; -export declare type DefaultOptions = { - automock: boolean; - bail: number; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - changedFilesWithAncestor: boolean; - clearMocks: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array | null | undefined; - coverageDirectory: string | null | undefined; - coveragePathIgnorePatterns: Array; - coverageReporters: Array; - coverageThreshold: { - global: { - [key: string]: number; - }; - } | null | undefined; - dependencyExtractor: string | null | undefined; - errorOnDeprecated: boolean; - expand: boolean; - filter: Path | null | undefined; - forceCoverageMatch: Array; - globals: ConfigGlobals; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - haste: HasteConfig; - maxWorkers: number | string; - maxConcurrency: number; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleNameMapper: { - [key: string]: string; - }; - modulePathIgnorePatterns: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - preset: string | null | undefined; - prettierPath: string | null | undefined; - projects: Array | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path | null | undefined; - roots: Array | null | undefined; - runner: string; - runTestsByPath: boolean; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - snapshotSerializers: Array; - testEnvironment: string; - testEnvironmentOptions: Record; - testFailureExitCode: string | number; - testLocationInResults: boolean; - testMatch: Array; - testPathIgnorePatterns: Array; - testRegex: Array; - testResultsProcessor: string | null | undefined; - testRunner: string | null | undefined; - testSequencer: string; - testURL: string; - timers: 'real' | 'fake'; - transform: { - [regex: string]: Path | TransformerConfig; - } | null | undefined; - transformIgnorePatterns: Array; - watchPathIgnorePatterns: Array; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchman: boolean; -}; -export declare type DisplayName = string | { - name: string; - color: DisplayNameColor; -}; -export declare type InitialOptions = { - 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; - 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; - }; - 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 | null | undefined; - 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 | null | undefined; - 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'; -/** - * Hard coding this until - * https://github.com/chalk/chalk/pull/336 - * gets merged - */ -declare type DisplayNameColor = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' | 'blackBright' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright' | 'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' | 'bgBlackBright' | 'bgRedBright' | 'bgGreenBright' | 'bgYellowBright' | 'bgBlueBright' | 'bgMagentaBright' | 'bgCyanBright' | 'bgWhiteBright'; -declare type CoverageThreshold = { - [path: string]: { - [key: string]: number; - }; - global: { - [key: string]: number; - }; -}; -export declare type GlobalConfig = { - bail: number; - changedSince: string; - changedFilesWithAncestor: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array; - collectCoverageOnlyFrom: { - [key: string]: boolean; - } | null | undefined; - coverageDirectory: string; - coveragePathIgnorePatterns?: Array; - coverageReporters: Array; - coverageThreshold: CoverageThreshold; - detectLeaks: boolean; - detectOpenHandles: boolean; - enabledTestsMap: { - [key: string]: { - [key: string]: boolean; - }; - } | null | undefined; - expand: boolean; - extraGlobals: Array; - filter: Path | null | undefined; - findRelatedTests: boolean; - forceExit: boolean; - json: boolean; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - lastCommit: boolean; - logHeapUsage: boolean; - listTests: boolean; - maxConcurrency: number; - maxWorkers: number; - noStackTrace: boolean; - nonFlagArgs: Array; - noSCM: boolean | null | undefined; - notify: boolean; - notifyMode: NotifyMode; - outputFile: Path | null | undefined; - onlyChanged: boolean; - onlyFailures: boolean; - passWithNoTests: boolean; - projects: Array; - replname: string | null | undefined; - reporters: Array; - runTestsByPath: boolean; - rootDir: Path; - silent: boolean; - skipFilter: boolean; - errorOnDeprecated: boolean; - testFailureExitCode: number; - testNamePattern: string; - testPathPattern: string; - testResultsProcessor: string | null | undefined; - testSequencer: string; - testTimeout: number; - updateSnapshot: SnapshotUpdateState; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchAll: boolean; - watchman: boolean; - watchPlugins: Array<{ - path: string; - config: Record; - }> | null | undefined; -}; -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 | null | undefined; - forceCoverageMatch: Array; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - 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 | null | undefined; - restoreMocks: boolean; - rootDir: Path; - roots: Array; - runner: string; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - skipNodeResolution: boolean; - snapshotResolver: Path | null | undefined; - 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 | null | undefined; -}; -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 | null | undefined; - 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 | null | undefined; - 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 deleted file mode 100644 index 6b8a1aa452..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"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"} \ 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 deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/Global.d.ts b/packages/common/node_modules/@jest/types/build/Global.d.ts deleted file mode 100644 index a9954e8114..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.d.ts +++ /dev/null @@ -1,74 +0,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. - */ -/// -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 Global extends NodeJS.Global { - 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; - [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 deleted file mode 100644 index f190be72fe..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"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"} \ 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 deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.js +++ /dev/null @@ -1 +0,0 @@ -'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 deleted file mode 100644 index 4d07f84466..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.d.ts +++ /dev/null @@ -1,11 +0,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. - */ -import * as Circus from './Circus'; -import * as Config from './Config'; -import * as Global from './Global'; -export { Circus, Config, Global }; -//# 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 deleted file mode 100644 index 3b69eaf53d..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,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 deleted file mode 100644 index c638c29000..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.Global = exports.Config = exports.Circus = void 0; - -var Circus = _interopRequireWildcard(require('./Circus')); - -exports.Circus = Circus; - -var Config = _interopRequireWildcard(require('./Config')); - -exports.Config = Config; - -var Global = _interopRequireWildcard(require('./Global')); - -exports.Global = Global; - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} diff --git a/packages/common/node_modules/@jest/types/package.json b/packages/common/node_modules/@jest/types/package.json deleted file mode 100644 index defa60c76d..0000000000 --- a/packages/common/node_modules/@jest/types/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@jest/types", - "version": "24.9.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/jest-types" - }, - "engines": { - "node": ">= 6" - }, - "license": "MIT", - "main": "build/index.js", - "types": "build/index.d.ts", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1" -} diff --git a/packages/common/node_modules/@types/yargs/LICENSE b/packages/common/node_modules/@types/yargs/LICENSE deleted file mode 100644 index 4b1ad51b2f..0000000000 --- a/packages/common/node_modules/@types/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - 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 deleted file mode 100644 index cde1b0122f..0000000000 --- a/packages/common/node_modules/@types/yargs/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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: Wed, 31 Jul 2019 17:12:04 GMT - * Dependencies: @types/yargs-parser - * Global values: none - -# Credits -These definitions were written by Martin Poelstra , Mizunashi Mana , Jeffery Grajkowski , Jeff Kenney , Jimi (Dimitris) Charalampidis , Steffen Viken Valvåg , and Emily Marigold Klassen . diff --git a/packages/common/node_modules/@types/yargs/index.d.ts b/packages/common/node_modules/@types/yargs/index.d.ts deleted file mode 100644 index 8a696951e9..0000000000 --- a/packages/common/node_modules/@types/yargs/index.d.ts +++ /dev/null @@ -1,761 +0,0 @@ -// Type definitions for yargs 13.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 -// 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 { - // 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. - * @param [handler] Function, which will be executed with the parsed `argv` object. - */ - command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, 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?: (args: Argv) => Argv, 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) => 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; - - /** - * 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; - /** 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; - /** 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); - 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 deleted file mode 100644 index 798e593ac8..0000000000 --- a/packages/common/node_modules/@types/yargs/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@types/yargs", - "version": "13.0.2", - "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" - } - ], - "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/yargs" - }, - "scripts": {}, - "dependencies": { - "@types/yargs-parser": "*" - }, - "typesPublisherContentHash": "5a8204a9fcea5ff2f6fd239ea4db72637ab00c6e3c82ff1855070c7ecc25394e", - "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 deleted file mode 100644 index f022ae4b9f..0000000000 --- a/packages/common/node_modules/@types/yargs/yargs.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Argv } from '.'; - -export = Yargs; - -declare function Yargs( - processArgs?: ReadonlyArray, - cwd?: string, - parentRequire?: NodeRequireFunction, -): Argv; diff --git a/packages/common/node_modules/ansi-styles/index.js b/packages/common/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c4d7..0000000000 --- a/packages/common/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -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], - gray: [90, 39], - - // Bright color - 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] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - 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 - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - 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 deleted file mode 100644 index e7af2f7710..0000000000 --- a/packages/common/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 65edb48c39..0000000000 --- a/packages/common/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "3.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^1.9.0" - }, - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "ava": { - "require": "babel-polyfill" - } -} diff --git a/packages/common/node_modules/ansi-styles/readme.md b/packages/common/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2df59..0000000000 --- a/packages/common/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://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` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `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. - -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-) - - -## License - -MIT diff --git a/packages/common/node_modules/anymatch/LICENSE b/packages/common/node_modules/anymatch/LICENSE deleted file mode 100644 index bc424705fb..0000000000 --- a/packages/common/node_modules/anymatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2014 Elan Shanker - -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 deleted file mode 100644 index f674f407cf..0000000000 --- a/packages/common/node_modules/anymatch/README.md +++ /dev/null @@ -1,99 +0,0 @@ -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.__ - -[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) -[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) - -Usage ------ -```sh -npm install anymatch --save -``` - -#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) -* __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. -* __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. -* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a -subset out of the array of provided matchers to test against. Can be useful -with bound matcher functions (see below). When used with `returnIndex = true` -preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. -includes array members up to, but not including endIndex). - -```js -var anymatch = require('anymatch'); - -var matchers = [ - 'path/to/file.js', - 'path/anyjs/**/*.js', - /foo\.js$/, - function (string) { - return string.indexOf('bar') !== -1 && 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', true); // 2 -anymatch(matchers, 'path/anyjs/foo.js', true); // 1 - -// skip matchers -anymatch(matchers, 'path/to/file.js', false, 1); // false -anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 -anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 - -// 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 -``` - -#### 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.prototype.filter` callback. - -```js -var matcher = anymatch(matchers); - -matcher('path/to/file.js'); // true -matcher('path/anyjs/baz.js', true); // 1 -matcher('path/anyjs/baz.js', true, 2); // -1 - -['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) - -NOTE: As of v2.0.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). - -NOTE: As of v1.2.0, 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.js b/packages/common/node_modules/anymatch/index.js deleted file mode 100644 index e411618506..0000000000 --- a/packages/common/node_modules/anymatch/index.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -var micromatch = require('micromatch'); -var normalize = require('normalize-path'); -var path = require('path'); // required for tests. -var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; - -var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { - criteria = arrify(criteria); - value = arrify(value); - if (arguments.length === 1) { - return anymatch.bind(null, criteria.map(function(criterion) { - return typeof criterion === 'string' && criterion[0] !== '!' ? - micromatch.matcher(criterion) : criterion; - })); - } - startIndex = startIndex || 0; - var string = value[0]; - var altString, altValue; - var matched = false; - var matchIndex = -1; - function testCriteria(criterion, index) { - var result; - switch (Object.prototype.toString.call(criterion)) { - case '[object String]': - result = string === criterion || altString && altString === criterion; - result = result || micromatch.isMatch(string, criterion); - break; - case '[object RegExp]': - result = criterion.test(string) || altString && criterion.test(altString); - break; - case '[object Function]': - result = criterion.apply(null, value); - result = result || altValue && criterion.apply(null, altValue); - break; - default: - result = false; - } - if (result) { - matchIndex = index + startIndex; - } - return result; - } - var crit = criteria; - var negGlobs = crit.reduce(function(arr, criterion, index) { - if (typeof criterion === 'string' && criterion[0] === '!') { - if (crit === criteria) { - // make a copy before modifying - crit = crit.slice(); - } - crit[index] = null; - arr.push(criterion.substr(1)); - } - return arr; - }, []); - if (!negGlobs.length || !micromatch.any(string, negGlobs)) { - if (path.sep === '\\' && typeof string === 'string') { - altString = normalize(string); - altString = altString === string ? null : altString; - if (altString) altValue = [altString].concat(value.slice(1)); - } - matched = crit.slice(startIndex, endIndex).some(testCriteria); - } - return returnIndex === true ? matchIndex : matched; -}; - -module.exports = anymatch; diff --git a/packages/common/node_modules/anymatch/package.json b/packages/common/node_modules/anymatch/package.json deleted file mode 100644 index fdbafd76a6..0000000000 --- a/packages/common/node_modules/anymatch/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "anymatch", - "version": "2.0.0", - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", - "files": [ - "index.js" - ], - "author": { - "name": "Elan Shanker", - "url": "http://github.com/es128" - }, - "license": "ISC", - "homepage": "https://github.com/micromatch/anymatch", - "repository": { - "type": "git", - "url": "https://github.com/micromatch/anymatch" - }, - "bugs": { - "url": "https://github.com/micromatch/anymatch/issues" - }, - "keywords": [ - "match", - "any", - "string", - "file", - "fs", - "list", - "glob", - "regex", - "regexp", - "regular", - "expression", - "function" - ], - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "devDependencies": { - "coveralls": "^2.7.0", - "istanbul": "^0.4.5", - "mocha": "^3.0.0" - } -} diff --git a/packages/common/node_modules/babel-jest/LICENSE b/packages/common/node_modules/babel-jest/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 237e5b6d53..0000000000 --- a/packages/common/node_modules/babel-jest/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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 deleted file mode 100644 index 501601ea9e..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.d.ts +++ /dev/null @@ -1,16 +0,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. - */ -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 deleted file mode 100644 index 746793858c..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index b787296a6b..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.js +++ /dev/null @@ -1,323 +0,0 @@ -'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 deleted file mode 100644 index 0930453492..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts +++ /dev/null @@ -1,8 +0,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. - */ -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 deleted file mode 100644 index 8e109f41cc..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index f91dea5dbb..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.js +++ /dev/null @@ -1,21 +0,0 @@ -'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 deleted file mode 100644 index 6bd60bc5a2..0000000000 --- a/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts +++ /dev/null @@ -1,16 +0,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. - */ -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 deleted file mode 100644 index 11309e96b9..0000000000 --- a/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts +++ /dev/null @@ -1,8 +0,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. - */ -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 deleted file mode 100644 index 9877edc40f..0000000000 --- a/packages/common/node_modules/babel-jest/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "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 deleted file mode 100644 index ef7c03af94..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md +++ /dev/null @@ -1,294 +0,0 @@ -# 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. - -## [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 deleted file mode 100644 index 22f21ab994..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 4c19da3cae..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# 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__). diff --git a/packages/common/node_modules/babel-plugin-istanbul/lib/index.js b/packages/common/node_modules/babel-plugin-istanbul/lib/index.js deleted file mode 100644 index 5b4a58159e..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/lib/index.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _fs = require("fs"); - -var _path = require("path"); - -var _helperPluginUtils = require("@babel/helper-plugin-utils"); - -var _istanbulLibInstrument = require("istanbul-lib-instrument"); - -const testExclude = require('test-exclude'); - -const findUp = require('find-up'); - -function getRealpath(n) { - try { - return (0, _fs.realpathSync)(n) || n; - } catch (e) { - return n; - } -} - -function makeShouldSkip() { - let exclude; - return function shouldSkip(file, opts) { - if (!exclude || exclude.cwd !== opts.cwd) { - const cwd = getRealpath(process.env.NYC_CWD || process.cwd()); - const nycConfig = process.env.NYC_CONFIG ? JSON.parse(process.env.NYC_CONFIG) : {}; - let config = {}; - - if (Object.keys(opts).length > 0) { - // explicitly configuring options in babel - // takes precedence. - config = opts; - } else if (nycConfig.include || nycConfig.exclude) { - // nyc was configured in a parent process (keep these settings). - config = { - include: nycConfig.include, - exclude: nycConfig.exclude, - // Make sure this is true unless explicitly set to `false`. `undefined` is still `true`. - excludeNodeModules: nycConfig.excludeNodeModules !== false - }; - } else { - // fallback to loading config from key in package.json. - config = { - configKey: 'nyc', - configPath: (0, _path.dirname)(findUp.sync('package.json', { - cwd - })) - }; - } - - exclude = testExclude(Object.assign({ - cwd - }, config)); - } - - return !exclude.shouldInstrument(file); - }; -} - -var _default = (0, _helperPluginUtils.declare)(api => { - api.assertVersion(7); - const t = api.types; - const shouldSkip = makeShouldSkip(); - return { - visitor: { - Program: { - enter(path) { - this.__dv__ = null; - const realPath = getRealpath(this.file.opts.filename); - - if (shouldSkip(realPath, this.opts)) { - return; - } - - let { - inputSourceMap - } = this.opts; - - if (this.opts.useInlineSourceMaps !== false) { - if (!inputSourceMap && this.file.inputMap) { - inputSourceMap = this.file.inputMap.sourcemap; - } - } - - this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, { - coverageVariable: '__coverage__', - 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/package.json b/packages/common/node_modules/babel-plugin-istanbul/package.json deleted file mode 100644 index 7aa5f01233..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "babel-plugin-istanbul", - "version": "5.2.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", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" - }, - "devDependencies": { - "@babel/cli": "^7.4.3", - "@babel/core": "^7.4.3", - "@babel/plugin-transform-modules-commonjs": "^7.4.3", - "@babel/register": "^7.4.0", - "chai": "^4.2.0", - "coveralls": "^3.0.3", - "cross-env": "^5.2.0", - "mocha": "^6.1.4", - "nyc": "^14.1.0", - "pmock": "^0.2.3", - "standard": "^12.0.1", - "standard-version": "^6.0.1" - }, - "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 test/*.js", - "prepublish": "npm test && npm run release", - "version": "standard-version" - }, - "standard": { - "ignore": [ - "fixtures/has-inline-source-map.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": ">=6" - } -} diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE b/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 15c1b181d7..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# 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 deleted file mode 100644 index d45f960901..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts +++ /dev/null @@ -1,13 +0,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. - * - */ -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 deleted file mode 100644 index bfd0567d5c..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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 deleted file mode 100644 index 3b7becbe9d..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js +++ /dev/null @@ -1,194 +0,0 @@ -'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 deleted file mode 100644 index 20186d225a..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts +++ /dev/null @@ -1,13 +0,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. - * - */ -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 deleted file mode 100644 index 3b87278525..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "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 deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-preset-jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index b0f085f6ab..0000000000 --- a/packages/common/node_modules/babel-preset-jest/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# 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 deleted file mode 100644 index 911bbf8d99..0000000000 --- a/packages/common/node_modules/babel-preset-jest/index.js +++ /dev/null @@ -1,14 +0,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. - */ - -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 deleted file mode 100644 index 73ba5466be..0000000000 --- a/packages/common/node_modules/babel-preset-jest/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "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/LICENSE b/packages/common/node_modules/braces/LICENSE deleted file mode 100644 index d32ab4426a..0000000000 --- a/packages/common/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index f909bfba1a..0000000000 --- a/packages/common/node_modules/braces/README.md +++ /dev/null @@ -1,640 +0,0 @@ -# braces [![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) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/braces.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/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 -``` - -## Why use braces? - -Brace patterns are great for matching ranges. Users (and implementors) shouldn't have to think about whether or not they will break their application (or yours) from accidentally defining an aggressive brace pattern. _Braces is the only library that offers a [solution to this problem](#performance)_. - -* **Safe(r)**: Braces isn't vulnerable to DoS attacks like [brace-expansion](https://github.com/juliangruber/brace-expansion), [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) (a different bug than the [other regex DoS bug](https://medium.com/node-security/minimatch-redos-vulnerability-590da24e6d3c#.jew0b6mpc)). -* **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**: with parser and compiler that are eas(y|ier) to maintain and update when edge cases crop up. -* **Well-tested**: thousands of test assertions. Passes 100% of the [minimatch](https://github.com/isaacs/minimatch) and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests as well (as of the writing of this). - -## Usage - -The main export is a function that takes one or more brace `patterns` and `options`. - -```js -var braces = require('braces'); -braces(pattern[, options]); -``` - -By default, braces returns an optimized regex-source string. To get an array of brace patterns, use `brace.expand()`. - -The following section explains the difference in more detail. _(If you're curious about "why" braces does this by default, see [brace matching pitfalls](#brace-matching-pitfalls)_. - -### Optimized vs. expanded braces - -**Optimized** - -By default, patterns are optimized for regex and matching: - -```js -console.log(braces('a/{x,y,z}/b')); -//=> ['a/(x|y|z)/b'] -``` - -**Expanded** - -To expand patterns the same way as Bash or [minimatch](https://github.com/isaacs/minimatch), use the [.expand](#expand) method: - -```js -console.log(braces.expand('a/{x,y,z}/b')); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -Or use [options.expand](#optionsexpand): - -```js -console.log(braces('a/{x,y,z}/b', {expand: true})); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -## Features - -* [lists](#lists): Supports "lists": `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* [sequences](#sequences): Supports alphabetical or numerical "sequences" (ranges): `{1..3}` => `['1', '2', '3']` -* [steps](#steps): Supports "steps" or increments: `{2..10..2}` => `['2', '4', '6', '8', '10']` -* [escaping](#escaping) -* [options](#options) - -### Lists - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric lists: - -```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 - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric ranges (bash "sequences"): - -```js -console.log(braces.expand('{1..3}')); // ['1', '2', '3'] -console.log(braces.expand('a{01..03}b')); // ['a01b', 'a02b', 'a03b'] -console.log(braces.expand('a{1..3}b')); // ['a1b', 'a2b', 'a3b'] -console.log(braces.expand('{a..c}')); // ['a', 'b', 'c'] -console.log(braces.expand('foo/{a..c}')); // ['foo/a', 'foo/b', 'foo/c'] - -// supports 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' ] -``` - -### Steps - -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 (this option is unncessary with the `.expand` method, which does the same thing). - -```js -console.log(braces('a/{b,c}/d', {expand: true})); -//=> [ 'a/b/d', 'a/c/d' ] -``` - -### options.optimize - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Enabled by default. - -```js -console.log(braces('a/{b,c}/d')); -//=> [ 'a/(b|c)/d' ] -``` - -### options.nodupes - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - -### options.rangeLimit - -**Type**: `Number` - -**Default**: `250` - -**Description**: When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) when the difference between the range minimum and range maximum exceeds the `rangeLimit`. This is to prevent huge ranges from freezing your application. - -You can set this to any number, or change `options.rangeLimit` 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. - -```js -var range = braces.expand('x{a..e}y', { - transform: function(str) { - return 'foo' + str; - } -}); - -console.log(range); -//=> [ 'xfooay', 'xfooby', 'xfoocy', 'xfoody', 'xfooey' ] -``` - -### 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 -var 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](https://github.com/isaacs/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](https://github.com/isaacs/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 - -```bash -Benchmarking: (8 of 8) - · combination-nested - · combination - · escaped - · list-basic - · list-multiple - · no-braces - · sequence-basic - · sequence-multiple - -# benchmark/fixtures/combination-nested.js (52 bytes) - brace-expansion x 4,756 ops/sec ±1.09% (86 runs sampled) - braces x 11,202,303 ops/sec ±1.06% (88 runs sampled) - minimatch x 4,816 ops/sec ±0.99% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/combination.js (51 bytes) - brace-expansion x 625 ops/sec ±0.87% (87 runs sampled) - braces x 11,031,884 ops/sec ±0.72% (90 runs sampled) - minimatch x 637 ops/sec ±0.84% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/escaped.js (44 bytes) - brace-expansion x 163,325 ops/sec ±1.05% (87 runs sampled) - braces x 10,655,071 ops/sec ±1.22% (88 runs sampled) - minimatch x 147,495 ops/sec ±0.96% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-basic.js (40 bytes) - brace-expansion x 99,726 ops/sec ±1.07% (83 runs sampled) - braces x 10,596,584 ops/sec ±0.98% (88 runs sampled) - minimatch x 100,069 ops/sec ±1.17% (86 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-multiple.js (52 bytes) - brace-expansion x 34,348 ops/sec ±1.08% (88 runs sampled) - braces x 9,264,131 ops/sec ±1.12% (88 runs sampled) - minimatch x 34,893 ops/sec ±0.87% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/no-braces.js (48 bytes) - brace-expansion x 275,368 ops/sec ±1.18% (89 runs sampled) - braces x 9,134,677 ops/sec ±0.95% (88 runs sampled) - minimatch x 3,755,954 ops/sec ±1.13% (89 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-basic.js (41 bytes) - brace-expansion x 5,492 ops/sec ±1.35% (87 runs sampled) - braces x 8,485,034 ops/sec ±1.28% (89 runs sampled) - minimatch x 5,341 ops/sec ±1.17% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-multiple.js (51 bytes) - brace-expansion x 116 ops/sec ±0.77% (77 runs sampled) - braces x 9,445,118 ops/sec ±1.32% (84 runs sampled) - minimatch x 109 ops/sec ±1.16% (76 runs sampled) - - fastest is braces -``` - -## 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 -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") -* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 188 | [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) | - -### Author - -**Jon Schlinkert** - -* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [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.6.0, on February 17, 2018._ - -
-
-
    -
  1. this is the largest safe integer allowed in JavaScript. - -
  2. -
-
\ No newline at end of file diff --git a/packages/common/node_modules/braces/index.js b/packages/common/node_modules/braces/index.js deleted file mode 100644 index 048e1c2334..0000000000 --- a/packages/common/node_modules/braces/index.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -/** - * Module dependencies - */ - -var toRegex = require('to-regex'); -var unique = require('array-unique'); -var extend = require('extend-shallow'); - -/** - * Local dependencies - */ - -var compilers = require('./lib/compilers'); -var parsers = require('./lib/parsers'); -var Braces = require('./lib/braces'); -var utils = require('./lib/utils'); -var MAX_LENGTH = 1024 * 64; -var cache = {}; - -/** - * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). - * - * ```js - * var braces = require('braces'); - * console.log(braces('{a,b,c}')); - * //=> ['(a|b|c)'] - * - * console.log(braces('{a,b,c}', {expand: true})); - * //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -function braces(pattern, options) { - var key = utils.createKey(String(pattern), options); - var arr = []; - - var disabled = options && options.cache === false; - if (!disabled && cache.hasOwnProperty(key)) { - return cache[key]; - } - - if (Array.isArray(pattern)) { - for (var i = 0; i < pattern.length; i++) { - arr.push.apply(arr, braces.create(pattern[i], options)); - } - } else { - arr = braces.create(pattern, options); - } - - if (options && options.nodupes === true) { - arr = unique(arr); - } - - if (!disabled) { - cache[key] = arr; - } - return arr; -} - -/** - * 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 [.optimize](#optimize) instead. - * - * ```js - * var 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 = function(pattern, options) { - return braces.create(pattern, extend({}, options, {expand: true})); -}; - -/** - * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. - * - * ```js - * var braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.optimize = function(pattern, options) { - return braces.create(pattern, options); -}; - -/** - * 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 - * var 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 = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function create() { - if (pattern === '' || pattern.length < 3) { - return [pattern]; - } - - if (utils.isEmptySets(pattern)) { - return []; - } - - if (utils.isQuotedString(pattern)) { - return [pattern.slice(1, -1)]; - } - - var proto = new Braces(options); - var result = !options || options.expand !== true - ? proto.optimize(pattern, options) - : proto.expand(pattern, options); - - // get the generated pattern(s) - var arr = result.output; - - // filter out empty strings if specified - if (options && options.noempty === true) { - arr = arr.filter(Boolean); - } - - // filter out duplicates if specified - if (options && options.nodupes === true) { - arr = unique(arr); - } - - Object.defineProperty(arr, 'result', { - enumerable: false, - value: result - }); - - return arr; - } - - return memoize('create', pattern, options, create); -}; - -/** - * Create a regular expression from the given string `pattern`. - * - * ```js - * var braces = require('braces'); - * - * console.log(braces.makeRe('id-{200..300}')); - * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ - * ``` - * @param {String} `pattern` The pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -braces.makeRe = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function makeRe() { - var arr = braces(pattern, options); - var opts = extend({strictErrors: false}, options); - return toRegex(arr, opts); - } - - return memoize('makeRe', pattern, options, makeRe); -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * // { type: 'root', - * // errors: [], - * // input: 'a/{b,c}/d', - * // nodes: - * // [ { type: 'bos', val: '' }, - * // { type: 'text', val: 'a/' }, - * // { type: 'brace', - * // nodes: - * // [ { type: 'brace.open', val: '{' }, - * // { type: 'text', val: 'b,c' }, - * // { type: 'brace.close', val: '}' } ] }, - * // { type: 'text', val: '/d' }, - * // { type: 'eos', val: '' } ] } - * ``` - * @param {String} `pattern` Brace pattern to parse - * @param {Object} `options` - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = function(pattern, options) { - var proto = new Braces(options); - return proto.parse(pattern, options); -}; - -/** - * Compile the given `ast` or string with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(braces.compile(ast)); - * // { options: { source: 'string' }, - * // state: {}, - * // compilers: - * // { eos: [Function], - * // noop: [Function], - * // bos: [Function], - * // brace: [Function], - * // 'brace.open': [Function], - * // text: [Function], - * // 'brace.close': [Function] }, - * // output: [ 'a/(b|c)/d' ], - * // ast: - * // { ... }, - * // parsingErrors: [] } - * ``` - * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. - * @param {Object} `options` - * @return {Object} Returns an object that has an `output` property with the compiled string. - * @api public - */ - -braces.compile = function(ast, options) { - var proto = new Braces(options); - return proto.compile(ast, options); -}; - -/** - * Clear the regex cache. - * - * ```js - * braces.clearCache(); - * ``` - * @api public - */ - -braces.clearCache = function() { - cache = braces.cache = {}; -}; - -/** - * Memoize a generated regex or function. A unique key is generated - * from the method name, pattern, and user-defined options. Set - * options.memoize to false to disable. - */ - -function memoize(type, pattern, options, fn) { - var key = utils.createKey(type + ':' + pattern, options); - var disabled = options && options.cache === false; - if (disabled) { - braces.clearCache(); - return fn(pattern, options); - } - - if (cache.hasOwnProperty(key)) { - return cache[key]; - } - - var res = fn(pattern, options); - cache[key] = res; - return res; -} - -/** - * Expose `Braces` constructor and methods - * @type {Function} - */ - -braces.Braces = Braces; -braces.compilers = compilers; -braces.parsers = parsers; -braces.cache = cache; - -/** - * Expose `braces` - * @type {Function} - */ - -module.exports = braces; diff --git a/packages/common/node_modules/braces/lib/utils.js b/packages/common/node_modules/braces/lib/utils.js deleted file mode 100644 index 471667171d..0000000000 --- a/packages/common/node_modules/braces/lib/utils.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -var splitString = require('split-string'); -var utils = module.exports; - -/** - * Module dependencies - */ - -utils.extend = require('extend-shallow'); -utils.flatten = require('arr-flatten'); -utils.isObject = require('isobject'); -utils.fillRange = require('fill-range'); -utils.repeat = require('repeat-element'); -utils.unique = require('array-unique'); - -utils.define = function(obj, key, val) { - Object.defineProperty(obj, key, { - writable: true, - configurable: true, - enumerable: false, - value: val - }); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isEmptySets = function(str) { - return /^(?:\{,\})+$/.test(str); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isQuotedString = function(str) { - var open = str.charAt(0); - if (open === '\'' || open === '"' || open === '`') { - return str.slice(-1) === open; - } - return false; -}; - -/** - * Create the key to use for memoization. The unique key is generated - * by iterating over the options and concatenating key-value pairs - * to the pattern string. - */ - -utils.createKey = function(pattern, options) { - var id = pattern; - if (typeof options === 'undefined') { - return id; - } - var keys = Object.keys(options); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - id += ';' + key + '=' + String(options[key]); - } - return id; -}; - -/** - * Normalize options - */ - -utils.createOptions = function(options) { - var opts = utils.extend.apply(null, arguments); - if (typeof opts.expand === 'boolean') { - opts.optimize = !opts.expand; - } - if (typeof opts.optimize === 'boolean') { - opts.expand = !opts.optimize; - } - if (opts.optimize === true) { - opts.makeRe = true; - } - return opts; -}; - -/** - * Join patterns in `a` to patterns in `b` - */ - -utils.join = function(a, b, options) { - options = options || {}; - a = utils.arrayify(a); - b = utils.arrayify(b); - - if (!a.length) return b; - if (!b.length) return a; - - var len = a.length; - var idx = -1; - var arr = []; - - while (++idx < len) { - var val = a[idx]; - if (Array.isArray(val)) { - for (var i = 0; i < val.length; i++) { - val[i] = utils.join(val[i], b, options); - } - arr.push(val); - continue; - } - - for (var j = 0; j < b.length; j++) { - var bval = b[j]; - - if (Array.isArray(bval)) { - arr.push(utils.join(val, bval, options)); - } else { - arr.push(val + bval); - } - } - } - return arr; -}; - -/** - * Split the given string on `,` if not escaped. - */ - -utils.split = function(str, options) { - var opts = utils.extend({sep: ','}, options); - if (typeof opts.keepQuotes !== 'boolean') { - opts.keepQuotes = true; - } - if (opts.unescape === false) { - opts.keepEscaping = true; - } - return splitString(str, opts, utils.escapeBrackets(opts)); -}; - -/** - * Expand ranges or sets in the given `pattern`. - * - * @param {String} `str` - * @param {Object} `options` - * @return {Object} - */ - -utils.expand = function(str, options) { - var opts = utils.extend({rangeLimit: 10000}, options); - var segs = utils.split(str, opts); - var tok = { segs: segs }; - - if (utils.isQuotedString(str)) { - return tok; - } - - if (opts.rangeLimit === true) { - opts.rangeLimit = 10000; - } - - if (segs.length > 1) { - if (opts.optimize === false) { - tok.val = segs[0]; - return tok; - } - - tok.segs = utils.stringifyArray(tok.segs); - } else if (segs.length === 1) { - var arr = str.split('..'); - - if (arr.length === 1) { - tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; - tok.segs = []; - return tok; - } - - if (arr.length === 2 && arr[0] === arr[1]) { - tok.escaped = true; - tok.val = arr[0]; - tok.segs = []; - return tok; - } - - if (arr.length > 1) { - if (opts.optimize !== false) { - opts.optimize = true; - delete opts.expand; - } - - if (opts.optimize !== true) { - var min = Math.min(arr[0], arr[1]); - var max = Math.max(arr[0], arr[1]); - var step = arr[2] || 1; - - if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - } - - arr.push(opts); - tok.segs = utils.fillRange.apply(null, arr); - - if (!tok.segs.length) { - tok.escaped = true; - tok.val = str; - return tok; - } - - if (opts.optimize === true) { - tok.segs = utils.stringifyArray(tok.segs); - } - - if (tok.segs === '') { - tok.val = str; - } else { - tok.val = tok.segs[0]; - } - return tok; - } - } else { - tok.val = str; - } - return tok; -}; - -/** - * Ensure commas inside brackets and parens are not split. - * @param {Object} `tok` Token from the `split-string` module - * @return {undefined} - */ - -utils.escapeBrackets = function(options) { - return function(tok) { - if (tok.escaped && tok.val === 'b') { - tok.val = '\\b'; - return; - } - - if (tok.val !== '(' && tok.val !== '[') return; - var opts = utils.extend({}, options); - var brackets = []; - var parens = []; - var stack = []; - var val = tok.val; - var str = tok.str; - var i = tok.idx - 1; - - while (++i < str.length) { - var ch = str[i]; - - if (ch === '\\') { - val += (opts.keepEscaping === false ? '' : ch) + str[++i]; - continue; - } - - if (ch === '(') { - parens.push(ch); - stack.push(ch); - } - - if (ch === '[') { - brackets.push(ch); - stack.push(ch); - } - - if (ch === ')') { - parens.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - - if (ch === ']') { - brackets.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - val += ch; - } - - tok.split = false; - tok.val = val.slice(1); - tok.idx = i; - }; -}; - -/** - * Returns true if the given string looks like a regex quantifier - * @return {Boolean} - */ - -utils.isQuantifier = function(str) { - return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.stringifyArray = function(arr) { - return [utils.arrayify(arr).join('|')]; -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.arrayify = function(arr) { - if (typeof arr === 'undefined') { - return []; - } - if (typeof arr === 'string') { - return [arr]; - } - return arr; -}; - -/** - * Returns true if the given `str` is a non-empty string - * @return {Boolean} - */ - -utils.isString = function(str) { - return str != null && typeof str === 'string'; -}; - -/** - * Get the last element from `array` - * @param {Array} `array` - * @return {*} - */ - -utils.last = function(arr, n) { - return arr[arr.length - (n || 1)]; -}; - -utils.escapeRegex = function(str) { - return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); -}; diff --git a/packages/common/node_modules/braces/package.json b/packages/common/node_modules/braces/package.json deleted file mode 100644 index 96cbb2b75c..0000000000 --- a/packages/common/node_modules/braces/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "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": "2.3.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": ">=0.10.0" - }, - "scripts": { - "test": "mocha", - "benchmark": "node benchmark" - }, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "devDependencies": { - "ansi-cyan": "^0.1.1", - "benchmarked": "^2.0.0", - "brace-expansion": "^1.1.8", - "cross-spawn": "^5.1.0", - "gulp": "^3.9.1", - "gulp-eslint": "^4.0.0", - "gulp-format-md": "^1.0.0", - "gulp-istanbul": "^1.1.2", - "gulp-mocha": "^3.0.1", - "gulp-unused": "^0.2.1", - "is-windows": "^1.0.1", - "minimatch": "^3.0.4", - "mocha": "^3.2.0", - "noncharacters": "^1.1.0", - "text-table": "^0.2.0", - "time-diff": "^0.3.1", - "yargs-parser": "^8.0.0" - }, - "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" - ], - "related": { - "list": [ - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "nanomatch" - ] - } - } -} diff --git a/packages/common/node_modules/chalk/license b/packages/common/node_modules/chalk/license deleted file mode 100644 index e7af2f7710..0000000000 --- a/packages/common/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index bc324685a7..0000000000 --- a/packages/common/node_modules/chalk/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "chalk", - "version": "2.4.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "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": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "types": "types/index.d.ts", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/packages/common/node_modules/chalk/readme.md b/packages/common/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c48d..0000000000 --- a/packages/common/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -

-
-
- 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) [![](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) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - - - - -## 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 ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## 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.`