diff --git a/packages/gatsby-source-drupal/.babelrc b/packages/gatsby-source-drupal/.babelrc index ac0ad292bb087..67bb53e836ce1 100644 --- a/packages/gatsby-source-drupal/.babelrc +++ b/packages/gatsby-source-drupal/.babelrc @@ -1,3 +1,3 @@ { - "presets": [["babel-preset-gatsby-package"]] + "presets": [["babel-preset-gatsby-package"], "@babel/preset-typescript"] } diff --git a/packages/gatsby-source-drupal/.eslintrc b/packages/gatsby-source-drupal/.eslintrc new file mode 100644 index 0000000000000..0e9ba9e2a52a8 --- /dev/null +++ b/packages/gatsby-source-drupal/.eslintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/consistent-type-definitions": "off" + } +} diff --git a/packages/gatsby-source-drupal/README.md b/packages/gatsby-source-drupal/README.md index 046a4a4e91e27..422f30df06b93 100644 --- a/packages/gatsby-source-drupal/README.md +++ b/packages/gatsby-source-drupal/README.md @@ -465,7 +465,15 @@ module.exports = { baseUrl: `https://live-contentacms.pantheonsite.io/`, languageConfig: { defaultLanguage: `en`, - enabledLanguages: [`en`, `fil`], + enabledLanguages: [ + `en`, + `fil`, + // add an object here if you've renamed a langcode in Drupal + { + langCode: `en-gb`, + as: `uk`, + }, + ], translatableEntities: [`node--article`], nonTranslatableEntities: [`file--file`], }, diff --git a/packages/gatsby-source-drupal/package.json b/packages/gatsby-source-drupal/package.json index 4f676d098ac58..538c428fe24b8 100644 --- a/packages/gatsby-source-drupal/package.json +++ b/packages/gatsby-source-drupal/package.json @@ -24,8 +24,9 @@ "url-join": "^4.0.1" }, "devDependencies": { - "@babel/cli": "^7.15.4", - "@babel/core": "^7.15.5", + "@babel/cli": "^7.20.7", + "@babel/core": "^7.20.7", + "@babel/preset-typescript": "^7.18.6", "babel-preset-gatsby-package": "^2.25.0", "cross-env": "^7.0.3" }, @@ -48,8 +49,10 @@ "directory": "packages/gatsby-source-drupal" }, "scripts": { - "build": "babel src --out-dir . --ignore \"**/__tests__\"", + "build": "babel src --out-dir . --ignore \"**/__tests__\" --extensions \".ts,.js\"", "prepare": "cross-env NODE_ENV=production npm run build", - "watch": "babel -w src --out-dir . --ignore \"**/__tests__\"" + "watch": "babel -w src --out-dir . --ignore \"**/__tests__\" --extensions \".ts,.js\"", + "test": "npx jest ./src/__tests__ --runInBand", + "test:watch": "npx jest --watch ./src/__tests__ --runInBand" } } diff --git a/packages/gatsby-source-drupal/src/__tests__/index.js b/packages/gatsby-source-drupal/src/__tests__/index.js index ef8ded945c761..90d4b322440b1 100644 --- a/packages/gatsby-source-drupal/src/__tests__/index.js +++ b/packages/gatsby-source-drupal/src/__tests__/index.js @@ -551,7 +551,13 @@ describe(`gatsby-source-drupal`, () => { apiBase, languageConfig: { defaultLanguage: `en_US`, - enabledLanguages: [`en_US`, `i18n-test`], + enabledLanguages: [ + `en_US`, + { + langCode: `en-gb`, + as: `i18n-test`, + }, + ], translatableEntities: [`node--article`], nonTranslatableEntities: [], }, diff --git a/packages/gatsby-source-drupal/src/gatsby-node.js b/packages/gatsby-source-drupal/src/gatsby-node.ts similarity index 97% rename from packages/gatsby-source-drupal/src/gatsby-node.js rename to packages/gatsby-source-drupal/src/gatsby-node.ts index e988e0326632f..b4a618a189679 100644 --- a/packages/gatsby-source-drupal/src/gatsby-node.js +++ b/packages/gatsby-source-drupal/src/gatsby-node.ts @@ -2,6 +2,7 @@ const got = require(`got`) const _ = require(`lodash`) const urlJoin = require(`url-join`) import HttpAgent from "agentkeepalive" + // const http2wrapper = require(`http2-wrapper`) const opentracing = require(`opentracing`) const { SemanticAttributes } = require(`@opentelemetry/semantic-conventions`) @@ -15,12 +16,13 @@ const { HttpsAgent } = HttpAgent const { setOptions, getOptions } = require(`./plugin-options`) -const { +import { nodeFromData, downloadFile, isFileNode, imageCDNState, -} = require(`./normalize`) +} from "./normalize" + const { handleReferences, handleWebhookUpdate, @@ -567,15 +569,19 @@ ${JSON.stringify(webhookBody, null, 4)}` throw error } } + if (d.body.data) { - dataArray.push(...d.body.data) + // @ts-ignore + dataArray.push(...(d.body.data || [])) } + // Add support for includes. Includes allow entity data to be expanded // based on relationships. The expanded data is exposed as `included` // in the JSON API response. // See https://www.drupal.org/docs/8/modules/jsonapi/includes if (d.body.included) { - dataArray.push(...d.body.included) + // @ts-ignore + dataArray.push(...(d.body.included || [])) } // If JSON:API extras is configured to add the resource count, we can queue @@ -593,8 +599,8 @@ ${JSON.stringify(webhookBody, null, 4)}` // Get count of API requests // We round down as we've already gotten the first page at this point. - const pageSize = new URL(d.body.links.next.href).searchParams.get( - `page[limit]` + const pageSize = Number( + new URL(d.body.links.next.href).searchParams.get(`page[limit]`) ) const requestsCount = Math.floor(d.body.meta.count / pageSize) @@ -604,11 +610,14 @@ ${JSON.stringify(webhookBody, null, 4)}` const newUrl = new URL(d.body.links.next.href) await Promise.all( - _.range(requestsCount).map(pageOffset => { + _.range(requestsCount).map((pageOffset: number) => { // We're starting 1 ahead. pageOffset += 1 // Construct URL with new pageOffset. - newUrl.searchParams.set(`page[offset]`, pageOffset * pageSize) + newUrl.searchParams.set( + `page[offset]`, + String(pageOffset * pageSize) + ) return getNext(newUrl.toString(), currentLanguage) }) ) @@ -626,6 +635,7 @@ ${JSON.stringify(webhookBody, null, 4)}` const urlPath = url.href.split(`${apiBase}/`).pop() const baseUrlWithoutTrailingSlash = baseUrl.replace(/\/$/, ``) // The default language's JSON API is at the root. + if ( currentLanguage === getOptions().languageConfig.defaultLanguage || baseUrlWithoutTrailingSlash.slice(-currentLanguage.length) == @@ -869,7 +879,15 @@ exports.pluginOptionsSchema = ({ Joi }) => ), languageConfig: Joi.object({ defaultLanguage: Joi.string().required(), - enabledLanguages: Joi.array().items(Joi.string()).required(), + enabledLanguages: Joi.array() + .items( + Joi.string(), + Joi.object({ + langCode: Joi.string().required(), + as: Joi.string().required(), + }) + ) + .required(), translatableEntities: Joi.array().items(Joi.string()).required(), nonTranslatableEntities: Joi.array().items(Joi.string()).required(), }), diff --git a/packages/gatsby-source-drupal/src/normalize.js b/packages/gatsby-source-drupal/src/normalize.ts similarity index 80% rename from packages/gatsby-source-drupal/src/normalize.js rename to packages/gatsby-source-drupal/src/normalize.ts index 4f68c185065be..498f7624ec2c4 100644 --- a/packages/gatsby-source-drupal/src/normalize.js +++ b/packages/gatsby-source-drupal/src/normalize.ts @@ -3,23 +3,20 @@ const { createRemoteFileNode } = require(`gatsby-source-filesystem`) const path = require(`path`) const probeImageSize = require(`probe-image-size`) -const { getOptions } = require(`./plugin-options`) -const getHref = link => { +import { getOptions } from "./plugin-options" + +export const getHref = link => { if (typeof link === `object`) { return link.href } return link } -exports.getHref = getHref - -const imageCDNState = { +export const imageCDNState = { foundPlaceholderStyle: false, hasLoggedNoPlaceholderStyle: false, } -exports.imageCDNState = imageCDNState - let four04WarningCount = 0 let corruptFileWarningCount = 0 /** @@ -142,7 +139,7 @@ const getGatsbyImageCdnFields = async ({ return {} } -const nodeFromData = async ( +export const nodeFromData = async ( datum, createNodeId, entityReferenceRevisions = [], @@ -150,9 +147,12 @@ const nodeFromData = async ( fileNodesExtendedData, reporter ) => { - const { attributes: { id: attributeId, ...attributes } = {} } = datum + const { attributes: { id: attributeId, ...attributes } = { id: null } } = + datum + const preservedId = typeof attributeId !== `undefined` ? { _attributes_id: attributeId } : {} + const langcode = attributes.langcode || `und` const type = datum.type.replace(/-|__|:|\.|\s/g, `_`) @@ -164,16 +164,18 @@ const nodeFromData = async ( reporter, }) + const versionedId = createNodeIdWithVersion( + datum.id, + datum.type, + langcode, + attributes.drupal_internal__revision_id, + entityReferenceRevisions + ) + + const gatsbyId = createNodeId(versionedId) + return { - id: createNodeId( - createNodeIdWithVersion( - datum.id, - datum.type, - langcode, - attributes.drupal_internal__revision_id, - entityReferenceRevisions - ) - ), + id: gatsbyId, drupal_id: datum.id, parent: null, drupal_parent_menu_item: attributes.parent, @@ -189,52 +191,68 @@ const nodeFromData = async ( } } -exports.nodeFromData = nodeFromData - const isEntityReferenceRevision = (type, entityReferenceRevisions = []) => entityReferenceRevisions.findIndex( revisionType => type.indexOf(revisionType) === 0 ) !== -1 -const createNodeIdWithVersion = ( - id, - type, - langcode, - revisionId, +export const createNodeIdWithVersion = ( + id: string, + type: string, + langcode: string, + revisionId: string, entityReferenceRevisions = [] ) => { + const options = getOptions() + // Fallback to default language for entities that don't translate. - if (getOptions()?.languageConfig?.nonTranslatableEntities.includes(type)) { - langcode = getOptions().languageConfig.defaultLanguage + if ( + options?.languageConfig?.nonTranslatableEntities?.includes(type) && + options.languageConfig.defaultLanguage + ) { + langcode = options.languageConfig.defaultLanguage } // If the source plugin hasn't enabled `translation` then always just set langcode // to "undefined". - let langcodeNormalized = getOptions().languageConfig ? langcode : `und` + let langcodeNormalized = options.languageConfig ? langcode : `und` + + const renamedCode = options?.languageConfig?.renamedEnabledLanguages?.find( + lang => lang.langCode === langcodeNormalized + ) + + if (renamedCode) { + langcodeNormalized = renamedCode.as + } if ( - getOptions().languageConfig && - !getOptions().languageConfig?.enabledLanguages.includes(langcodeNormalized) + !renamedCode && + options.languageConfig && + options.languageConfig.defaultLanguage && + !options?.languageConfig?.enabledLanguages?.includes(langcodeNormalized) ) { - langcodeNormalized = getOptions().languageConfig.defaultLanguage + langcodeNormalized = options.languageConfig.defaultLanguage } + const isReferenceRevision = isEntityReferenceRevision( + type, + entityReferenceRevisions + ) + // The relationship between an entity and another entity also depends on the revision ID if the field is of type // entity reference revision such as for paragraphs. - return isEntityReferenceRevision(type, entityReferenceRevisions) + const idVersion = isReferenceRevision ? `${langcodeNormalized}.${id}.${revisionId || 0}` : `${langcodeNormalized}.${id}` -} -exports.createNodeIdWithVersion = createNodeIdWithVersion + return idVersion +} -const isFileNode = node => { +export const isFileNode = node => { const type = node?.internal?.type return type === `files` || type === `file__file` } -exports.isFileNode = isFileNode - const getFileUrl = (node, baseUrl) => { let fileUrl = node.url @@ -249,8 +267,8 @@ const getFileUrl = (node, baseUrl) => { return url } -exports.downloadFile = async ( - { node, store, cache, createNode, createNodeId, getCache, reporter }, +export const downloadFile = async ( + { node, cache, createNode, createNodeId, getCache }, { basicAuth, baseUrl } ) => { // handle file downloads diff --git a/packages/gatsby-source-drupal/src/plugin-options.js b/packages/gatsby-source-drupal/src/plugin-options.js deleted file mode 100644 index 58ad0be37822f..0000000000000 --- a/packages/gatsby-source-drupal/src/plugin-options.js +++ /dev/null @@ -1,10 +0,0 @@ -let options = {} - -const setOptions = newOptions => { - options = newOptions -} - -const getOptions = () => options - -exports.setOptions = setOptions -exports.getOptions = getOptions diff --git a/packages/gatsby-source-drupal/src/plugin-options.ts b/packages/gatsby-source-drupal/src/plugin-options.ts new file mode 100644 index 0000000000000..e03aa1d1c7b4e --- /dev/null +++ b/packages/gatsby-source-drupal/src/plugin-options.ts @@ -0,0 +1,48 @@ +let options: Options = {} + +type RenamedLangCode = { + langCode: string + as: string +} + +type Options = { + // TODO: type all options + [key: string]: any +} & { + languageConfig?: { + enabledLanguages?: Array + renamedEnabledLanguages?: Array + defaultLanguage?: string + translatableEntities?: Array + nonTranslatableEntities?: Array + } +} + +const mutateOptions = (options: Options) => { + if (options?.languageConfig?.enabledLanguages?.length) { + // Support renamed language codes in Drupal + options.languageConfig.enabledLanguages.forEach(lang => { + if (typeof lang === `object`) { + // move the as langcode of the complex code to the enabled languages array + options!.languageConfig!.enabledLanguages!.push(lang.as) + // then move the complex lang-code to a different array + options!.languageConfig!.renamedEnabledLanguages ||= [] + options!.languageConfig!.renamedEnabledLanguages.push(lang) + } + }) + + // since we moved all the object enabled languages to a new array, we can remove them from enabledLanguages + options.languageConfig.enabledLanguages = + options.languageConfig.enabledLanguages.filter( + lang => typeof lang === `string` + ) + } + + return options +} + +export const setOptions = (newOptions: Options) => { + options = mutateOptions(newOptions) +} + +export const getOptions = () => options diff --git a/packages/gatsby-source-drupal/src/utils.js b/packages/gatsby-source-drupal/src/utils.ts similarity index 100% rename from packages/gatsby-source-drupal/src/utils.js rename to packages/gatsby-source-drupal/src/utils.ts diff --git a/yarn.lock b/yarn.lock index a8bcf579e6e93..c897fe8cffb92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -167,6 +167,22 @@ "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" chokidar "^3.4.0" +"@babel/cli@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.20.7.tgz#8fc12e85c744a1a617680eacb488fab1fcd35b7c" + integrity sha512-WylgcELHB66WwQqItxNILsMlaTd8/SO6SgTTjMp4uCI7P4QyH1r3nqgFmO3BfM4AtfniHgFMH3EpYFj/zynBkQ== + dependencies: + "@jridgewell/trace-mapping" "^0.3.8" + commander "^4.0.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.2.0" + make-dir "^2.1.0" + slash "^2.0.0" + optionalDependencies: + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" + chokidar "^3.4.0" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -186,6 +202,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.0.tgz#2a592fd89bacb1fcde68de31bee4f2f2dacb0e86" integrity sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw== +"@babel/compat-data@^7.20.5": + version "7.20.10" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" + integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== + "@babel/core@7.12.3": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" @@ -251,6 +272,27 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/core@^7.20.7": + version "7.20.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d" + integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.7" + "@babel/helper-compilation-targets" "^7.20.7" + "@babel/helper-module-transforms" "^7.20.11" + "@babel/helpers" "^7.20.7" + "@babel/parser" "^7.20.7" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.12" + "@babel/types" "^7.20.7" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.2" + semver "^6.3.0" + "@babel/eslint-parser@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.15.4.tgz#46385943726291fb3e8db99522c8099b15684387" @@ -285,6 +327,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" + integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw== + dependencies: + "@babel/types" "^7.20.7" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.14.5", "@babel/helper-annotate-as-pure@^7.15.4", "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -292,6 +343,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz#b939b43f8c37765443a19ae74ad8b15978e0a191" @@ -310,6 +368,17 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" + integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== + dependencies: + "@babel/compat-data" "^7.20.5" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.21.3" + lru-cache "^5.1.1" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.15.4", "@babel/helper-create-class-features-plugin@^7.16.7": version "7.17.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz#3778c1ed09a7f3e65e6d6e0f6fbfcc53809d92c9" @@ -323,6 +392,20 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" +"@babel/helper-create-class-features-plugin@^7.20.7": + version "7.20.12" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz#4349b928e79be05ed2d1643b20b99bb87c503819" + integrity sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-member-expression-to-functions" "^7.20.7" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.20.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-create-regexp-features-plugin@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" @@ -386,6 +469,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-member-expression-to-functions@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz#a6f26e919582275a93c3aa6594756d71b0bb7f05" + integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw== + dependencies: + "@babel/types" "^7.20.7" + "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.0.0-beta.49", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" @@ -407,6 +497,20 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helper-module-transforms@^7.20.11": + version "7.20.11" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" + integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.19.1" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.10" + "@babel/types" "^7.20.7" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -414,6 +518,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-plugin-test-runner@7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-test-runner/-/helper-plugin-test-runner-7.14.5.tgz#8b05e821e8694703f6cec2ef988cd3e31e38193d" @@ -431,6 +542,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" + integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== + "@babel/helper-remap-async-to-generator@^7.14.5", "@babel/helper-remap-async-to-generator@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz#2637c0731e4c90fbf58ac58b50b2b5a192fc970f" @@ -451,6 +567,18 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-replace-supers@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" + integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.20.7" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.7" + "@babel/types" "^7.20.7" + "@babel/helper-simple-access@^7.17.7", "@babel/helper-simple-access@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" @@ -458,6 +586,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-simple-access@^7.20.2": + version "7.20.2" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" + integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== + dependencies: + "@babel/types" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers@^7.14.5", "@babel/helper-skip-transparent-expression-wrappers@^7.15.4", "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" @@ -465,6 +600,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" + integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== + dependencies: + "@babel/types" "^7.20.0" + "@babel/helper-split-export-declaration@^7.16.7", "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" @@ -477,6 +619,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== +"@babel/helper-string-parser@^7.19.4": + version "7.19.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" + integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== + "@babel/helper-transform-fixture-test-runner@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-transform-fixture-test-runner/-/helper-transform-fixture-test-runner-7.14.5.tgz#e72b564e2bd79f5e39b35175c1240ef21b37b7ca" @@ -495,6 +642,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== +"@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "@babel/helper-validator-option@^7.14.5", "@babel/helper-validator-option@^7.16.7", "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" @@ -519,6 +671,15 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helpers@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" + integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== + dependencies: + "@babel/template" "^7.20.7" + "@babel/traverse" "^7.20.7" + "@babel/types" "^7.20.7" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -550,6 +711,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.0.tgz#497fcafb1d5b61376959c1c338745ef0577aa02c" integrity sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw== +"@babel/parser@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" + integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.15.4": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz#dbdeabb1e80f622d9f0b583efb2999605e0a567e" @@ -951,6 +1117,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-syntax-typescript@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" + integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.14.5": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" @@ -1248,6 +1421,15 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-typescript" "^7.16.7" +"@babel/plugin-transform-typescript@^7.18.6": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.7.tgz#673f49499cd810ae32a1ea5f3f8fab370987e055" + integrity sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.20.7" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-typescript" "^7.20.0" + "@babel/plugin-transform-unicode-escapes@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b" @@ -1396,6 +1578,15 @@ "@babel/helper-validator-option" "^7.16.7" "@babel/plugin-transform-typescript" "^7.16.7" +"@babel/preset-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" + integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-typescript" "^7.18.6" + "@babel/register@^7.13.16", "@babel/register@^7.15.3": version "7.15.3" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.15.3.tgz#6b40a549e06ec06c885b2ec42c3dd711f55fe752" @@ -1431,6 +1622,15 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" +"@babel/template@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" + integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.19.0", "@babel/traverse@^7.7.2": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.0.tgz#eb9c561c7360005c592cc645abafe0c3c4548eed" @@ -1447,6 +1647,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.7": + version "7.20.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.12.tgz#7f0f787b3a67ca4475adef1f56cb94f6abd4a4b5" + integrity sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.20.7" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.12.1", "@babel/types@^7.12.7", "@babel/types@^7.14.5", "@babel/types@^7.15.4", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" @@ -1456,6 +1672,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" + integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== + dependencies: + "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -14479,6 +14704,11 @@ json5@^2.0.0, json5@^2.1.0, json5@^2.1.2, json5@^2.2.0, json5@^2.2.1: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"