diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17483f8fee..9a32638544 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,6 +110,33 @@ jobs: env: CI: true + testNextPackages: + name: Next - Test Packages + defaults: + run: + working-directory: nextjs + needs: build-linux + runs-on: ubuntu-latest + env: + BLITZ_TELEMETRY_DISABLED: 1 + steps: + - uses: actions/cache@v2 + id: restore-build + with: + path: ./* + key: ${{ runner.os }}-${{ github.sha }} + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: "14" + - name: Setup kernel to increase watchers + if: runner.os == 'Linux' + run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + - name: Test Next Packages + run: yarn testonly:packages + env: + CI: true + testBlitzExamples: timeout-minutes: 30 name: Blitz - Test Example Apps (ubuntu-latest) @@ -378,6 +405,7 @@ jobs: testIntegrationBlitzWin, testUnit, testBlitzPackages, + testNextPackages, testBlitzExamples, testBlitzExamplesWin, ] diff --git a/nextjs/package.json b/nextjs/package.json index f344c04802..173973a93d 100644 --- a/nextjs/package.json +++ b/nextjs/package.json @@ -12,6 +12,7 @@ "dev": "lerna run dev --stream --parallel", "dev2": "while true; do yarn --check-files && yarn dev; done", "testonly": "jest --runInBand", + "testonly:packages": "ultra -r --filter \"packages/*\" --concurrency 15 test", "testheadless": "cross-env HEADLESS=true yarn testonly", "testsafari": "cross-env BROWSER_NAME=safari yarn testonly", "testfirefox": "cross-env BROWSER_NAME=firefox yarn testonly", @@ -145,6 +146,7 @@ "taskr": "1.1.0", "tree-kill": "1.2.2", "typescript": "4.5.2", + "ultra-runner": "3.10.5", "wait-port": "0.2.2", "web-streams-polyfill": "2.1.1", "webpack-bundle-analyzer": "4.3.0", diff --git a/packages/installer/.gitignore b/nextjs/packages/installer/.gitignore similarity index 100% rename from packages/installer/.gitignore rename to nextjs/packages/installer/.gitignore diff --git a/packages/installer/README.md b/nextjs/packages/installer/README.md similarity index 100% rename from packages/installer/README.md rename to nextjs/packages/installer/README.md diff --git a/nextjs/packages/installer/jest.config.js b/nextjs/packages/installer/jest.config.js new file mode 100644 index 0000000000..a1d97949ab --- /dev/null +++ b/nextjs/packages/installer/jest.config.js @@ -0,0 +1,3 @@ +module.exports = { + preset: '../../../jest-unit.config.js', +} diff --git a/packages/installer/jest.setup.js b/nextjs/packages/installer/jest.setup.js similarity index 100% rename from packages/installer/jest.setup.js rename to nextjs/packages/installer/jest.setup.js diff --git a/packages/installer/package.json b/nextjs/packages/installer/package.json similarity index 100% rename from packages/installer/package.json rename to nextjs/packages/installer/package.json diff --git a/nextjs/packages/installer/src/components/enter-to-continue.tsx b/nextjs/packages/installer/src/components/enter-to-continue.tsx new file mode 100644 index 0000000000..22d7db85b7 --- /dev/null +++ b/nextjs/packages/installer/src/components/enter-to-continue.tsx @@ -0,0 +1,12 @@ +import { Text } from 'ink' +import * as React from 'react' +import { Newline } from './newline' + +export const EnterToContinue: React.FC<{ message?: string }> = ({ + message = 'Press ENTER to continue', +}) => ( + <> + + {message} + +) diff --git a/nextjs/packages/installer/src/components/newline.tsx b/nextjs/packages/installer/src/components/newline.tsx new file mode 100644 index 0000000000..7ccb6cc585 --- /dev/null +++ b/nextjs/packages/installer/src/components/newline.tsx @@ -0,0 +1,6 @@ +import { Box } from 'ink' +import * as React from 'react' + +export const Newline: React.FC<{ count?: number }> = ({ count = 1 }) => { + return +} diff --git a/packages/installer/src/executors/add-dependency-executor.tsx b/nextjs/packages/installer/src/executors/add-dependency-executor.tsx similarity index 68% rename from packages/installer/src/executors/add-dependency-executor.tsx rename to nextjs/packages/installer/src/executors/add-dependency-executor.tsx index f5b542caba..20fce7bc07 100644 --- a/packages/installer/src/executors/add-dependency-executor.tsx +++ b/nextjs/packages/installer/src/executors/add-dependency-executor.tsx @@ -1,14 +1,19 @@ -import {spawn} from "cross-spawn" -import * as fs from "fs-extra" -import {Box, Text} from "ink" -import Spinner from "ink-spinner" -import * as path from "path" -import * as React from "react" -import {Newline} from "../components/newline" -import {RecipeCLIArgs} from "../types" -import {useEnterToContinue} from "../utils/use-enter-to-continue" -import {useUserInput} from "../utils/use-user-input" -import {Executor, executorArgument, ExecutorConfig, getExecutorArgument} from "./executor" +import { spawn } from 'cross-spawn' +import * as fs from 'fs-extra' +import { Box, Text } from 'ink' +import Spinner from 'ink-spinner' +import * as path from 'path' +import * as React from 'react' +import { Newline } from '../components/newline' +import { RecipeCLIArgs } from '../types' +import { useEnterToContinue } from '../utils/use-enter-to-continue' +import { useUserInput } from '../utils/use-user-input' +import { + Executor, + executorArgument, + ExecutorConfig, + getExecutorArgument, +} from './executor' interface NpmPackage { name: string @@ -22,24 +27,26 @@ export interface Config extends ExecutorConfig { packages: executorArgument } -export function isAddDependencyExecutor(executor: ExecutorConfig): executor is Config { +export function isAddDependencyExecutor( + executor: ExecutorConfig +): executor is Config { return (executor as Config).packages !== undefined } -export const type = "add-dependency" +export const type = 'add-dependency' -function Package({pkg, loading}: {pkg: NpmPackage; loading: boolean}) { +function Package({ pkg, loading }: { pkg: NpmPackage; loading: boolean }) { return ( {` `} - {loading ? : "šŸ“¦"} + {loading ? : 'šŸ“¦'} {` ${pkg.name}@${pkg.version}`} ) } const DependencyList = ({ - lede = "Hang tight! Installing dependencies...", + lede = 'Hang tight! Installing dependencies...', depsLoading = false, devDepsLoading = false, packages, @@ -60,7 +67,9 @@ const DependencyList = ({ ))} - {devPackages.length ? Dev Dependencies to be installed: : null} + {devPackages.length ? ( + Dev Dependencies to be installed: + ) : null} {devPackages.map((pkg) => ( ))} @@ -72,10 +81,10 @@ const DependencyList = ({ * Exported for unit testing purposes */ export function getPackageManager() { - if (fs.existsSync(path.resolve("yarn.lock"))) { - return "yarn" + if (fs.existsSync(path.resolve('yarn.lock'))) { + return 'yarn' } - return "npm" + return 'npm' } /** @@ -83,40 +92,46 @@ export function getPackageManager() { */ export async function installPackages(packages: NpmPackage[], isDev = false) { const packageManager = getPackageManager() - const isNPM = packageManager === "npm" - const pkgInstallArg = isNPM ? "install" : "add" + const isNPM = packageManager === 'npm' + const pkgInstallArg = isNPM ? 'install' : 'add' const args: string[] = [pkgInstallArg] if (isDev) { - args.push(isNPM ? "--save-dev" : "-D") + args.push(isNPM ? '--save-dev' : '-D') } packages.forEach((pkg) => { pkg.version ? args.push(`${pkg.name}@${pkg.version}`) : args.push(pkg.name) }) await new Promise((resolve) => { const cp = spawn(packageManager, args, { - stdio: ["inherit", "pipe", "pipe"], + stdio: ['inherit', 'pipe', 'pipe'], }) - cp.on("exit", resolve) + cp.on('exit', resolve) }) } -export const Commit: Executor["Commit"] = ({cliArgs, cliFlags, step, onChangeCommitted}) => { +export const Commit: Executor['Commit'] = ({ + cliArgs, + cliFlags, + step, + onChangeCommitted, +}) => { const userInput = useUserInput(cliFlags) const [depsInstalled, setDepsInstalled] = React.useState(false) const [devDepsInstalled, setDevDepsInstalled] = React.useState(false) const handleChangeCommitted = React.useCallback(() => { const packages = (step as Config).packages - const dependencies = packages.length === 1 ? "dependency" : "dependencies" + const dependencies = packages.length === 1 ? 'dependency' : 'dependencies' onChangeCommitted(`Installed ${packages.length} ${dependencies}`) }, [onChangeCommitted, step]) React.useEffect(() => { async function installDeps() { - const packagesToInstall = getExecutorArgument((step as Config).packages, cliArgs).filter( - (p) => !p.isDevDep, - ) + const packagesToInstall = getExecutorArgument( + (step as Config).packages, + cliArgs + ).filter((p) => !p.isDevDep) await installPackages(packagesToInstall) setDepsInstalled(true) } @@ -127,9 +142,10 @@ export const Commit: Executor["Commit"] = ({cliArgs, cliFlags, step, onChangeCom React.useEffect(() => { if (!depsInstalled) return async function installDevDeps() { - const packagesToInstall = getExecutorArgument((step as Config).packages, cliArgs).filter( - (p) => p.isDevDep, - ) + const packagesToInstall = getExecutorArgument( + (step as Config).packages, + cliArgs + ).filter((p) => p.isDevDep) await installPackages(packagesToInstall, true) setDevDepsInstalled(true) } @@ -186,7 +202,12 @@ const CommitWithInput = ({ ) } -const CommitWithoutInput = ({depsInstalled, devDepsInstalled, step, cliArgs}: CommitChildProps) => ( +const CommitWithoutInput = ({ + depsInstalled, + devDepsInstalled, + step, + cliArgs, +}: CommitChildProps) => ( = (cliArgs: RecipeCLIArgs) => T function isDynamicExecutorArgument( - input: executorArgument, + input: executorArgument ): input is dynamicExecutorArgument { - return typeof (input as dynamicExecutorArgument) === "function" + return typeof (input as dynamicExecutorArgument) === 'function' } export type executorArgument = T | dynamicExecutorArgument -export function Frontmatter({executor}: {executor: ExecutorConfig}) { +export function Frontmatter({ executor }: { executor: ExecutorConfig }) { const lineLength = executor.stepName.length + 6 - const verticalBorder = `+${new Array(lineLength).fill("ā€“").join("")}+` + const verticalBorder = `+${new Array(lineLength).fill('ā€“').join('')}+` return ( @@ -63,7 +63,10 @@ export function Frontmatter({executor}: {executor: ExecutorConfig}) { ) } -export function getExecutorArgument(input: executorArgument, cliArgs: RecipeCLIArgs): T { +export function getExecutorArgument( + input: executorArgument, + cliArgs: RecipeCLIArgs +): T { if (isDynamicExecutorArgument(input)) { return input(cliArgs) } diff --git a/packages/installer/src/executors/file-prompt.ts b/nextjs/packages/installer/src/executors/file-prompt.ts similarity index 61% rename from packages/installer/src/executors/file-prompt.ts rename to nextjs/packages/installer/src/executors/file-prompt.ts index 3c5b464c93..0bcca9d44d 100644 --- a/packages/installer/src/executors/file-prompt.ts +++ b/nextjs/packages/installer/src/executors/file-prompt.ts @@ -1,5 +1,5 @@ -import {prompt as enquirer} from "enquirer" -import globby from "globby" +import { prompt as enquirer } from 'enquirer' +import globby from 'globby' enum SearchType { file, @@ -13,8 +13,8 @@ interface FilePromptOptions { context: any } -function getMatchingFiles(filter: string = ""): Promise { - return globby(filter, {expandDirectories: true}) +function getMatchingFiles(filter: string = ''): Promise { + return globby(filter, { expandDirectories: true }) } export async function filePrompt(options: FilePromptOptions): Promise { @@ -24,10 +24,10 @@ export async function filePrompt(options: FilePromptOptions): Promise { if (choices.length === 1) { return choices[0] } - const results: {file: string} = await enquirer({ - type: "autocomplete", - name: "file", - message: "Select the target file", + const results: { file: string } = await enquirer({ + type: 'autocomplete', + name: 'file', + message: 'Select the target file', // @ts-ignore limit: 10, choices, diff --git a/packages/installer/src/executors/file-transform-executor.tsx b/nextjs/packages/installer/src/executors/file-transform-executor.tsx similarity index 71% rename from packages/installer/src/executors/file-transform-executor.tsx rename to nextjs/packages/installer/src/executors/file-transform-executor.tsx index 85b3d87251..8ac9af1ae9 100644 --- a/packages/installer/src/executors/file-transform-executor.tsx +++ b/nextjs/packages/installer/src/executors/file-transform-executor.tsx @@ -1,10 +1,10 @@ -import {createPatch} from "diff" -import * as fs from "fs-extra" -import {Box, Text} from "ink" -import Spinner from "ink-spinner" -import * as React from "react" -import {EnterToContinue} from "../components/enter-to-continue" -import {RecipeCLIArgs} from "../types" +import { createPatch } from 'diff' +import * as fs from 'fs-extra' +import { Box, Text } from 'ink' +import Spinner from 'ink-spinner' +import * as React from 'react' +import { EnterToContinue } from '../components/enter-to-continue' +import { RecipeCLIArgs } from '../types' import { processFile, stringProcessFile, @@ -12,11 +12,16 @@ import { transform, Transformer, TransformStatus, -} from "../utils/transform" -import {useEnterToContinue} from "../utils/use-enter-to-continue" -import {useUserInput} from "../utils/use-user-input" -import {Executor, executorArgument, ExecutorConfig, getExecutorArgument} from "./executor" -import {filePrompt} from "./file-prompt" +} from '../utils/transform' +import { useEnterToContinue } from '../utils/use-enter-to-continue' +import { useUserInput } from '../utils/use-user-input' +import { + Executor, + executorArgument, + ExecutorConfig, + getExecutorArgument, +} from './executor' +import { filePrompt } from './file-prompt' export interface Config extends ExecutorConfig { selectTargetFiles?(cliArgs: RecipeCLIArgs): any[] @@ -25,19 +30,26 @@ export interface Config extends ExecutorConfig { transformPlain?: StringTransformer } -export function isFileTransformExecutor(executor: ExecutorConfig): executor is Config { +export function isFileTransformExecutor( + executor: ExecutorConfig +): executor is Config { return ( (executor as Config).transform !== undefined || (executor as Config).transformPlain !== undefined ) } -export const type = "file-transform" -export const Propose: Executor["Propose"] = ({cliArgs, cliFlags, onProposalAccepted, step}) => { +export const type = 'file-transform' +export const Propose: Executor['Propose'] = ({ + cliArgs, + cliFlags, + onProposalAccepted, + step, +}) => { const userInput = useUserInput(cliFlags) const [diff, setDiff] = React.useState(null) const [error, setError] = React.useState(null) - const [filePath, setFilePath] = React.useState("") + const [filePath, setFilePath] = React.useState('') const [proposalAccepted, setProposalAccepted] = React.useState(false) const acceptProposal = React.useCallback(() => { @@ -49,11 +61,14 @@ export const Propose: Executor["Propose"] = ({cliArgs, cliFlags, onProposalAccep async function generateDiff() { const fileToTransform: string = await filePrompt({ context: cliArgs, - globFilter: getExecutorArgument((step as Config).singleFileSearch, cliArgs), + globFilter: getExecutorArgument( + (step as Config).singleFileSearch, + cliArgs + ), getChoices: (step as Config).selectTargetFiles, }) setFilePath(fileToTransform) - const originalFile = fs.readFileSync(fileToTransform).toString("utf-8") + const originalFile = fs.readFileSync(fileToTransform).toString('utf-8') const newFile = await ((step as Config).transformPlain ? stringProcessFile(originalFile, (step as Config).transformPlain!) : processFile(originalFile, (step as Config).transform!)) @@ -96,19 +111,19 @@ interface ProposeChildProps { acceptProposal: () => void } -const Diff = ({diff}: {diff: string}) => ( +const Diff = ({ diff }: { diff: string }) => ( <> {diff - .split("\n") + .split('\n') .slice(2) .map((line, idx) => { let styleProps: any = {} - if (line.startsWith("-") && !line.startsWith("---")) { + if (line.startsWith('-') && !line.startsWith('---')) { styleProps.bold = true - styleProps.color = "red" - } else if (line.startsWith("+") && !line.startsWith("+++")) { + styleProps.color = 'red' + } else if (line.startsWith('+') && !line.startsWith('+++')) { styleProps.bold = true - styleProps.color = "green" + styleProps.color = 'green' } return ( @@ -125,7 +140,7 @@ const ProposeWithInput = ({ proposalAccepted, acceptProposal, }: ProposeChildProps) => { - useEnterToContinue(acceptProposal, filePath !== "" && !proposalAccepted) + useEnterToContinue(acceptProposal, filePath !== '' && !proposalAccepted) return ( @@ -142,7 +157,7 @@ const ProposeWithoutInput = ({ acceptProposal, }: ProposeChildProps) => { React.useEffect(() => { - if (filePath !== "" && !proposalAccepted) { + if (filePath !== '' && !proposalAccepted) { acceptProposal() } }, [acceptProposal, filePath, proposalAccepted]) @@ -154,7 +169,11 @@ const ProposeWithoutInput = ({ ) } -export const Commit: Executor["Commit"] = ({onChangeCommitted, proposalData: filePath, step}) => { +export const Commit: Executor['Commit'] = ({ + onChangeCommitted, + proposalData: filePath, + step, +}) => { React.useEffect(() => { void (async function () { const results = await transform( @@ -162,7 +181,7 @@ export const Commit: Executor["Commit"] = ({onChangeCommitted, proposalData: fil await ((step as Config).transformPlain ? stringProcessFile(original, (step as Config).transformPlain!) : processFile(original, (step as Config).transform!)), - [filePath], + [filePath] ) if (results.some((r) => r.status === TransformStatus.Failure)) { console.error(results) diff --git a/packages/installer/src/executors/new-file-executor.tsx b/nextjs/packages/installer/src/executors/new-file-executor.tsx similarity index 60% rename from packages/installer/src/executors/new-file-executor.tsx rename to nextjs/packages/installer/src/executors/new-file-executor.tsx index a23da8a873..c4f63221f6 100644 --- a/packages/installer/src/executors/new-file-executor.tsx +++ b/nextjs/packages/installer/src/executors/new-file-executor.tsx @@ -1,24 +1,31 @@ -import {Generator, GeneratorOptions, SourceRootType} from "@blitzjs/generator" -import {Box, Text} from "ink" -import {useEffect, useState} from "react" -import * as React from "react" -import {EnterToContinue} from "../components/enter-to-continue" -import {useEnterToContinue} from "../utils/use-enter-to-continue" -import {useUserInput} from "../utils/use-user-input" -import {Executor, executorArgument, ExecutorConfig, getExecutorArgument} from "./executor" +import { Generator, GeneratorOptions, SourceRootType } from '@blitzjs/generator' +import { Box, Text } from 'ink' +import { useEffect, useState } from 'react' +import * as React from 'react' +import { EnterToContinue } from '../components/enter-to-continue' +import { useEnterToContinue } from '../utils/use-enter-to-continue' +import { useUserInput } from '../utils/use-user-input' +import { + Executor, + executorArgument, + ExecutorConfig, + getExecutorArgument, +} from './executor' export interface Config extends ExecutorConfig { targetDirectory?: executorArgument templatePath: executorArgument - templateValues: executorArgument<{[key: string]: string}> + templateValues: executorArgument<{ [key: string]: string }> destinationPathPrompt?: executorArgument } -export function isNewFileExecutor(executor: ExecutorConfig): executor is Config { +export function isNewFileExecutor( + executor: ExecutorConfig +): executor is Config { return (executor as Config).templatePath !== undefined } -export const type = "new-file" +export const type = 'new-file' interface TempGeneratorOptions extends GeneratorOptions { targetDirectory?: string @@ -34,9 +41,9 @@ class TempGenerator extends Generator { constructor(options: TempGeneratorOptions) { super(options) - this.sourceRoot = {type: "absolute", path: options.templateRoot} + this.sourceRoot = { type: 'absolute', path: options.templateRoot } this.templateValues = options.templateValues - this.targetDirectory = options.targetDirectory || "." + this.targetDirectory = options.targetDirectory || '.' } getTemplateValues() { @@ -48,26 +55,37 @@ class TempGenerator extends Generator { } } -export const Commit: Executor["Commit"] = ({cliArgs, cliFlags, onChangeCommitted, step}) => { +export const Commit: Executor['Commit'] = ({ + cliArgs, + cliFlags, + onChangeCommitted, + step, +}) => { const userInput = useUserInput(cliFlags) const generatorArgs = React.useMemo( () => ({ - destinationRoot: ".", - targetDirectory: getExecutorArgument((step as Config).targetDirectory, cliArgs), + destinationRoot: '.', + targetDirectory: getExecutorArgument( + (step as Config).targetDirectory, + cliArgs + ), templateRoot: getExecutorArgument((step as Config).templatePath, cliArgs), - templateValues: getExecutorArgument((step as Config).templateValues, cliArgs), + templateValues: getExecutorArgument( + (step as Config).templateValues, + cliArgs + ), }), - [cliArgs, step], + [cliArgs, step] ) - const [fileCreateOutput, setFileCreateOutput] = useState("") + const [fileCreateOutput, setFileCreateOutput] = useState('') const [changeCommited, setChangeCommited] = useState(false) - const fileCreateLines = fileCreateOutput.split("\n") + const fileCreateLines = fileCreateOutput.split('\n') const handleChangeCommitted = React.useCallback(() => { setChangeCommited(true) onChangeCommitted( `Successfully created ${fileCreateLines - .map((l) => l.split(" ").slice(1).join("").trim()) - .join(", ")}`, + .map((l) => l.split(' ').slice(1).join('').trim()) + .join(', ')}` ) }, [fileCreateLines, onChangeCommitted]) @@ -104,11 +122,14 @@ const CommitWithInput = ({ fileCreateOutput, handleChangeCommitted, }: CommitChildProps) => { - useEnterToContinue(handleChangeCommitted, !changeCommited && fileCreateOutput !== "") + useEnterToContinue( + handleChangeCommitted, + !changeCommited && fileCreateOutput !== '' + ) return ( - {fileCreateOutput !== "" && ( + {fileCreateOutput !== '' && ( <> {fileCreateOutput} @@ -124,12 +145,14 @@ const CommitWithoutInput = ({ handleChangeCommitted, }: CommitChildProps) => { React.useEffect(() => { - if (!changeCommited && fileCreateOutput !== "") { + if (!changeCommited && fileCreateOutput !== '') { handleChangeCommitted() } }, [changeCommited, fileCreateOutput, handleChangeCommitted]) return ( - {fileCreateOutput !== "" && {fileCreateOutput}} + + {fileCreateOutput !== '' && {fileCreateOutput}} + ) } diff --git a/packages/installer/src/executors/print-message-executor.tsx b/nextjs/packages/installer/src/executors/print-message-executor.tsx similarity index 73% rename from packages/installer/src/executors/print-message-executor.tsx rename to nextjs/packages/installer/src/executors/print-message-executor.tsx index 7dac7f57f2..641424e604 100644 --- a/packages/installer/src/executors/print-message-executor.tsx +++ b/nextjs/packages/installer/src/executors/print-message-executor.tsx @@ -1,24 +1,34 @@ -import {Box, Text} from "ink" -import * as React from "react" -import {EnterToContinue} from "../components/enter-to-continue" -import {useEnterToContinue} from "../utils/use-enter-to-continue" -import {useUserInput} from "../utils/use-user-input" -import {Executor, executorArgument, ExecutorConfig, getExecutorArgument} from "./executor" +import { Box, Text } from 'ink' +import * as React from 'react' +import { EnterToContinue } from '../components/enter-to-continue' +import { useEnterToContinue } from '../utils/use-enter-to-continue' +import { useUserInput } from '../utils/use-user-input' +import { + Executor, + executorArgument, + ExecutorConfig, + getExecutorArgument, +} from './executor' export interface Config extends ExecutorConfig { message: executorArgument } -export const type = "print-message" +export const type = 'print-message' -export const Commit: Executor["Commit"] = ({cliArgs, cliFlags, onChangeCommitted, step}) => { +export const Commit: Executor['Commit'] = ({ + cliArgs, + cliFlags, + onChangeCommitted, + step, +}) => { const userInput = useUserInput(cliFlags) const generatorArgs = React.useMemo( () => ({ message: getExecutorArgument((step as Config).message, cliArgs), stepName: getExecutorArgument((step as Config).stepName, cliArgs), }), - [cliArgs, step], + [cliArgs, step] ) const [changeCommited, setChangeCommited] = React.useState(false) @@ -39,7 +49,7 @@ export const Commit: Executor["Commit"] = ({cliArgs, cliFlags, onChangeCommitted interface CommitChildProps { changeCommited: boolean - generatorArgs: {message: string; stepName: string} + generatorArgs: { message: string; stepName: string } handleChangeCommitted: () => void } diff --git a/nextjs/packages/installer/src/index.ts b/nextjs/packages/installer/src/index.ts new file mode 100644 index 0000000000..9789eca254 --- /dev/null +++ b/nextjs/packages/installer/src/index.ts @@ -0,0 +1,12 @@ +export * from './recipe-executor' +export * from './recipe-builder' +export * from './executors/executor' +export { type as AddDependencyType } from './executors/add-dependency-executor' +export { type as FileTransformType } from './executors/file-transform-executor' +export { type as NewFileType } from './executors/new-file-executor' +export { type as PrintMessageType } from './executors/print-message-executor' + +export * from './utils/paths' +export * from './transforms' +export { customTsParser } from './utils/transform' +export type { Program, RecipeCLIArgs, RecipeCLIFlags } from './types' diff --git a/packages/installer/src/recipe-builder.ts b/nextjs/packages/installer/src/recipe-builder.ts similarity index 54% rename from packages/installer/src/recipe-builder.ts rename to nextjs/packages/installer/src/recipe-builder.ts index e63bdbea03..c9c413fb7e 100644 --- a/packages/installer/src/recipe-builder.ts +++ b/nextjs/packages/installer/src/recipe-builder.ts @@ -1,21 +1,27 @@ -import * as AddDependencyExecutor from "./executors/add-dependency-executor" -import * as TransformFileExecutor from "./executors/file-transform-executor" -import * as NewFileExecutor from "./executors/new-file-executor" -import * as PrintMessageExecutor from "./executors/print-message-executor" -import {ExecutorConfigUnion, RecipeExecutor} from "./recipe-executor" -import {RecipeMeta} from "./types" +import * as AddDependencyExecutor from './executors/add-dependency-executor' +import * as TransformFileExecutor from './executors/file-transform-executor' +import * as NewFileExecutor from './executors/new-file-executor' +import * as PrintMessageExecutor from './executors/print-message-executor' +import { ExecutorConfigUnion, RecipeExecutor } from './recipe-executor' +import { RecipeMeta } from './types' export interface IRecipeBuilder { setName(name: string): IRecipeBuilder setDescription(description: string): IRecipeBuilder printMessage( - step: Omit, "explanation">, + step: Omit, 'explanation'> ): IRecipeBuilder setOwner(owner: string): IRecipeBuilder setRepoLink(repoLink: string): IRecipeBuilder - addAddDependenciesStep(step: Omit): IRecipeBuilder - addNewFilesStep(step: Omit): IRecipeBuilder - addTransformFilesStep(step: Omit): IRecipeBuilder + addAddDependenciesStep( + step: Omit + ): IRecipeBuilder + addNewFilesStep( + step: Omit + ): IRecipeBuilder + addTransformFilesStep( + step: Omit + ): IRecipeBuilder build(): RecipeExecutor } @@ -32,7 +38,7 @@ export function RecipeBuilder(): IRecipeBuilder { meta.description = description return this }, - printMessage(step: Omit) { + printMessage(step: Omit) { steps.push({ stepType: PrintMessageExecutor.type, ...step, @@ -47,21 +53,25 @@ export function RecipeBuilder(): IRecipeBuilder { meta.repoLink = repoLink return this }, - addAddDependenciesStep(step: Omit) { + addAddDependenciesStep( + step: Omit + ) { steps.push({ stepType: AddDependencyExecutor.type, ...step, }) return this }, - addNewFilesStep(step: Omit) { + addNewFilesStep(step: Omit) { steps.push({ stepType: NewFileExecutor.type, ...step, }) return this }, - addTransformFilesStep(step: Omit) { + addTransformFilesStep( + step: Omit + ) { steps.push({ stepType: TransformFileExecutor.type, ...step, diff --git a/nextjs/packages/installer/src/recipe-executor.tsx b/nextjs/packages/installer/src/recipe-executor.tsx new file mode 100644 index 0000000000..16d3e0dbb6 --- /dev/null +++ b/nextjs/packages/installer/src/recipe-executor.tsx @@ -0,0 +1,52 @@ +import { render } from 'ink' +import { baseLogger } from 'next/dist/server/lib/logging' +import React from 'react' +import * as AddDependencyExecutor from './executors/add-dependency-executor' +import * as FileTransformExecutor from './executors/file-transform-executor' +import * as NewFileExecutor from './executors/new-file-executor' +import * as PrintMessageExecutor from './executors/print-message-executor' +import { RecipeRenderer } from './recipe-renderer' +import { RecipeCLIArgs, RecipeCLIFlags, RecipeMeta } from './types' +// const debug = require('debug')("blitz:installer") + +type ExecutorConfig = + | AddDependencyExecutor.Config + | FileTransformExecutor.Config + | NewFileExecutor.Config + | PrintMessageExecutor.Config + +export type { ExecutorConfig as ExecutorConfigUnion } + +export class RecipeExecutor { + private readonly steps: ExecutorConfig[] + private readonly options: Options + + constructor(options: Options, steps: ExecutorConfig[]) { + this.options = options + this.steps = steps + } + + async run( + cliArgs: RecipeCLIArgs = {}, + cliFlags: RecipeCLIFlags = { yesToAll: false } + ): Promise { + try { + const { waitUntilExit } = render( + , + { exitOnCtrlC: false } + ) + await waitUntilExit() + baseLogger({ displayDateTime: false, displayLogLevel: false }).info( + `\nšŸŽ‰ The ${this.options.name} recipe has been installed!\n` + ) + } catch (e) { + baseLogger({ displayDateTime: false }).error(e as any) + return + } + } +} diff --git a/packages/installer/src/recipe-renderer.tsx b/nextjs/packages/installer/src/recipe-renderer.tsx similarity index 68% rename from packages/installer/src/recipe-renderer.tsx rename to nextjs/packages/installer/src/recipe-renderer.tsx index 7fd03da01b..88802edc0d 100644 --- a/packages/installer/src/recipe-renderer.tsx +++ b/nextjs/packages/installer/src/recipe-renderer.tsx @@ -1,15 +1,15 @@ -import {Box, Text, useApp, useInput} from "ink" -import React from "react" -import {EnterToContinue} from "./components/enter-to-continue" -import {Newline} from "./components/newline" -import * as AddDependencyExecutor from "./executors/add-dependency-executor" -import {Executor, ExecutorConfig, Frontmatter} from "./executors/executor" -import * as FileTransformExecutor from "./executors/file-transform-executor" -import * as NewFileExecutor from "./executors/new-file-executor" -import * as PrintMessageExecutor from "./executors/print-message-executor" -import {RecipeCLIArgs, RecipeCLIFlags, RecipeMeta} from "./types" -import {useEnterToContinue} from "./utils/use-enter-to-continue" -import {useUserInput} from "./utils/use-user-input" +import { Box, Text, useApp, useInput } from 'ink' +import React from 'react' +import { EnterToContinue } from './components/enter-to-continue' +import { Newline } from './components/newline' +import * as AddDependencyExecutor from './executors/add-dependency-executor' +import { Executor, ExecutorConfig, Frontmatter } from './executors/executor' +import * as FileTransformExecutor from './executors/file-transform-executor' +import * as NewFileExecutor from './executors/new-file-executor' +import * as PrintMessageExecutor from './executors/print-message-executor' +import { RecipeCLIArgs, RecipeCLIFlags, RecipeMeta } from './types' +import { useEnterToContinue } from './utils/use-enter-to-continue' +import { useUserInput } from './utils/use-user-input' enum Action { SkipStep, @@ -27,7 +27,7 @@ enum Status { Committed, } -const ExecutorMap: {[key: string]: Executor} = { +const ExecutorMap: { [key: string]: Executor } = { [AddDependencyExecutor.type]: AddDependencyExecutor, [NewFileExecutor.type]: NewFileExecutor, [PrintMessageExecutor.type]: PrintMessageExecutor, @@ -35,12 +35,17 @@ const ExecutorMap: {[key: string]: Executor} = { } as const interface State { - steps: {executor: ExecutorConfig; status: Status; proposalData?: any; successMsg: string}[] + steps: { + executor: ExecutorConfig + status: Status + proposalData?: any + successMsg: string + }[] current: number } -function recipeReducer(state: State, action: {type: Action; data?: any}) { - const newState = {...state} +function recipeReducer(state: State, action: { type: Action; data?: any }) { + const newState = { ...state } switch (action.type) { case Action.ProposeChange: newState.steps[newState.current].status = Status.Proposed @@ -55,7 +60,10 @@ function recipeReducer(state: State, action: {type: Action; data?: any}) { case Action.CompleteChange: newState.steps[newState.current].status = Status.Committed newState.steps[newState.current].successMsg = action.data as string - newState.current = Math.min(newState.current + 1, newState.steps.length - 1) + newState.current = Math.min( + newState.current + 1, + newState.steps.length - 1 + ) break case Action.SkipStep: newState.current += 1 @@ -71,7 +79,9 @@ interface RecipeProps { recipeMeta: RecipeMeta } -const DispatchContext = React.createContext>(() => {}) +const DispatchContext = React.createContext< + React.Dispatch<{ type: Action; data?: any }> +>(() => {}) function WelcomeMessage({ recipeMeta, @@ -101,16 +111,19 @@ function WelcomeMessage({ ) } -function StepMessages({state}: {state: State}) { +function StepMessages({ state }: { state: State }) { const messages = state.steps - .map((step) => ({msg: step.successMsg, icon: step.executor.successIcon ?? "āœ…"})) + .map((step) => ({ + msg: step.successMsg, + icon: step.executor.successIcon ?? 'āœ…', + })) .filter((s) => s.msg) return ( <> - {messages.map(({msg, icon}, index) => ( + {messages.map(({ msg, icon }, index) => ( - {msg === "\n" ? "" : icon} {msg} + {msg === '\n' ? '' : icon} {msg} ))} @@ -130,30 +143,30 @@ function StepExecutor({ cliFlags: RecipeCLIFlags proposalData?: any }) { - const {Propose, Commit}: Executor = ExecutorMap[step.stepType] + const { Propose, Commit }: Executor = ExecutorMap[step.stepType] const dispatch = React.useContext(DispatchContext) const handleProposalAccepted = React.useCallback( (msg) => { - dispatch({type: Action.CommitApproved, data: msg}) + dispatch({ type: Action.CommitApproved, data: msg }) }, - [dispatch], + [dispatch] ) const handleChangeCommitted = React.useCallback( (msg) => { - dispatch({type: Action.CompleteChange, data: msg}) + dispatch({ type: Action.CompleteChange, data: msg }) }, - [dispatch], + [dispatch] ) React.useEffect(() => { if (status === Status.Pending) { - dispatch({type: Action.ProposeChange}) + dispatch({ type: Action.ProposeChange }) } else if (status === Status.ReadyToCommit) { - dispatch({type: Action.ApplyChange}) + dispatch({ type: Action.ApplyChange }) } if (status === Status.Proposed && !Propose) { - dispatch({type: Action.CommitApproved}) + dispatch({ type: Action.CommitApproved }) } }, [dispatch, status, Propose]) @@ -181,16 +194,25 @@ function StepExecutor({ ) } -export function RecipeRenderer({cliArgs, cliFlags, steps, recipeMeta}: RecipeProps) { +export function RecipeRenderer({ + cliArgs, + cliFlags, + steps, + recipeMeta, +}: RecipeProps) { const userInput = useUserInput(cliFlags) - const {exit} = useApp() + const { exit } = useApp() const [state, dispatch] = React.useReducer(recipeReducer, { current: userInput ? -1 : 0, - steps: steps.map((e) => ({executor: e, status: Status.Pending, successMsg: ""})), + steps: steps.map((e) => ({ + executor: e, + status: Status.Pending, + successMsg: '', + })), }) if (steps.length === 0) { - exit(new Error("This recipe has no steps")) + exit(new Error('This recipe has no steps')) } React.useEffect(() => { @@ -228,18 +250,21 @@ function RecipeRendererWithInput({ cliFlags, recipeMeta, state, -}: Omit & {state: State}) { - const {exit} = useApp() +}: Omit & { state: State }) { + const { exit } = useApp() const dispatch = React.useContext(DispatchContext) useInput((input, key) => { - if (input === "c" && key.ctrl) { - exit(new Error("You aborted installation")) + if (input === 'c' && key.ctrl) { + exit(new Error('You aborted installation')) return } }) - useEnterToContinue(() => dispatch({type: Action.SkipStep}), state.current === -1) + useEnterToContinue( + () => dispatch({ type: Action.SkipStep }), + state.current === -1 + ) return ( <> @@ -264,7 +289,7 @@ function RecipeRendererWithoutInput({ cliFlags, recipeMeta, state, -}: Omit & {state: State}) { +}: Omit & { state: State }) { return ( <> diff --git a/nextjs/packages/installer/src/transforms/add-blitz-middleware.ts b/nextjs/packages/installer/src/transforms/add-blitz-middleware.ts new file mode 100644 index 0000000000..7b1aed0044 --- /dev/null +++ b/nextjs/packages/installer/src/transforms/add-blitz-middleware.ts @@ -0,0 +1,35 @@ +import type { ExpressionKind } from 'ast-types/gen/kinds' +import j from 'jscodeshift' +import { Program } from '../types' +import { transformBlitzConfig } from '.' + +export const addBlitzMiddleware = ( + program: Program, + middleware: ExpressionKind +): Program => + transformBlitzConfig(program, (config) => { + // Locate the middleware property + const middlewareProp = config.properties.find( + (value) => + value.type === 'ObjectProperty' && + value.key.type === 'Identifier' && + value.key.name === 'middleware' + ) as j.ObjectProperty | undefined + + if (middlewareProp && middlewareProp.value.type === 'ArrayExpression') { + // We found it, pop on our middleware. + middlewareProp.value.elements.push(middleware) + } else { + // No middleware prop, add our own. + config.properties.push( + j.property('init', j.identifier('middleware'), { + type: 'ArrayExpression', + elements: [middleware], + loc: null, + comments: null, + }) + ) + } + + return config + }) diff --git a/packages/installer/src/transforms/add-import.ts b/nextjs/packages/installer/src/transforms/add-import.ts similarity index 70% rename from packages/installer/src/transforms/add-import.ts rename to nextjs/packages/installer/src/transforms/add-import.ts index b1c9e304b4..c1a60d74cd 100644 --- a/packages/installer/src/transforms/add-import.ts +++ b/nextjs/packages/installer/src/transforms/add-import.ts @@ -1,7 +1,10 @@ -import j from "jscodeshift" -import {Program} from "../types" +import j from 'jscodeshift' +import { Program } from '../types' -export function addImport(program: Program, importToAdd: j.ImportDeclaration): Program { +export function addImport( + program: Program, + importToAdd: j.ImportDeclaration +): Program { const importStatementCount = program.find(j.ImportDeclaration).length if (importStatementCount === 0) { program.find(j.Statement).at(0).insertBefore(importToAdd) diff --git a/nextjs/packages/installer/src/transforms/find-module-exports-expressions.ts b/nextjs/packages/installer/src/transforms/find-module-exports-expressions.ts new file mode 100644 index 0000000000..0da29c9f04 --- /dev/null +++ b/nextjs/packages/installer/src/transforms/find-module-exports-expressions.ts @@ -0,0 +1,14 @@ +import j from 'jscodeshift' +import { Program } from '../types' + +export const findModuleExportsExpressions = (program: Program) => + program.find(j.AssignmentExpression).filter((path) => { + const { left, right } = path.value + return ( + left.type === 'MemberExpression' && + left.object.type === 'Identifier' && + left.property.type === 'Identifier' && + left.property.name === 'exports' && + right.type === 'ObjectExpression' + ) + }) diff --git a/nextjs/packages/installer/src/transforms/index.ts b/nextjs/packages/installer/src/transforms/index.ts new file mode 100644 index 0000000000..9563bc4d49 --- /dev/null +++ b/nextjs/packages/installer/src/transforms/index.ts @@ -0,0 +1,7 @@ +export * from './add-import' +export * from './add-blitz-middleware' +export * from './find-module-exports-expressions' +export * from './prisma' +export * from './transform-blitz-config' +export * from './update-babel-config' +export * from './wrap-blitz-config' diff --git a/packages/installer/src/transforms/prisma/add-prisma-enum.ts b/nextjs/packages/installer/src/transforms/prisma/add-prisma-enum.ts similarity index 66% rename from packages/installer/src/transforms/prisma/add-prisma-enum.ts rename to nextjs/packages/installer/src/transforms/prisma/add-prisma-enum.ts index 561a86fb59..a4b9425a89 100644 --- a/packages/installer/src/transforms/prisma/add-prisma-enum.ts +++ b/nextjs/packages/installer/src/transforms/prisma/add-prisma-enum.ts @@ -1,5 +1,5 @@ -import {Enum} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Enum } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Adds an enum to your schema.prisma data model. @@ -19,9 +19,14 @@ import {produceSchema} from "./produce-schema" }) * ``` */ -export function addPrismaEnum(source: string, enumProps: Enum): Promise { +export function addPrismaEnum( + source: string, + enumProps: Enum +): Promise { return produceSchema(source, (schema) => { - const existing = schema.list.find((x) => x.type === "enum" && x.name === enumProps.name) + const existing = schema.list.find( + (x) => x.type === 'enum' && x.name === enumProps.name + ) existing ? Object.assign(existing, enumProps) : schema.list.push(enumProps) }) } diff --git a/packages/installer/src/transforms/prisma/add-prisma-field.ts b/nextjs/packages/installer/src/transforms/prisma/add-prisma-field.ts similarity index 60% rename from packages/installer/src/transforms/prisma/add-prisma-field.ts rename to nextjs/packages/installer/src/transforms/prisma/add-prisma-field.ts index 360fc48986..a13e36ad28 100644 --- a/packages/installer/src/transforms/prisma/add-prisma-field.ts +++ b/nextjs/packages/installer/src/transforms/prisma/add-prisma-field.ts @@ -1,5 +1,5 @@ -import {Field, Model} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Field, Model } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Adds a field to a model in your schema.prisma data model. @@ -22,13 +22,19 @@ import {produceSchema} from "./produce-schema" export function addPrismaField( source: string, modelName: string, - fieldProps: Field, + fieldProps: Field ): Promise { return produceSchema(source, (schema) => { - const model = schema.list.find((x) => x.type === "model" && x.name === modelName) as Model + const model = schema.list.find( + (x) => x.type === 'model' && x.name === modelName + ) as Model if (!model) return - const existing = model.properties.find((x) => x.type === "field" && x.name === fieldProps.name) - existing ? Object.assign(existing, fieldProps) : model.properties.push(fieldProps) + const existing = model.properties.find( + (x) => x.type === 'field' && x.name === fieldProps.name + ) + existing + ? Object.assign(existing, fieldProps) + : model.properties.push(fieldProps) }) } diff --git a/packages/installer/src/transforms/prisma/add-prisma-generator.ts b/nextjs/packages/installer/src/transforms/prisma/add-prisma-generator.ts similarity index 58% rename from packages/installer/src/transforms/prisma/add-prisma-generator.ts rename to nextjs/packages/installer/src/transforms/prisma/add-prisma-generator.ts index c9f0e35406..a5e269150d 100644 --- a/packages/installer/src/transforms/prisma/add-prisma-generator.ts +++ b/nextjs/packages/installer/src/transforms/prisma/add-prisma-generator.ts @@ -1,5 +1,5 @@ -import {Generator} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Generator } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Adds a generator to your schema.prisma data model. @@ -16,11 +16,16 @@ import {produceSchema} from "./produce-schema" }) * ``` */ -export function addPrismaGenerator(source: string, generatorProps: Generator): Promise { +export function addPrismaGenerator( + source: string, + generatorProps: Generator +): Promise { return produceSchema(source, (schema) => { const existing = schema.list.find( - (x) => x.type === "generator" && x.name === generatorProps.name, + (x) => x.type === 'generator' && x.name === generatorProps.name ) as Generator - existing ? Object.assign(existing, generatorProps) : schema.list.push(generatorProps) + existing + ? Object.assign(existing, generatorProps) + : schema.list.push(generatorProps) }) } diff --git a/packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts b/nextjs/packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts similarity index 65% rename from packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts rename to nextjs/packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts index 23418ac49e..d0824e2d6e 100644 --- a/packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts +++ b/nextjs/packages/installer/src/transforms/prisma/add-prisma-model-attribute.ts @@ -1,5 +1,5 @@ -import {Model, ModelAttribute} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Model, ModelAttribute } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Adds a field to a model in your schema.prisma data model. @@ -22,16 +22,20 @@ import {produceSchema} from "./produce-schema" export function addPrismaModelAttribute( source: string, modelName: string, - attributeProps: ModelAttribute, + attributeProps: ModelAttribute ): Promise { return produceSchema(source, (schema) => { - const model = schema.list.find((x) => x.type === "model" && x.name === modelName) as Model + const model = schema.list.find( + (x) => x.type === 'model' && x.name === modelName + ) as Model if (!model) return const existing = model.properties.find( - (x) => x.type === "attribute" && x.name === attributeProps.name, + (x) => x.type === 'attribute' && x.name === attributeProps.name ) - existing ? Object.assign(existing, attributeProps) : model.properties.push(attributeProps) + existing + ? Object.assign(existing, attributeProps) + : model.properties.push(attributeProps) }) } diff --git a/packages/installer/src/transforms/prisma/add-prisma-model.ts b/nextjs/packages/installer/src/transforms/prisma/add-prisma-model.ts similarity index 55% rename from packages/installer/src/transforms/prisma/add-prisma-model.ts rename to nextjs/packages/installer/src/transforms/prisma/add-prisma-model.ts index 014ef0219b..e749a6db56 100644 --- a/packages/installer/src/transforms/prisma/add-prisma-model.ts +++ b/nextjs/packages/installer/src/transforms/prisma/add-prisma-model.ts @@ -1,5 +1,5 @@ -import {Model} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Model } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Adds an enum to your schema.prisma data model. @@ -16,9 +16,16 @@ import {produceSchema} from "./produce-schema" }) * ``` */ -export function addPrismaModel(source: string, modelProps: Model): Promise { +export function addPrismaModel( + source: string, + modelProps: Model +): Promise { return produceSchema(source, (schema) => { - const existing = schema.list.find((x) => x.type === "model" && x.name === modelProps.name) - existing ? Object.assign(existing, modelProps) : schema.list.push(modelProps) + const existing = schema.list.find( + (x) => x.type === 'model' && x.name === modelProps.name + ) + existing + ? Object.assign(existing, modelProps) + : schema.list.push(modelProps) }) } diff --git a/nextjs/packages/installer/src/transforms/prisma/index.ts b/nextjs/packages/installer/src/transforms/prisma/index.ts new file mode 100644 index 0000000000..7ef6589681 --- /dev/null +++ b/nextjs/packages/installer/src/transforms/prisma/index.ts @@ -0,0 +1,7 @@ +export * from './add-prisma-enum' +export * from './add-prisma-field' +export * from './add-prisma-generator' +export * from './add-prisma-model-attribute' +export * from './add-prisma-model' +export * from './produce-schema' +export * from './set-prisma-data-source' diff --git a/packages/installer/src/transforms/prisma/print-schema.ts b/nextjs/packages/installer/src/transforms/prisma/print-schema.ts similarity index 86% rename from packages/installer/src/transforms/prisma/print-schema.ts rename to nextjs/packages/installer/src/transforms/prisma/print-schema.ts index e6c020504e..b5048eaf16 100644 --- a/packages/installer/src/transforms/prisma/print-schema.ts +++ b/nextjs/packages/installer/src/transforms/prisma/print-schema.ts @@ -1,4 +1,4 @@ -import {printSchema as printer, Schema} from "@mrleebo/prisma-ast" +import { printSchema as printer, Schema } from '@mrleebo/prisma-ast' /** * Takes the schema.prisma document parsed from @mrleebo/prisma-ast and diff --git a/packages/installer/src/transforms/prisma/produce-schema.ts b/nextjs/packages/installer/src/transforms/prisma/produce-schema.ts similarity index 84% rename from packages/installer/src/transforms/prisma/produce-schema.ts rename to nextjs/packages/installer/src/transforms/prisma/produce-schema.ts index 36ce7af989..43cc8b5324 100644 --- a/packages/installer/src/transforms/prisma/produce-schema.ts +++ b/nextjs/packages/installer/src/transforms/prisma/produce-schema.ts @@ -1,4 +1,4 @@ -import {getSchema, printSchema, Schema} from "@mrleebo/prisma-ast" +import { getSchema, printSchema, Schema } from '@mrleebo/prisma-ast' /** * A file transformer that parses a schema.prisma string, offers you a callback @@ -11,7 +11,7 @@ import {getSchema, printSchema, Schema} from "@mrleebo/prisma-ast" */ export async function produceSchema( source: string, - producer: (schema: Schema) => void, + producer: (schema: Schema) => void ): Promise { const schema = await getSchema(source) producer(schema) diff --git a/packages/installer/src/transforms/prisma/set-prisma-data-source.ts b/nextjs/packages/installer/src/transforms/prisma/set-prisma-data-source.ts similarity index 64% rename from packages/installer/src/transforms/prisma/set-prisma-data-source.ts rename to nextjs/packages/installer/src/transforms/prisma/set-prisma-data-source.ts index ceff6a3513..e63ffec0bd 100644 --- a/packages/installer/src/transforms/prisma/set-prisma-data-source.ts +++ b/nextjs/packages/installer/src/transforms/prisma/set-prisma-data-source.ts @@ -1,5 +1,5 @@ -import {Datasource} from "@mrleebo/prisma-ast" -import {produceSchema} from "./produce-schema" +import { Datasource } from '@mrleebo/prisma-ast' +import { produceSchema } from './produce-schema' /** * Modify the prisma datasource metadata to use the provider and url specified. @@ -23,9 +23,14 @@ import {produceSchema} from "./produce-schema" }) * ``` */ -export function setPrismaDataSource(source: string, datasourceProps: Datasource): Promise { +export function setPrismaDataSource( + source: string, + datasourceProps: Datasource +): Promise { return produceSchema(source, (schema) => { - const existing = schema.list.find((x) => x.type === "datasource") - existing ? Object.assign(existing, datasourceProps) : schema.list.push(datasourceProps) + const existing = schema.list.find((x) => x.type === 'datasource') + existing + ? Object.assign(existing, datasourceProps) + : schema.list.push(datasourceProps) }) } diff --git a/packages/installer/src/transforms/transform-blitz-config.ts b/nextjs/packages/installer/src/transforms/transform-blitz-config.ts similarity index 66% rename from packages/installer/src/transforms/transform-blitz-config.ts rename to nextjs/packages/installer/src/transforms/transform-blitz-config.ts index 3606c47bd1..ac3551d042 100644 --- a/packages/installer/src/transforms/transform-blitz-config.ts +++ b/nextjs/packages/installer/src/transforms/transform-blitz-config.ts @@ -1,25 +1,27 @@ -import type {ExpressionKind} from "ast-types/gen/kinds" -import j from "jscodeshift" -import {Program} from "../types" +import type { ExpressionKind } from 'ast-types/gen/kinds' +import j from 'jscodeshift' +import { Program } from '../types' function recursiveConfigSearch( program: Program, - obj: ExpressionKind, + obj: ExpressionKind ): j.ObjectExpression | undefined { // Identifier being a variable name - if (obj.type === "Identifier") { - const {node} = j(obj).get() + if (obj.type === 'Identifier') { + const { node } = j(obj).get() // Get the definition of the variable const identifier: j.ASTPath = program .find(j.VariableDeclarator, { - id: {name: node.name}, + id: { name: node.name }, }) .get() // Return what is after the `=` - return identifier.value.init ? recursiveConfigSearch(program, identifier.value.init) : undefined - } else if (obj.type === "CallExpression") { + return identifier.value.init + ? recursiveConfigSearch(program, identifier.value.init) + : undefined + } else if (obj.type === 'CallExpression') { // If it's an function call (like `withBundleAnalyzer`), get the first argument if (obj.arguments.length === 0) { // If it has no arguments, create an empty object: `{}` @@ -28,10 +30,10 @@ function recursiveConfigSearch( return config } else { const arg = obj.arguments[0] - if (arg.type === "SpreadElement") return undefined + if (arg.type === 'SpreadElement') return undefined else return recursiveConfigSearch(program, arg) } - } else if (obj.type === "ObjectExpression") { + } else if (obj.type === 'ObjectExpression') { // If it's an object, return it return obj } else { @@ -39,15 +41,17 @@ function recursiveConfigSearch( } } -export type TransformBlitzConfigCallback = (config: j.ObjectExpression) => j.ObjectExpression +export type TransformBlitzConfigCallback = ( + config: j.ObjectExpression +) => j.ObjectExpression export function transformBlitzConfig( program: Program, - transform: TransformBlitzConfigCallback, + transform: TransformBlitzConfigCallback ): Program { let moduleExportsExpressions = program.find(j.AssignmentExpression, { - operator: "=", - left: {object: {name: "module"}, property: {name: "exports"}}, + operator: '=', + left: { object: { name: 'module' }, property: { name: 'exports' } }, right: {}, }) @@ -59,10 +63,10 @@ export function transformBlitzConfig( let moduleExportExpression = j.expressionStatement( j.assignmentExpression( - "=", - j.memberExpression(j.identifier("module"), j.identifier("exports")), - config, - ), + '=', + j.memberExpression(j.identifier('module'), j.identifier('exports')), + config + ) ) program.get().node.program.body.push(moduleExportExpression) @@ -71,14 +75,14 @@ export function transformBlitzConfig( let config: j.ObjectExpression | undefined = recursiveConfigSearch( program, - moduleExportsExpression.value.right, + moduleExportsExpression.value.right ) if (config) { config = transform(config) } else { console.warn( - "The configuration couldn't be found, but there is a 'module.exports' inside `blitz.config.js`", + "The configuration couldn't be found, but there is a 'module.exports' inside `blitz.config.js`" ) } } else { diff --git a/packages/installer/src/transforms/update-babel-config.ts b/nextjs/packages/installer/src/transforms/update-babel-config.ts similarity index 61% rename from packages/installer/src/transforms/update-babel-config.ts rename to nextjs/packages/installer/src/transforms/update-babel-config.ts index d35763f042..d34a1d710c 100644 --- a/packages/installer/src/transforms/update-babel-config.ts +++ b/nextjs/packages/installer/src/transforms/update-babel-config.ts @@ -1,17 +1,17 @@ -import type {ExpressionKind} from "ast-types/gen/kinds" -import j from "jscodeshift" -import {JsonObject, JsonValue} from "../types" -import {Program} from "../types" -import {findModuleExportsExpressions} from "./find-module-exports-expressions" +import type { ExpressionKind } from 'ast-types/gen/kinds' +import j from 'jscodeshift' +import { JsonObject, JsonValue } from '../types' +import { Program } from '../types' +import { findModuleExportsExpressions } from './find-module-exports-expressions' type AddBabelItemDefinition = string | [name: string, options: JsonObject] const jsonValueToExpression = (value: JsonValue): ExpressionKind => - typeof value === "string" + typeof value === 'string' ? j.stringLiteral(value) - : typeof value === "number" + : typeof value === 'number' ? j.numericLiteral(value) - : typeof value === "boolean" + : typeof value === 'boolean' ? j.booleanLiteral(value) : value === null ? j.nullLiteral() @@ -19,16 +19,22 @@ const jsonValueToExpression = (value: JsonValue): ExpressionKind => ? j.arrayExpression(value.map(jsonValueToExpression)) : j.objectExpression( Object.entries(value) - .filter((entry): entry is [string, JsonValue] => entry[1] !== undefined) + .filter( + (entry): entry is [string, JsonValue] => entry[1] !== undefined + ) .map(([key, value]) => - j.objectProperty(j.stringLiteral(key), jsonValueToExpression(value)), - ), + j.objectProperty(j.stringLiteral(key), jsonValueToExpression(value)) + ) ) -function updateBabelConfig(program: Program, item: AddBabelItemDefinition, key: string): Program { +function updateBabelConfig( + program: Program, + item: AddBabelItemDefinition, + key: string +): Program { findModuleExportsExpressions(program).forEach((moduleExportsExpression) => { j(moduleExportsExpression) - .find(j.ObjectProperty, {key: {name: key}}) + .find(j.ObjectProperty, { key: { name: key } }) .forEach((items) => { // Don't add it again if it already exists, // that what this code does. For simplicity, @@ -36,14 +42,20 @@ function updateBabelConfig(program: Program, item: AddBabelItemDefinition, key: const itemName = Array.isArray(item) ? item[0] : item - if (items.node.value.type === "Literal" || items.node.value.type === "StringLiteral") { + if ( + items.node.value.type === 'Literal' || + items.node.value.type === 'StringLiteral' + ) { // { // presets: "this-preset" // } if (itemName !== items.node.value.value) { - items.node.value = j.arrayExpression([items.node.value, jsonValueToExpression(item)]) + items.node.value = j.arrayExpression([ + items.node.value, + jsonValueToExpression(item), + ]) } - } else if (items.node.value.type === "ArrayExpression") { + } else if (items.node.value.type === 'ArrayExpression') { // { // presets: ["this-preset", "maybe-another", ...] // } @@ -52,22 +64,25 @@ function updateBabelConfig(program: Program, item: AddBabelItemDefinition, key: for (const [i, element] of items.node.value.elements.entries()) { if (!element) continue - if (element.type === "Literal" || element.type === "StringLiteral") { + if ( + element.type === 'Literal' || + element.type === 'StringLiteral' + ) { // { // presets: [..., "this-preset", ...] // } if (element.value === itemName) return - } else if (element.type === "ArrayExpression") { + } else if (element.type === 'ArrayExpression') { // { // presets: [..., ["this-preset"], ...] // } if ( - (element.elements[0]?.type === "Literal" || - element.elements[0]?.type === "StringLiteral") && + (element.elements[0]?.type === 'Literal' || + element.elements[0]?.type === 'StringLiteral') && element.elements[0].value === itemName ) { if ( - element.elements[1]?.type === "ObjectExpression" && + element.elements[1]?.type === 'ObjectExpression' && element.elements[1].properties.length > 0 ) { // The preset has a config. @@ -81,7 +96,10 @@ function updateBabelConfig(program: Program, item: AddBabelItemDefinition, key: const value = item[1][key] if (value === undefined) continue obj.properties.push( - j.objectProperty(j.stringLiteral(key), jsonValueToExpression(value)), + j.objectProperty( + j.stringLiteral(key), + jsonValueToExpression(value) + ) ) } @@ -105,7 +123,11 @@ function updateBabelConfig(program: Program, item: AddBabelItemDefinition, key: return program } -export const addBabelPreset = (program: Program, preset: AddBabelItemDefinition): Program => - updateBabelConfig(program, preset, "presets") -export const addBabelPlugin = (program: Program, plugin: AddBabelItemDefinition): Program => - updateBabelConfig(program, plugin, "plugins") +export const addBabelPreset = ( + program: Program, + preset: AddBabelItemDefinition +): Program => updateBabelConfig(program, preset, 'presets') +export const addBabelPlugin = ( + program: Program, + plugin: AddBabelItemDefinition +): Program => updateBabelConfig(program, plugin, 'plugins') diff --git a/packages/installer/src/transforms/wrap-blitz-config.ts b/nextjs/packages/installer/src/transforms/wrap-blitz-config.ts similarity index 58% rename from packages/installer/src/transforms/wrap-blitz-config.ts rename to nextjs/packages/installer/src/transforms/wrap-blitz-config.ts index a43df2f4c6..11b563bca8 100644 --- a/packages/installer/src/transforms/wrap-blitz-config.ts +++ b/nextjs/packages/installer/src/transforms/wrap-blitz-config.ts @@ -1,10 +1,13 @@ -import j from "jscodeshift" -import {Program} from "../types" +import j from 'jscodeshift' +import { Program } from '../types' -export function wrapBlitzConfig(program: Program, functionName: string): Program { +export function wrapBlitzConfig( + program: Program, + functionName: string +): Program { let moduleExportsExpressions = program.find(j.AssignmentExpression, { - operator: "=", - left: {object: {name: "module"}, property: {name: "exports"}}, + operator: '=', + left: { object: { name: 'module' }, property: { name: 'exports' } }, right: {}, }) @@ -12,19 +15,20 @@ export function wrapBlitzConfig(program: Program, functionName: string): Program if (moduleExportsExpressions.length === 0) { let moduleExportExpression = j.expressionStatement( j.assignmentExpression( - "=", - j.memberExpression(j.identifier("module"), j.identifier("exports")), - j.callExpression(j.identifier(functionName), [j.objectExpression([])]), - ), + '=', + j.memberExpression(j.identifier('module'), j.identifier('exports')), + j.callExpression(j.identifier(functionName), [j.objectExpression([])]) + ) ) program.get().node.program.body.push(moduleExportExpression) } else if (moduleExportsExpressions.length === 1) { let moduleExportsExpression: j.ASTPath = moduleExportsExpressions.get() - moduleExportsExpression.value.right = j.callExpression(j.identifier(functionName), [ - moduleExportsExpression.value.right, - ]) + moduleExportsExpression.value.right = j.callExpression( + j.identifier(functionName), + [moduleExportsExpression.value.right] + ) } else { console.warn("There are multiple 'module.exports' inside 'blitz.config.js'") } diff --git a/packages/installer/src/types.ts b/nextjs/packages/installer/src/types.ts similarity index 87% rename from packages/installer/src/types.ts rename to nextjs/packages/installer/src/types.ts index 8bcb1f2588..afcd035c44 100644 --- a/packages/installer/src/types.ts +++ b/nextjs/packages/installer/src/types.ts @@ -1,4 +1,4 @@ -import type * as j from "jscodeshift" +import type * as j from 'jscodeshift' export interface RecipeMeta { name: string @@ -7,7 +7,7 @@ export interface RecipeMeta { repoLink: string } -export type RecipeCLIArgs = {[Key in string]?: string | true} +export type RecipeCLIArgs = { [Key in string]?: string | true } export interface RecipeCLIFlags { yesToAll: boolean @@ -20,7 +20,7 @@ Matches a JSON object. This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { ā€¦ }`. @see https://github.com/sindresorhus/type-fest */ -export type JsonObject = {[Key in string]?: JsonValue} +export type JsonObject = { [Key in string]?: JsonValue } /** Matches a JSON array. diff --git a/packages/installer/src/utils/paths.ts b/nextjs/packages/installer/src/utils/paths.ts similarity index 59% rename from packages/installer/src/utils/paths.ts rename to nextjs/packages/installer/src/utils/paths.ts index 91f43ee2b8..e14bd13263 100644 --- a/packages/installer/src/utils/paths.ts +++ b/nextjs/packages/installer/src/utils/paths.ts @@ -1,8 +1,12 @@ -import * as fs from "fs-extra" -import * as path from "path" +import * as fs from 'fs-extra' +import * as path from 'path' function ext(jsx = false) { - return fs.existsSync(path.resolve("tsconfig.json")) ? (jsx ? ".tsx" : ".ts") : ".js" + return fs.existsSync(path.resolve('tsconfig.json')) + ? jsx + ? '.tsx' + : '.ts' + : '.js' } export const paths = { @@ -16,15 +20,15 @@ export const paths = { return `app/pages/index${ext(true)}` }, babelConfig() { - return "babel.config.js" + return 'babel.config.js' }, blitzConfig() { return `blitz.config${ext()}` }, packageJson() { - return "package.json" + return 'package.json' }, prismaSchema() { - return "db/schema.prisma" + return 'db/schema.prisma' }, } diff --git a/packages/installer/src/utils/transform.ts b/nextjs/packages/installer/src/utils/transform.ts similarity index 70% rename from packages/installer/src/utils/transform.ts rename to nextjs/packages/installer/src/utils/transform.ts index 1cd5669a0f..88998a0e3c 100644 --- a/packages/installer/src/utils/transform.ts +++ b/nextjs/packages/installer/src/utils/transform.ts @@ -1,21 +1,21 @@ -import * as fs from "fs-extra" -import j from "jscodeshift" -import getBabelOptions, {Overrides} from "recast/parsers/_babel_options" -import * as babel from "recast/parsers/babel" -import {Program} from "../types" +import * as fs from 'fs-extra' +import j from 'jscodeshift' +import getBabelOptions, { Overrides } from 'recast/parsers/_babel_options' +import * as babel from 'recast/parsers/babel' +import { Program } from '../types' export const customTsParser = { parse(source: string, options?: Overrides) { const babelOptions = getBabelOptions(options) - babelOptions.plugins.push("typescript") - babelOptions.plugins.push("jsx") + babelOptions.plugins.push('typescript') + babelOptions.plugins.push('jsx') return babel.parser.parse(source, babelOptions) }, } export enum TransformStatus { - Success = "success", - Failure = "failure", + Success = 'success', + Failure = 'failure', } export interface TransformResult { status: TransformStatus @@ -28,19 +28,22 @@ export type Transformer = (program: Program) => Program | Promise export function stringProcessFile( original: string, - transformerFn: StringTransformer, + transformerFn: StringTransformer ): string | Promise { return transformerFn(original) } -export async function processFile(original: string, transformerFn: Transformer): Promise { - const program = j(original, {parser: customTsParser}) +export async function processFile( + original: string, + transformerFn: Transformer +): Promise { + const program = j(original, { parser: customTsParser }) return (await transformerFn(program)).toSource() } export async function transform( processFile: (original: string) => Promise, - targetFilePaths: string[], + targetFilePaths: string[] ): Promise { const results: TransformResult[] = [] for (const filePath of targetFilePaths) { @@ -53,7 +56,7 @@ export async function transform( } try { const fileBuffer = fs.readFileSync(filePath) - const fileSource = fileBuffer.toString("utf-8") + const fileSource = fileBuffer.toString('utf-8') const transformedCode = await processFile(fileSource) fs.writeFileSync(filePath, transformedCode) results.push({ diff --git a/nextjs/packages/installer/src/utils/use-enter-to-continue.ts b/nextjs/packages/installer/src/utils/use-enter-to-continue.ts new file mode 100644 index 0000000000..6f4e43c80e --- /dev/null +++ b/nextjs/packages/installer/src/utils/use-enter-to-continue.ts @@ -0,0 +1,12 @@ +import { useInput } from 'ink' + +export function useEnterToContinue( + cb: Function, + additionalCondition: boolean = true +) { + useInput((_input, key) => { + if (additionalCondition && key.return) { + cb() + } + }) +} diff --git a/nextjs/packages/installer/src/utils/use-user-input.ts b/nextjs/packages/installer/src/utils/use-user-input.ts new file mode 100644 index 0000000000..89dc7d2419 --- /dev/null +++ b/nextjs/packages/installer/src/utils/use-user-input.ts @@ -0,0 +1,7 @@ +import { useStdin } from 'ink' +import { RecipeCLIFlags } from '../types' + +export function useUserInput(cliFlags: RecipeCLIFlags) { + const { isRawModeSupported } = useStdin() + return isRawModeSupported && !cliFlags.yesToAll +} diff --git a/packages/installer/test/executors/__snapshots__/executor.test.tsx.snap b/nextjs/packages/installer/test/executors/__snapshots__/executor.test.tsx.snap similarity index 100% rename from packages/installer/test/executors/__snapshots__/executor.test.tsx.snap rename to nextjs/packages/installer/test/executors/__snapshots__/executor.test.tsx.snap diff --git a/packages/installer/test/executors/__snapshots__/print-message-executor.test.tsx.snap b/nextjs/packages/installer/test/executors/__snapshots__/print-message-executor.test.tsx.snap similarity index 100% rename from packages/installer/test/executors/__snapshots__/print-message-executor.test.tsx.snap rename to nextjs/packages/installer/test/executors/__snapshots__/print-message-executor.test.tsx.snap diff --git a/nextjs/packages/installer/test/executors/add-dependency-executor.test.ts b/nextjs/packages/installer/test/executors/add-dependency-executor.test.ts new file mode 100644 index 0000000000..49d3750499 --- /dev/null +++ b/nextjs/packages/installer/test/executors/add-dependency-executor.test.ts @@ -0,0 +1,91 @@ +import { spawn } from 'cross-spawn' +import { existsSync } from 'fs-extra' +import { mocked } from 'ts-jest/utils' +import * as AddDependencyExecutor from '../../src/executors/add-dependency-executor' + +jest.mock('fs-extra') +jest.mock('cross-spawn') + +describe('add dependency executor', () => { + const testConfiguration = { + stepId: 'addDependencies', + stepName: 'Add dependencies', + stepType: 'add-dependency', + explanation: 'This step will add some dependencies for testing purposes', + packages: [{ name: 'typescript', version: '4' }, { name: 'ts-node' }], + } + + it('should properly identify executor', () => { + const wrongConfiguration = { + stepId: 'wrongStep', + stepName: 'Wrong Step', + stepType: 'wrong-type', + explanation: 'This step is wrong', + } + expect( + AddDependencyExecutor.isAddDependencyExecutor(wrongConfiguration) + ).toBeFalsy() + expect( + AddDependencyExecutor.isAddDependencyExecutor(testConfiguration) + ).toBeTruthy() + }) + + it('should choose proper package manager according to lock file', () => { + mocked(existsSync).mockReturnValueOnce(true) + expect(AddDependencyExecutor.getPackageManager()).toEqual('yarn') + expect(AddDependencyExecutor.getPackageManager()).toEqual('npm') + }) + + it('should issue proper commands according to the specified packages', async () => { + const mockedSpawn = mockSpawn() + mocked(spawn).mockImplementation(mockedSpawn.spawn as any) + + // NPM + mocked(existsSync).mockReturnValue(false) + await AddDependencyExecutor.installPackages( + testConfiguration.packages, + true + ) + await AddDependencyExecutor.installPackages( + testConfiguration.packages, + false + ) + + // Yarn + mocked(existsSync).mockReturnValue(true) + await AddDependencyExecutor.installPackages( + testConfiguration.packages, + true + ) + await AddDependencyExecutor.installPackages( + testConfiguration.packages, + false + ) + + expect(mockedSpawn.calls.length).toEqual(4) + expect(mockedSpawn.calls[0]).toEqual( + 'npm install --save-dev typescript@4 ts-node' + ) + expect(mockedSpawn.calls[1]).toEqual('npm install typescript@4 ts-node') + expect(mockedSpawn.calls[2]).toEqual('yarn add -D typescript@4 ts-node') + expect(mockedSpawn.calls[3]).toEqual('yarn add typescript@4 ts-node') + }) +}) + +/** + * Primitive mock of spawn function + */ +const mockSpawn = () => { + let calls: string[] = [] + + return { + spawn: (command: string, args: string[], _: unknown = {}) => { + calls.push(`${command} ${args.join(' ')}`) + + return { + on: (_: string, resolve: () => void) => resolve(), + } + }, + calls, + } +} diff --git a/nextjs/packages/installer/test/executors/executor.test.tsx b/nextjs/packages/installer/test/executors/executor.test.tsx new file mode 100644 index 0000000000..156b9f0667 --- /dev/null +++ b/nextjs/packages/installer/test/executors/executor.test.tsx @@ -0,0 +1,25 @@ +import { render } from 'ink-testing-library' +import React from 'react' +import stripAnsi from 'strip-ansi' +import { Frontmatter } from '../../src/executors/executor' + +describe('Executor', () => { + const executorConfig = { + stepId: 'newFile', + stepName: 'New File', + stepType: 'new-file', + explanation: 'Testing text for a new file', + } + it('should render Frontmatter', () => { + const { lastFrame } = render() + + expect(stripAnsi(lastFrame())).toMatchSnapshot() + }) + + it('should contain a step name and explanation', () => { + const { frames } = render() + + expect(frames[0].includes('New File')).toBeTruthy() + expect(frames[0].includes('Testing text for a new file')).toBeTruthy() + }) +}) diff --git a/nextjs/packages/installer/test/executors/print-message-executor.test.tsx b/nextjs/packages/installer/test/executors/print-message-executor.test.tsx new file mode 100644 index 0000000000..4d6ec99c9c --- /dev/null +++ b/nextjs/packages/installer/test/executors/print-message-executor.test.tsx @@ -0,0 +1,39 @@ +import { render } from 'ink-testing-library' +import React from 'react' +import stripAnsi from 'strip-ansi' +import { Commit as PrintMessageExecutor } from '../../src/executors/print-message-executor' + +describe('Executor', () => { + const executorConfig = { + stepId: 'printMessage', + stepName: 'Print message', + stepType: 'print-message', + explanation: 'Testing text for a print message', + message: 'My message', + } + it('should render PrintMessageExecutor', () => { + const { lastFrame } = render( + {}} + step={executorConfig} + /> + ) + + expect(stripAnsi(lastFrame())).toMatchSnapshot() + }) + + it('should contain a step name and explanation', () => { + const { frames } = render( + {}} + step={executorConfig} + /> + ) + + expect(frames[0].includes('My message')).toBeTruthy() + }) +}) diff --git a/packages/installer/test/transforms/__snapshots__/add-import.test.ts.snap b/nextjs/packages/installer/test/transforms/__snapshots__/add-import.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/__snapshots__/add-import.test.ts.snap rename to nextjs/packages/installer/test/transforms/__snapshots__/add-import.test.ts.snap diff --git a/packages/installer/test/transforms/__snapshots__/transform-blitz-config.test.ts.snap b/nextjs/packages/installer/test/transforms/__snapshots__/transform-blitz-config.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/__snapshots__/transform-blitz-config.test.ts.snap rename to nextjs/packages/installer/test/transforms/__snapshots__/transform-blitz-config.test.ts.snap diff --git a/packages/installer/test/transforms/__snapshots__/update-babel-config.test.ts.snap b/nextjs/packages/installer/test/transforms/__snapshots__/update-babel-config.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/__snapshots__/update-babel-config.test.ts.snap rename to nextjs/packages/installer/test/transforms/__snapshots__/update-babel-config.test.ts.snap diff --git a/nextjs/packages/installer/test/transforms/add-import.test.ts b/nextjs/packages/installer/test/transforms/add-import.test.ts new file mode 100644 index 0000000000..e211e29f92 --- /dev/null +++ b/nextjs/packages/installer/test/transforms/add-import.test.ts @@ -0,0 +1,36 @@ +import { addImport, customTsParser } from '@blitzjs/installer' +import j from 'jscodeshift' + +function executeImport( + fileStr: string, + importStatement: j.ImportDeclaration +): string { + return addImport( + j(fileStr, { parser: customTsParser }), + importStatement + ).toSource({ tabWidth: 60 }) +} + +describe('addImport transform', () => { + it('adds import at start of file with no imports present', () => { + const file = `export const truth = () => 42` + const importStatement = j.importDeclaration( + [j.importDefaultSpecifier(j.identifier('React'))], + j.literal('react') + ) + expect(executeImport(file, importStatement)).toMatchSnapshot() + }) + + it('adds import at the end of all imports if imports are present', () => { + const file = `import React from 'react' + +export default function Comp() { + return
hello world!
+}` + const importStatement = j.importDeclaration( + [], + j.literal('app/styles/app.css') + ) + expect(executeImport(file, importStatement)).toMatchSnapshot() + }) +}) diff --git a/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-enum.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-enum.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/add-prisma-enum.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-enum.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-field.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-field.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/add-prisma-field.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-field.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-generator.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-generator.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/add-prisma-generator.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-generator.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model-attribute.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model-attribute.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model-attribute.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model-attribute.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/add-prisma-model.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/produce-schema.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/produce-schema.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/produce-schema.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/produce-schema.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/__snapshots__/set-prisma-data-source.test.ts.snap b/nextjs/packages/installer/test/transforms/prisma/__snapshots__/set-prisma-data-source.test.ts.snap similarity index 100% rename from packages/installer/test/transforms/prisma/__snapshots__/set-prisma-data-source.test.ts.snap rename to nextjs/packages/installer/test/transforms/prisma/__snapshots__/set-prisma-data-source.test.ts.snap diff --git a/packages/installer/test/transforms/prisma/add-prisma-enum.test.ts b/nextjs/packages/installer/test/transforms/prisma/add-prisma-enum.test.ts similarity index 51% rename from packages/installer/test/transforms/prisma/add-prisma-enum.test.ts rename to nextjs/packages/installer/test/transforms/prisma/add-prisma-enum.test.ts index ca9e20af05..4c7cfd428d 100644 --- a/packages/installer/test/transforms/prisma/add-prisma-enum.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/add-prisma-enum.test.ts @@ -1,17 +1,17 @@ -import {addPrismaEnum} from "@blitzjs/installer" +import { addPrismaEnum } from '@blitzjs/installer' -describe("addPrismaEnum", () => { +describe('addPrismaEnum', () => { const subject = (source: string) => addPrismaEnum(source, { - type: "enum", - name: "Role", + type: 'enum', + name: 'Role', enumerators: [ - {type: "enumerator", name: "USER"}, - {type: "enumerator", name: "ADMIN"}, + { type: 'enumerator', name: 'USER' }, + { type: 'enumerator', name: 'ADMIN' }, ], }) - it("creates enum", async () => { + it('creates enum', async () => { const source = ` datasource db { provider = "sqlite" diff --git a/packages/installer/test/transforms/prisma/add-prisma-field.test.ts b/nextjs/packages/installer/test/transforms/prisma/add-prisma-field.test.ts similarity index 56% rename from packages/installer/test/transforms/prisma/add-prisma-field.test.ts rename to nextjs/packages/installer/test/transforms/prisma/add-prisma-field.test.ts index 6850c31808..c9739fd617 100644 --- a/packages/installer/test/transforms/prisma/add-prisma-field.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/add-prisma-field.test.ts @@ -1,16 +1,16 @@ -import {addPrismaField} from "@blitzjs/installer" +import { addPrismaField } from '@blitzjs/installer' -describe("addPrismaField", () => { +describe('addPrismaField', () => { const subject = (source: string) => - addPrismaField(source, "Project", { - type: "field", - name: "name", - fieldType: "String", + addPrismaField(source, 'Project', { + type: 'field', + name: 'name', + fieldType: 'String', optional: false, - attributes: [{type: "attribute", kind: "field", name: "unique"}], + attributes: [{ type: 'attribute', kind: 'field', name: 'unique' }], }) - it("creates field", async () => { + it('creates field', async () => { const source = ` datasource db { provider = "sqlite" @@ -24,7 +24,7 @@ model Project { expect(await subject(source)).toMatchSnapshot() }) - it("skips if model is missing", async () => { + it('skips if model is missing', async () => { const source = ` datasource db { provider = "sqlite" diff --git a/packages/installer/test/transforms/prisma/add-prisma-generator.test.ts b/nextjs/packages/installer/test/transforms/prisma/add-prisma-generator.test.ts similarity index 62% rename from packages/installer/test/transforms/prisma/add-prisma-generator.test.ts rename to nextjs/packages/installer/test/transforms/prisma/add-prisma-generator.test.ts index 9bc65fd795..60db39db3a 100644 --- a/packages/installer/test/transforms/prisma/add-prisma-generator.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/add-prisma-generator.test.ts @@ -1,14 +1,16 @@ -import {addPrismaGenerator} from "@blitzjs/installer" +import { addPrismaGenerator } from '@blitzjs/installer' -describe("addPrismaGenerator", () => { +describe('addPrismaGenerator', () => { const subject = (source: string) => addPrismaGenerator(source, { - type: "generator", - name: "nexusPrisma", - assignments: [{type: "assignment", key: "provider", value: '"nexus-prisma"'}], + type: 'generator', + name: 'nexusPrisma', + assignments: [ + { type: 'assignment', key: 'provider', value: '"nexus-prisma"' }, + ], }) - it("adds generator and keeps existing generator", async () => { + it('adds generator and keeps existing generator', async () => { const source = ` datasource db { provider = "sqlite" @@ -21,7 +23,7 @@ generator client { expect(await subject(source)).toMatchSnapshot() }) - it("adds generator to file", async () => { + it('adds generator to file', async () => { const source = ` datasource db { provider = "sqlite" @@ -31,7 +33,7 @@ datasource db { expect(await subject(source)).toMatchSnapshot() }) - it("overwrites same generator", async () => { + it('overwrites same generator', async () => { const source = ` datasource db { provider = "sqlite" diff --git a/packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts b/nextjs/packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts similarity index 57% rename from packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts rename to nextjs/packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts index 785069d1eb..56f5aabf6a 100644 --- a/packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/add-prisma-model-attribute.test.ts @@ -1,23 +1,23 @@ -import {addPrismaModelAttribute} from "@blitzjs/installer" +import { addPrismaModelAttribute } from '@blitzjs/installer' -describe("addPrismaModelAttribute", () => { +describe('addPrismaModelAttribute', () => { const subject = (source: string) => - addPrismaModelAttribute(source, "Project", { - type: "attribute", - kind: "model", - name: "index", + addPrismaModelAttribute(source, 'Project', { + type: 'attribute', + kind: 'model', + name: 'index', args: [ { - type: "attributeArgument", + type: 'attributeArgument', value: { - type: "array", - args: ["name"], + type: 'array', + args: ['name'], }, }, ], }) - it("creates index", async () => { + it('creates index', async () => { const source = ` datasource db { provider = "sqlite" @@ -32,7 +32,7 @@ model Project { expect(await subject(source)).toMatchSnapshot() }) - it("skips if model is missing", async () => { + it('skips if model is missing', async () => { const source = ` datasource db { provider = "sqlite" diff --git a/nextjs/packages/installer/test/transforms/prisma/add-prisma-model.test.ts b/nextjs/packages/installer/test/transforms/prisma/add-prisma-model.test.ts new file mode 100644 index 0000000000..0e099fcaf6 --- /dev/null +++ b/nextjs/packages/installer/test/transforms/prisma/add-prisma-model.test.ts @@ -0,0 +1,20 @@ +import { addPrismaModel } from '@blitzjs/installer' + +describe('addPrismaModel', () => { + const subject = (source: string) => + addPrismaModel(source, { + type: 'model', + name: 'Project', + properties: [{ type: 'field', name: 'id', fieldType: 'String' }], + }) + + it('creates model', async () => { + const source = ` +datasource db { + provider = "sqlite" + url = "file:./db.sqlite" +}`.trim() + + expect(await subject(source)).toMatchSnapshot() + }) +}) diff --git a/packages/installer/test/transforms/prisma/fixtures/redwood.prisma b/nextjs/packages/installer/test/transforms/prisma/fixtures/redwood.prisma similarity index 100% rename from packages/installer/test/transforms/prisma/fixtures/redwood.prisma rename to nextjs/packages/installer/test/transforms/prisma/fixtures/redwood.prisma diff --git a/packages/installer/test/transforms/prisma/produce-schema.test.ts b/nextjs/packages/installer/test/transforms/prisma/produce-schema.test.ts similarity index 63% rename from packages/installer/test/transforms/prisma/produce-schema.test.ts rename to nextjs/packages/installer/test/transforms/prisma/produce-schema.test.ts index 9b50fa3cef..768ea313ca 100644 --- a/packages/installer/test/transforms/prisma/produce-schema.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/produce-schema.test.ts @@ -1,26 +1,28 @@ -import {produceSchema} from "@blitzjs/installer" -import fs from "fs" -import path from "path" -import {promisify} from "util" +import { produceSchema } from '@blitzjs/installer' +import fs from 'fs' +import path from 'path' +import { promisify } from 'util' const readFile = promisify(fs.readFile) -describe("produceSchema", () => { +describe('produceSchema', () => { const subject = (source: string) => produceSchema(source, () => {}) let originalDatabaseUrl beforeAll(() => { originalDatabaseUrl = process.env.DATABASE_URL - process.env.DATABASE_URL ||= "file:./db.sqlite" + process.env.DATABASE_URL ||= 'file:./db.sqlite' }) afterAll(() => { process.env.DATABASE_URL = originalDatabaseUrl }) - const fixturesDir = path.resolve(__dirname, "./fixtures") + const fixturesDir = path.resolve(__dirname, './fixtures') fs.readdirSync(fixturesDir).forEach((file) => { it(`cleanly parses and serializes schema: [${file}]`, async () => { - const source = await readFile(path.resolve(fixturesDir, file), {encoding: "utf-8"}) + const source = await readFile(path.resolve(fixturesDir, file), { + encoding: 'utf-8', + }) expect(await subject(source)).toMatchSnapshot() }) }) diff --git a/packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts b/nextjs/packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts similarity index 51% rename from packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts rename to nextjs/packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts index f42bf86dc0..8441493ba1 100644 --- a/packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts +++ b/nextjs/packages/installer/test/transforms/prisma/set-prisma-data-source.test.ts @@ -1,21 +1,21 @@ -import {setPrismaDataSource} from "@blitzjs/installer" +import { setPrismaDataSource } from '@blitzjs/installer' -describe("setPrismaDataSource", () => { +describe('setPrismaDataSource', () => { const subject = (source: string) => setPrismaDataSource(source, { - type: "datasource", - name: "db", + type: 'datasource', + name: 'db', assignments: [ - {type: "assignment", key: "provider", value: '"postgresql"'}, + { type: 'assignment', key: 'provider', value: '"postgresql"' }, { - type: "assignment", - key: "url", - value: {type: "function", name: "env", params: ['"DATABASE_URL"']}, + type: 'assignment', + key: 'url', + value: { type: 'function', name: 'env', params: ['"DATABASE_URL"'] }, }, ], }) - it("sets datasource", async () => { + it('sets datasource', async () => { const source = ` // comment up here @@ -29,7 +29,7 @@ datasource db { expect(await subject(source)).toMatchSnapshot() }) - it("adds datasource if missing", async () => { + it('adds datasource if missing', async () => { const source = ` // wow there is no datasource here `.trim() diff --git a/packages/installer/test/transforms/transform-blitz-config.test.ts b/nextjs/packages/installer/test/transforms/transform-blitz-config.test.ts similarity index 50% rename from packages/installer/test/transforms/transform-blitz-config.test.ts rename to nextjs/packages/installer/test/transforms/transform-blitz-config.test.ts index ef005062a4..336934fe1c 100644 --- a/packages/installer/test/transforms/transform-blitz-config.test.ts +++ b/nextjs/packages/installer/test/transforms/transform-blitz-config.test.ts @@ -2,21 +2,23 @@ import { customTsParser, transformBlitzConfig, TransformBlitzConfigCallback, -} from "@blitzjs/installer" -import j from "jscodeshift" -import type {Options as RecastOptions} from "recast" +} from '@blitzjs/installer' +import j from 'jscodeshift' +import type { Options as RecastOptions } from 'recast' const recastOptions: RecastOptions = { tabWidth: 2, arrayBracketSpacing: false, objectCurlySpacing: false, - quote: "single", + quote: 'single', } -const executeTransform = (fileStr: string, transform: TransformBlitzConfigCallback) => - transformBlitzConfig(j(fileStr, {parser: customTsParser}), transform) +const executeTransform = ( + fileStr: string, + transform: TransformBlitzConfigCallback +) => transformBlitzConfig(j(fileStr, { parser: customTsParser }), transform) -describe("transformBlitzConfig finds config", () => { +describe('transformBlitzConfig finds config', () => { const CONFIG = `{testProp: 'found'}` function findConfig(fileStr: string, equalTo = CONFIG): boolean { @@ -32,28 +34,28 @@ describe("transformBlitzConfig finds config", () => { return configStr === equalTo } - it("simple module.exports", () => { + it('simple module.exports', () => { const file = ` module.exports = ${CONFIG} ` expect(findConfig(file)).toBe(true) }) - it("different config object as a control", () => { + it('different config object as a control', () => { const file = ` module.exports = {other: false} ` expect(findConfig(file)).toBe(false) }) - it("simple module.exports", () => { + it('simple module.exports', () => { const file = ` module.exports = ${CONFIG} ` expect(findConfig(file)).toBe(true) }) - it("inside a variable", () => { + it('inside a variable', () => { const file = ` const config = ${CONFIG} @@ -62,21 +64,21 @@ describe("transformBlitzConfig finds config", () => { expect(findConfig(file)).toBe(true) }) - it("with a wrapper", () => { + it('with a wrapper', () => { const file = ` module.exports = withBundleAnalyzer(${CONFIG}) ` expect(findConfig(file)).toBe(true) }) - it("with an empty wrapper", () => { + it('with an empty wrapper', () => { const file = ` module.exports = withBundleAnalyzer() ` expect(findConfig(file)).toBe(false) }) - it("as a variable inside a wrapper", () => { + it('as a variable inside a wrapper', () => { const file = ` const config = ${CONFIG} module.exports = withBundleAnalyzer(config) @@ -84,14 +86,14 @@ describe("transformBlitzConfig finds config", () => { expect(findConfig(file)).toBe(true) }) - it("nested wrapper", () => { + it('nested wrapper', () => { const file = ` module.exports = wrapper(wrapper(wrapper(${CONFIG}))) ` expect(findConfig(file)).toBe(true) }) - it("wrapper inside a variable", () => { + it('wrapper inside a variable', () => { const file = ` const config = wrapper(${CONFIG}) module.exports = config @@ -99,7 +101,7 @@ describe("transformBlitzConfig finds config", () => { expect(findConfig(file)).toBe(true) }) - it("the very worst case", () => { + it('the very worst case', () => { const file = ` const config1 = wrapper( wrapper(${CONFIG}), @@ -112,110 +114,123 @@ describe("transformBlitzConfig finds config", () => { expect(findConfig(file)).toBe(true) }) - it("create empty object on empty function", () => { + it('create empty object on empty function', () => { const file = ` module.exports = withBundleAnalyzer() ` - expect(findConfig(file, "{}")).toBe(true) + expect(findConfig(file, '{}')).toBe(true) }) }) -describe("transformBlitzConfig transform", () => { - it("module.exports", () => { +describe('transformBlitzConfig transform', () => { + it('module.exports', () => { const file = `module.exports = {}` expect( executeTransform(file, (config) => { - config.properties.push(j.objectProperty(j.identifier("test"), j.booleanLiteral(true))) + config.properties.push( + j.objectProperty(j.identifier('test'), j.booleanLiteral(true)) + ) return config - }).toSource(recastOptions), + }).toSource(recastOptions) ).toMatchSnapshot() }) - it("empty file", () => { - const file = "" + it('empty file', () => { + const file = '' - expect(executeTransform(file, (config) => config).toSource(recastOptions)).toMatchSnapshot() + expect( + executeTransform(file, (config) => config).toSource(recastOptions) + ).toMatchSnapshot() }) - it("with wrapper", () => { + it('with wrapper', () => { const file = `module.exports = withBundleAnalyzer({})` - expect(executeTransform(file, (config) => config).toSource(recastOptions)).toMatchSnapshot() + expect( + executeTransform(file, (config) => config).toSource(recastOptions) + ).toMatchSnapshot() }) - it("with empty wrapper", () => { + it('with empty wrapper', () => { const file = `module.exports = withBundleAnalyzer()` - expect(executeTransform(file, (config) => config).toSource(recastOptions)).toMatchSnapshot() + expect( + executeTransform(file, (config) => config).toSource(recastOptions) + ).toMatchSnapshot() }) - it("the config file from examples/auth", () => { + it('the config file from examples/auth', () => { const file = [ 'import {sessionMiddleware, simpleRolesIsAuthorized} from "blitz"', 'import db from "db"', 'const withBundleAnalyzer = require("@next/bundle-analyzer")({', ' enabled: process.env.ANALYZE === "true",', - "})", - "", - "module.exports = withBundleAnalyzer({", - " middleware: [", - " sessionMiddleware({", + '})', + '', + 'module.exports = withBundleAnalyzer({', + ' middleware: [', + ' sessionMiddleware({', ' cookiePrefix: "blitz-auth-example",', - " isAuthorized: simpleRolesIsAuthorized,", - " // sessionExpiryMinutes: 4,", - " getSession: (handle) => db.session.findFirst({where: {handle}}),", - " }),", - " ],", - " cli: {", - " clearConsoleOnBlitzDev: false,", - " },", - " log: {", + ' isAuthorized: simpleRolesIsAuthorized,', + ' // sessionExpiryMinutes: 4,', + ' getSession: (handle) => db.session.findFirst({where: {handle}}),', + ' }),', + ' ],', + ' cli: {', + ' clearConsoleOnBlitzDev: false,', + ' },', + ' log: {', ' // level: "trace",', - " },", - " experimental: {", - " initServer() {", + ' },', + ' experimental: {', + ' initServer() {', ' console.log("Hello world from initServer")', - " },", - " },", - " /*", - " webpack: (config, {buildId, dev, isServer, defaultLoaders, webpack}) => {", - " // Note: we provide webpack above so you should not `require` it", - " // Perform customizations to webpack config", - " // Important: return the modified config", - " return config", - " },", - " webpackDevMiddleware: (config) => {", - " // Perform customizations to webpack dev middleware config", - " // Important: return the modified config", - " return config", - " },", - " */", - "})", - ].join("\n") + ' },', + ' },', + ' /*', + ' webpack: (config, {buildId, dev, isServer, defaultLoaders, webpack}) => {', + ' // Note: we provide webpack above so you should not `require` it', + ' // Perform customizations to webpack config', + ' // Important: return the modified config', + ' return config', + ' },', + ' webpackDevMiddleware: (config) => {', + ' // Perform customizations to webpack dev middleware config', + ' // Important: return the modified config', + ' return config', + ' },', + ' */', + '})', + ].join('\n') expect( executeTransform(file, (config) => { const cliValue = j.objectExpression([ - j.objectProperty(j.identifier("clearConsoleOnBlitzDev"), j.booleanLiteral(true)), + j.objectProperty( + j.identifier('clearConsoleOnBlitzDev'), + j.booleanLiteral(true) + ), ]) const cliProp = config.properties.find( (value) => - value.type === "ObjectProperty" && - value.key.type === "Identifier" && - value.key.name === "cli", + value.type === 'ObjectProperty' && + value.key.type === 'Identifier' && + value.key.name === 'cli' ) as j.ObjectProperty | undefined if (!cliProp) { - config.properties.push(j.objectProperty(j.identifier("cli"), cliValue)) + config.properties.push( + j.objectProperty(j.identifier('cli'), cliValue) + ) return config } cliProp.value = cliValue return config - }).toSource(recastOptions), + }).toSource(recastOptions) ).toMatchSnapshot() }) }) diff --git a/nextjs/packages/installer/test/transforms/update-babel-config.test.ts b/nextjs/packages/installer/test/transforms/update-babel-config.test.ts new file mode 100644 index 0000000000..cd98548604 --- /dev/null +++ b/nextjs/packages/installer/test/transforms/update-babel-config.test.ts @@ -0,0 +1,96 @@ +import { + addBabelPlugin, + addBabelPreset, + customTsParser, +} from '@blitzjs/installer' +import j from 'jscodeshift' + +function executeBabelPlugin( + fileStr: string, + plugin: string | [string, Object] +): string { + return addBabelPlugin( + j(fileStr, { parser: customTsParser }), + plugin + ).toSource() +} + +function executeBabelPreset( + fileStr: string, + plugin: string | [string, Object] +): string { + return addBabelPreset( + j(fileStr, { parser: customTsParser }), + plugin + ).toSource() +} + +describe('addBabelPlugin transform', () => { + it('adds babel plugin literal', () => { + const source = `module.exports = { + presets: ["@babel/preset-typescript"], + plugins: [], + }` + + expect(executeBabelPlugin(source, '@emotion')).toMatchSnapshot() + }) + + it('adds babel plugin array', () => { + const source = `module.exports = { + presets: ["@babel/preset-typescript"], + plugins: [], + }` + + expect( + executeBabelPlugin(source, [ + '@babel/plugin-proposal-decorators', + { legacy: true }, + ]) + ).toMatchSnapshot() + }) + + it('avoid duplicated', () => { + const source = `module.exports = { + presets: ["@babel/preset-typescript"], + plugins: ["@babel/plugin-proposal-decorators"], + }` + + expect( + executeBabelPlugin(source, [ + '@babel/plugin-proposal-decorators', + { legacy: true }, + ]) + ).toMatchSnapshot() + }) +}) + +describe('addBabelPreset transform', () => { + it('adds babel preset literal', () => { + const source = `module.exports = { + presets: ["@babel/preset-typescript"], + plugins: [], + }` + + expect(executeBabelPreset(source, 'blitz/babel')).toMatchSnapshot() + }) + + it('adds babel preset array', () => { + const source = `module.exports = { + presets: ["@babel/preset-typescript"], + plugins: [], + }` + + expect( + executeBabelPreset(source, ['blitz/babel', { legacy: true }]) + ).toMatchSnapshot() + }) + + it('avoid duplicated', () => { + const source = `module.exports = { + presets: [["blitz/babel", {legacy: true}]], + plugins: [], + }` + + expect(executeBabelPreset(source, 'blitz/babel')).toMatchSnapshot() + }) +}) diff --git a/nextjs/packages/installer/test/utils/paths.test.ts b/nextjs/packages/installer/test/utils/paths.test.ts new file mode 100644 index 0000000000..d913e24391 --- /dev/null +++ b/nextjs/packages/installer/test/utils/paths.test.ts @@ -0,0 +1,28 @@ +import { paths } from '@blitzjs/installer' +import * as fs from 'fs-extra' + +jest.mock('fs-extra') + +const testIfNotWindows = process.platform === 'win32' ? test.skip : test + +describe('path utils', () => { + it('returns proper file paths in a TS project', () => { + fs.existsSync.mockReturnValue(true) + expect(paths.document()).toBe('app/pages/_document.tsx') + expect(paths.app()).toBe('app/pages/_app.tsx') + expect(paths.entry()).toBe('app/pages/index.tsx') + // Blitz and Babel configs are always JS, we shouldn't transform this extension + expect(paths.blitzConfig()).toBe('blitz.config.ts') + expect(paths.babelConfig()).toBe('babel.config.js') + }) + + // SKIP test because the fs mock is failing on windows + testIfNotWindows('returns proper file paths in a JS project', () => { + fs.existsSync.mockReturnValue(false) + expect(paths.document()).toBe('app/pages/_document.js') + expect(paths.app()).toBe('app/pages/_app.js') + expect(paths.entry()).toBe('app/pages/index.js') + expect(paths.blitzConfig()).toBe('blitz.config.js') + expect(paths.babelConfig()).toBe('babel.config.js') + }) +}) diff --git a/packages/installer/types/index.d.ts b/nextjs/packages/installer/types/index.d.ts similarity index 100% rename from packages/installer/types/index.d.ts rename to nextjs/packages/installer/types/index.d.ts diff --git a/nextjs/packages/next-codemod/jest.config.js b/nextjs/packages/next-codemod/jest.config.js new file mode 100644 index 0000000000..a1d97949ab --- /dev/null +++ b/nextjs/packages/next-codemod/jest.config.js @@ -0,0 +1,3 @@ +module.exports = { + preset: '../../../jest-unit.config.js', +} diff --git a/nextjs/packages/next-codemod/jest.setup.js b/nextjs/packages/next-codemod/jest.setup.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nextjs/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter/using-inline-class.input.js b/nextjs/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter/using-inline-class.input.js index a401330d0c..2886da4127 100644 --- a/nextjs/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter/using-inline-class.input.js +++ b/nextjs/packages/next-codemod/transforms/__testfixtures__/url-to-withrouter/using-inline-class.input.js @@ -1,5 +1,5 @@ -export default (class extends React.Component { +export default class extends React.Component { render() { const test = this.props.url } -}) +} diff --git a/nextjs/yarn.lock b/nextjs/yarn.lock index 7bcd86c609..d2cbfc7d26 100644 --- a/nextjs/yarn.lock +++ b/nextjs/yarn.lock @@ -74,6 +74,13 @@ dependencies: "@babel/highlight" "^7.14.5" +"@babel/code-frame@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" + integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== + dependencies: + "@babel/highlight" "^7.16.0" + "@babel/compat-data@^7.12.5", "@babel/compat-data@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" @@ -84,6 +91,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.5.tgz#8ef4c18e58e801c5c95d3c1c0f2874a2680fadea" integrity sha512-kixrYn4JwfAVPa0f2yfzc2AWti6WRRyO3XjWW5PJAvtE11qhSayrrcrEnee05KAtNaPC+EwehE8Qt1UedEVB8w== +"@babel/compat-data@^7.16.0": + version "7.16.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" + integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== + "@babel/core@7.12.10", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.10", "@babel/core@^7.7.5": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" @@ -126,6 +138,27 @@ semver "^6.3.0" source-map "^0.5.0" +"@babel/core@^7.13.16": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" + integrity sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/generator" "^7.16.0" + "@babel/helper-compilation-targets" "^7.16.0" + "@babel/helper-module-transforms" "^7.16.0" + "@babel/helpers" "^7.16.0" + "@babel/parser" "^7.16.0" + "@babel/template" "^7.16.0" + "@babel/traverse" "^7.16.0" + "@babel/types" "^7.16.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + "@babel/eslint-parser@7.13.14": version "7.13.14" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.13.14.tgz#f80fd23bdd839537221914cb5d17720a5ea6ba3a" @@ -162,6 +195,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.0.tgz#d40f3d1d5075e62d3500bccb67f3daa8a95265b2" + integrity sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew== + dependencies: + "@babel/types" "^7.16.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" @@ -176,6 +218,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-annotate-as-pure@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz#9a1f0ebcda53d9a2d00108c4ceace6a5d5f1f08d" + integrity sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" @@ -212,6 +261,16 @@ browserslist "^4.16.6" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.16.0": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz#5b480cd13f68363df6ec4dc8ac8e2da11363cbf0" + integrity sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA== + dependencies: + "@babel/compat-data" "^7.16.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.17.5" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" @@ -235,6 +294,18 @@ "@babel/helper-replace-supers" "^7.14.5" "@babel/helper-split-export-declaration" "^7.14.5" +"@babel/helper-create-class-features-plugin@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz#090d4d166b342a03a9fec37ef4fd5aeb9c7c6a4b" + integrity sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.0" + "@babel/helper-function-name" "^7.16.0" + "@babel/helper-member-expression-to-functions" "^7.16.0" + "@babel/helper-optimise-call-expression" "^7.16.0" + "@babel/helper-replace-supers" "^7.16.0" + "@babel/helper-split-export-declaration" "^7.16.0" + "@babel/helper-create-regexp-features-plugin@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz#18b1302d4677f9dc4740fe8c9ed96680e29d37e8" @@ -317,6 +388,15 @@ "@babel/template" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-function-name@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481" + integrity sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog== + dependencies: + "@babel/helper-get-function-arity" "^7.16.0" + "@babel/template" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/helper-get-function-arity@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" @@ -338,6 +418,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-get-function-arity@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa" + integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" @@ -352,6 +439,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-hoist-variables@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz#4c9023c2f1def7e28ff46fc1dbcd36a39beaa81a" + integrity sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-member-expression-to-functions@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz#fba0f2fcff3fba00e6ecb664bb5e6e26e2d6165c" @@ -366,6 +460,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-member-expression-to-functions@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz#29287040efd197c77636ef75188e81da8bccd5a4" + integrity sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" @@ -380,6 +481,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-module-imports@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3" + integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-module-transforms@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" @@ -409,6 +517,20 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-module-transforms@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz#1c82a8dd4cb34577502ebd2909699b194c3e9bb5" + integrity sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA== + dependencies: + "@babel/helper-module-imports" "^7.16.0" + "@babel/helper-replace-supers" "^7.16.0" + "@babel/helper-simple-access" "^7.16.0" + "@babel/helper-split-export-declaration" "^7.16.0" + "@babel/helper-validator-identifier" "^7.15.7" + "@babel/template" "^7.16.0" + "@babel/traverse" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/helper-optimise-call-expression@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" @@ -423,6 +545,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-optimise-call-expression@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz#cecdb145d70c54096b1564f8e9f10cd7d193b338" + integrity sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" @@ -483,6 +612,16 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-replace-supers@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz#73055e8d3cf9bcba8ddb55cad93fedc860f68f17" + integrity sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.16.0" + "@babel/helper-optimise-call-expression" "^7.16.0" + "@babel/traverse" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/helper-simple-access@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" @@ -497,6 +636,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-simple-access@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz#21d6a27620e383e37534cf6c10bba019a6f90517" + integrity sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" @@ -511,6 +657,13 @@ dependencies: "@babel/types" "^7.14.5" +"@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" + integrity sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" @@ -532,6 +685,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-split-export-declaration@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438" + integrity sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" @@ -547,6 +707,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== +"@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== + "@babel/helper-validator-option@^7.12.1", "@babel/helper-validator-option@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" @@ -595,6 +760,15 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helpers@^7.16.0": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.3.tgz#27fc64f40b996e7074dc73128c3e5c3e7f55c43c" + integrity sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w== + dependencies: + "@babel/template" "^7.16.0" + "@babel/traverse" "^7.16.3" + "@babel/types" "^7.16.0" + "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -622,6 +796,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.0.tgz#6ceb32b2ca4b8f5f361fb7fd821e3fddf4a1725a" + integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.3.3": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" @@ -632,6 +815,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.11.tgz#f93ebfc99d21c1772afbbaa153f47e7ce2f50b88" integrity sha512-PhuoqeHoO9fc4ffMEVk4qb/w/s2iOSWohvbHxLtxui0eBg3Lg5gN1U8wp1V1u61hOWkPQJJyJzGH6Y+grwkq8Q== +"@babel/parser@^7.13.16", "@babel/parser@^7.16.0", "@babel/parser@^7.16.3": + version "7.16.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e" + integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng== + "@babel/parser@^7.14.5", "@babel/parser@^7.14.6": version "7.14.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2" @@ -672,6 +860,14 @@ "@babel/helper-create-class-features-plugin" "^7.12.1" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-proposal-class-properties@^7.13.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz#c029618267ddebc7280fa286e0f8ca2a278a2d1a" + integrity sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-proposal-class-properties@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz#40d1ee140c5b1e31a350f4f5eed945096559b42e" @@ -761,6 +957,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" +"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.0.tgz#44e1cce08fe2427482cf446a91bb451528ed0596" + integrity sha512-3bnHA8CAFm7cG93v8loghDYyQ8r97Qydf63BeYiGgYbjKKB/XP53W15wfRC7dvKfoiJ34f6Rbyyx2btExc8XsQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz#ee38589ce00e2cc59b299ec3ea406fcd3a0fdaf6" @@ -830,6 +1034,15 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" "@babel/plugin-syntax-optional-chaining" "^7.8.0" +"@babel/plugin-proposal-optional-chaining@^7.13.12": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz#56dbc3970825683608e9efb55ea82c2a2d6c8dc0" + integrity sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-optional-chaining@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz#fa83651e60a360e3f13797eef00b8d519695b603" @@ -934,6 +1147,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-flow@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.0.tgz#07427021d093ed77019408221beaf0272bbcfaec" + integrity sha512-dH91yCo0RyqfzWgoM5Ji9ir8fQ+uFbt9KHM3d2x4jZOuHS6wNA+CRmRUP/BWCsHG2bjc7A2Way6AvH1eQk0wig== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" @@ -1034,6 +1254,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-typescript@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz#2feeb13d9334cc582ea9111d3506f773174179bb" + integrity sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-typescript@^7.7.2": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" @@ -1210,6 +1437,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-flow" "^7.12.1" +"@babel/plugin-transform-flow-strip-types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.0.tgz#edd968dc2041c1b69e451a262e948d6654a79dc2" + integrity sha512-vs/F5roOaO/+WxKfp9PkvLsAyj0G+Q0zbFimHm9X2KDgabN2XmNFoAafmeGEYspUlIF9+MvVmyek9UyHiqeG/w== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-flow" "^7.16.0" + "@babel/plugin-transform-for-of@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa" @@ -1296,6 +1531,16 @@ "@babel/helper-simple-access" "^7.12.1" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-commonjs@^7.13.8": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz#add58e638c8ddc4875bd9a9ecb5c594613f6c922" + integrity sha512-Dzi+NWqyEotgzk/sb7kgQPJQf7AJkQBWsVp1N6JWc1lBVo0vkElUnGdr1PzUBmfsCCN5OOFya3RtpeHk15oLKQ== + dependencies: + "@babel/helper-module-transforms" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-simple-access" "^7.16.0" + babel-plugin-dynamic-import-node "^2.3.3" + "@babel/plugin-transform-modules-commonjs@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97" @@ -1598,7 +1843,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-typescript@^7.12.1": +"@babel/plugin-transform-typescript@7.12.1", "@babel/plugin-transform-typescript@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz#d92cc0af504d510e26a754a7dbc2e5c8cd9c7ab4" integrity sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw== @@ -1607,6 +1852,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-typescript" "^7.12.1" +"@babel/plugin-transform-typescript@^7.16.0": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.1.tgz#cc0670b2822b0338355bc1b3d2246a42b8166409" + integrity sha512-NO4XoryBng06jjw/qWEU2LhcLJr1tWkhpMam/H4eas/CDKMX/b2/Ylb6EI256Y7+FVPCawwSM1rrJNOpDiz+Lg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-typescript" "^7.16.0" + "@babel/plugin-transform-unicode-escapes@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709" @@ -1796,6 +2050,15 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-transform-flow-strip-types" "^7.12.1" +"@babel/preset-flow@^7.13.13": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.16.0.tgz#9f1f6e72714d79460d48058cb5658fc87da7150b" + integrity sha512-e5NE1EoPMpoHFkyFkMSj2h9tu7OolARcUHki8mnBv4NiFK9so+UrhbvT9mV99tMJOUEx8BOj67T6dXvGcTeYeQ== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-flow-strip-types" "^7.16.0" + "@babel/preset-modules@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" @@ -1849,6 +2112,15 @@ "@babel/helper-validator-option" "^7.12.1" "@babel/plugin-transform-typescript" "^7.12.1" +"@babel/preset-typescript@^7.13.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.0.tgz#b0b4f105b855fb3d631ec036cdc9d1ffd1fa5eac" + integrity sha512-txegdrZYgO9DlPbv+9QOVpMnKbOtezsLHWsnsRF4AjbSIsVaujrq1qg8HK0mxQpWv0jnejt0yEoW1uWpvbrDTg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-typescript" "^7.16.0" + "@babel/register@^7.0.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.10.5.tgz#354f3574895f1307f79efe37a51525e52fd38d89" @@ -1860,6 +2132,17 @@ pirates "^4.0.0" source-map-support "^0.5.16" +"@babel/register@^7.13.16": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.16.0.tgz#f5d2aa14df37cf7146b9759f7c53818360f24ec6" + integrity sha512-lzl4yfs0zVXnooeLE0AAfYaT7F3SPA8yB2Bj4W1BiZwLbMS3MZH35ZvCWSRHvneUugwuM+Wsnrj7h0F7UmU3NQ== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + "@babel/runtime-corejs3@^7.10.2": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.12.13.tgz#53d09813b7c20d616caf258e9325550ff701c039" @@ -1923,6 +2206,15 @@ "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/template@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6" + integrity sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/parser" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.4.5": version "7.12.12" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" @@ -1953,6 +2245,21 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.16.0", "@babel/traverse@^7.16.3": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.3.tgz#f63e8a938cc1b780f66d9ed3c54f532ca2d14787" + integrity sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/generator" "^7.16.0" + "@babel/helper-function-name" "^7.16.0" + "@babel/helper-hoist-variables" "^7.16.0" + "@babel/helper-split-export-declaration" "^7.16.0" + "@babel/parser" "^7.16.3" + "@babel/types" "^7.16.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@^7.7.2": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc" @@ -2002,11 +2309,66 @@ "@babel/helper-validator-identifier" "^7.14.5" to-fast-properties "^2.0.0" +"@babel/types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" + integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + 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" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@blitzjs/generator@0.44.3": + version "0.44.3" + resolved "https://registry.yarnpkg.com/@blitzjs/generator/-/generator-0.44.3.tgz#53100bf670bfd54c7362f77e72cbe500bd2a9a19" + integrity sha512-whqQBL1RpQPXSGDQVNXMA/yfmBT4DxoaariydtAWVp0aZkxNEepXjp5YT6v2cGIYPo/k0nwddYGt7j/0vXB6yA== + dependencies: + "@babel/core" "7.12.10" + "@babel/plugin-transform-typescript" "7.12.1" + "@blitzjs/server" "0.44.3" + "@mrleebo/prisma-ast" "0.2.4" + "@types/jscodeshift" "0.11.2" + chalk "^4.1.0" + cross-spawn "7.0.3" + diff "5.0.0" + enquirer "2.3.6" + fs-extra "^9.1.0" + got "^11.8.1" + jscodeshift "0.13.0" + mem-fs "1.2.0" + mem-fs-editor "8.0.0" + npm-which "^3.0.1" + pluralize "^8.0.0" + recast "0.20.5" + username "^5.1.0" + vinyl "2.2.1" + +"@blitzjs/server@0.44.3": + version "0.44.3" + resolved "https://registry.yarnpkg.com/@blitzjs/server/-/server-0.44.3.tgz#626808b0fb8b8547ffab9f86a3243f0134ce1ca9" + integrity sha512-veTjPwbSLzteUugQFFHYgXY/o7Mht622U5c9gtLPuTffJ74YSzqEe+mpOeXXaj5RNJXoBJKG3JlDaJzSF3iR8A== + dependencies: + cross-spawn "7.0.3" + detect-port "1.3.0" + esbuild "^0.11.12" + fs-extra "^9.1.0" + pkg-dir "^5.0.0" + resolve-cwd "3.0.0" + +"@chevrotain/types@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@chevrotain/types/-/types-9.1.0.tgz#689f2952be5ad9459dae3c8e9209c0f4ec3c5ec4" + integrity sha512-3hbCD1CThkv9gnaSIPq0GUXwKni68e0ph6jIHwCvcWiQ4JB2xi8bFxBain0RF04qHUWuDjgnZLj4rLgimuGO+g== + +"@chevrotain/utils@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@chevrotain/utils/-/utils-9.1.0.tgz#a34ab0696f9491dee934e848984517d226356f21" + integrity sha512-llLJZ8OAlZrjGlBvamm6Zdo/HmGAcCLq5gx7cSwUX8No+n/8ip+oaC4x33IdZIif8+Rh5dQUIZXmfbSghiOmNQ== + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -3233,6 +3595,20 @@ version "0.18.0" resolved "https://registry.yarnpkg.com/@mdx-js/tag/-/tag-0.18.0.tgz#386d687deaed7133699a420d74612acdd1ed1c26" +"@mrleebo/prisma-ast@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@mrleebo/prisma-ast/-/prisma-ast-0.2.4.tgz#93a413e8db03b360ebe8aa315cdb5984420f466b" + integrity sha512-0hjx2e8EVbpa7R8oxs+Y6L4FYxu82H2BxEoogHKoZUo0qQ6vLxy9I4mcrlfhfCR5EbOYOROQhUjH6ShPPQqRrg== + dependencies: + chevrotain "^9.0.1" + +"@mrleebo/prisma-ast@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@mrleebo/prisma-ast/-/prisma-ast-0.2.6.tgz#654129c51fd0bcde4ab9be687e373bf8c3dd5a59" + integrity sha512-Df0gAGmws3sxNMmLviTarBL9znf84QVlVhlx4EPgArrnaVBy8tNQZAI9aSTJHzH0JGj9BVGa0Qz1g3hPt12Kxw== + dependencies: + chevrotain "^9.0.1" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -3607,6 +3983,118 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71" integrity sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA== +"@prisma/debug@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-2.19.0.tgz#5d9c6b9deb0d5214360ee23644c4e40bee0f251d" + integrity sha512-rCFF69WVC2G8x89UaIf786m+Ik1CcEq8XiJ10kIHezOECJQRZAHVjuCXrCnHa9Z1D5r8xaSw6/SuCAmr0Fuedg== + dependencies: + debug "4.3.2" + ms "^2.1.3" + +"@prisma/engine-core@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/engine-core/-/engine-core-2.19.0.tgz#89172fc048b4a02aa1062f81c2292697d95fdbe5" + integrity sha512-utcC150Rf1yWgLptVArTLis2beQBs4ce3lq5IApKdM6+U/5CDaF4pVCriHbyMcYqeeKMgf5SdFh1t1RJIbCsNQ== + dependencies: + "@prisma/debug" "2.19.0" + "@prisma/engines" "2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d" + "@prisma/generator-helper" "2.19.0" + "@prisma/get-platform" "2.19.0" + chalk "^4.0.0" + execa "^5.0.0" + get-stream "^6.0.0" + indent-string "^4.0.0" + new-github-issue-url "^0.2.1" + p-retry "^4.2.0" + terminal-link "^2.1.1" + undici "3.3.3" + +"@prisma/engines@2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d": + version "2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d.tgz#db2809a6f7f18584e3ca89b1f5bad884155629ec" + integrity sha512-rEWpaG7wZvPuWJC5SwkBB/Iwue//oC5yv58Mse7r+ibtgkA7vGdWc1bFDQ32DT9tDL5WSC6bBwqEASGV/1Gm1Q== + +"@prisma/fetch-engine@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-2.19.0.tgz#a01ebfc184ab09cc0ed9d6d4ef966c3846fb5332" + integrity sha512-Hc0OhvzWoGFQnsApGH//LSHdQggXIys/U1VQQpjOPowe5l1PQZBV/drHLrDo8jxkmQfTTFvSxcOeflkky2Bj0g== + dependencies: + "@prisma/debug" "2.19.0" + "@prisma/get-platform" "2.19.0" + chalk "^4.0.0" + execa "^5.0.0" + find-cache-dir "^3.3.1" + hasha "^5.2.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + make-dir "^3.0.2" + node-fetch "^2.6.0" + p-filter "^2.1.0" + p-map "^4.0.0" + p-retry "^4.2.0" + progress "^2.0.3" + rimraf "^3.0.2" + temp-dir "^2.0.0" + tempy "^1.0.0" + +"@prisma/generator-helper@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/generator-helper/-/generator-helper-2.19.0.tgz#452ef6f47bf47d4df8cca79c0aff52160b0a7dc0" + integrity sha512-ZMTLyzPiqx7CETwZuo7DBlwLeckT3no3DbWN0r6iEGEyeOgOpoXhlL/ka3Payprc3j4MJ08M8MoI80biw/vdJw== + dependencies: + "@prisma/debug" "2.19.0" + "@types/cross-spawn" "^6.0.1" + chalk "^4.0.0" + cross-spawn "^7.0.2" + +"@prisma/get-platform@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-2.19.0.tgz#1cf1fc975c28351cd50602c74f5f6532ca72bac5" + integrity sha512-tAv4BzJDxDDEdsU1mADdP0PKLVf8zbU9WI6nTDNSIhZsnVyBjMSWsHYnuoCgP94JtbnJ2gUSY35qJBvjLsl3kA== + dependencies: + "@prisma/debug" "2.19.0" + +"@prisma/sdk@2.19.0": + version "2.19.0" + resolved "https://registry.yarnpkg.com/@prisma/sdk/-/sdk-2.19.0.tgz#e871a4d34df64931fbdeb71613e6c10c6dc3bcc5" + integrity sha512-OeyinhRTWdcekIxpcfaGlXNADXukb80CWM9ok84rV8lh0q+++N3P8aiEvW85JAE5eMr5eTwlkzYlVDmfs17dRQ== + dependencies: + "@prisma/debug" "2.19.0" + "@prisma/engine-core" "2.19.0" + "@prisma/engines" "2.19.0-39.c1455d0b443d66b0d9db9bcb1bb9ee0d5bbc511d" + "@prisma/fetch-engine" "2.19.0" + "@prisma/generator-helper" "2.19.0" + "@prisma/get-platform" "2.19.0" + "@timsuchanek/copy" "^1.4.5" + archiver "^4.0.0" + arg "^5.0.0" + chalk "4.1.0" + checkpoint-client "1.1.19" + cli-truncate "^2.1.0" + dotenv "^8.2.0" + execa "^5.0.0" + find-up "5.0.0" + global-dirs "^3.0.0" + globby "^11.0.0" + has-yarn "^2.1.0" + is-ci "^3.0.0" + make-dir "^3.0.2" + node-fetch "2.6.1" + p-map "^4.0.0" + read-pkg-up "^7.0.1" + resolve-pkg "^2.0.0" + rimraf "^3.0.2" + string-width "^4.2.0" + strip-ansi "6.0.0" + strip-indent "3.0.0" + tar "^6.0.1" + temp-dir "^2.0.0" + temp-write "^4.0.0" + tempy "^1.0.0" + terminal-link "^2.1.1" + tmp "0.2.1" + url-parse "^1.4.7" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -3720,6 +4208,11 @@ version "2.1.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-2.1.0.tgz#6ad4ca610f696098e92954ab431ff83bea0ce13f" +"@sindresorhus/is@^4.0.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.0.tgz#667bfc6186ae7c9e0b45a08960c551437176e1ca" + integrity sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw== + "@sinonjs/commons@^1.7.0": version "1.7.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.2.tgz#505f55c74e0272b43f6c52d81946bed7058fc0e2" @@ -3929,6 +4422,13 @@ dependencies: defer-to-connect "^2.0.0" +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + "@taskr/clear@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@taskr/clear/-/clear-1.1.0.tgz#0a88d180bed2f91f310136375a72c00b50834fd1" @@ -3971,6 +4471,21 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" +"@timsuchanek/copy@^1.4.5": + version "1.4.5" + resolved "https://registry.yarnpkg.com/@timsuchanek/copy/-/copy-1.4.5.tgz#8e9658c056e24e1928a88bed45f9eac6a72b7c40" + integrity sha512-N4+2/DvfwzQqHYL/scq07fv8yXbZc6RyUxKJoE8Clm14JpLOf9yNI4VB4D6RsV3h9zgzZ4loJUydHKM7pp3blw== + dependencies: + "@timsuchanek/sleep-promise" "^8.0.1" + commander "^2.19.0" + mkdirp "^1.0.4" + prettysize "^2.0.0" + +"@timsuchanek/sleep-promise@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@timsuchanek/sleep-promise/-/sleep-promise-8.0.1.tgz#81c0754b345138a519b51c2059771eb5f9b97818" + integrity sha512-cxHYbrXfnCWsklydIHSw5GCMHUPqpJ/enxWSyVHNOgNe61sit/+aOXTTI+VOdWkvVaJsI2vsB9N4+YDNITawOQ== + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -4133,7 +4648,7 @@ version "0.3.3" resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803" -"@types/cross-spawn@6.0.2": +"@types/cross-spawn@6.0.2", "@types/cross-spawn@^6.0.1": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.2.tgz#168309de311cd30a2b8ae720de6475c2fbf33ac7" integrity sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw== @@ -4284,6 +4799,14 @@ ast-types "^0.14.1" recast "^0.20.3" +"@types/jscodeshift@0.11.2": + version "0.11.2" + resolved "https://registry.yarnpkg.com/@types/jscodeshift/-/jscodeshift-0.11.2.tgz#cbad968d5bf6055529531364e57be119563e9685" + integrity sha512-CwgUni90VW+H3xc9Hekz/+ShEKPTvYbgVsDWCV4YksKoTKrWu9qfPpNaf7VDvbwjRp+PlkBJ7wZJNDpILzRiRw== + dependencies: + ast-types "^0.14.1" + recast "^0.20.3" + "@types/json-schema@*": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" @@ -4294,6 +4817,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== +"@types/json-schema@^7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -4487,7 +5015,7 @@ dependencies: "@types/node" "*" -"@types/responselike@*": +"@types/responselike@*", "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" dependencies: @@ -4498,6 +5026,11 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/retry@^0.12.0": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065" + integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== + "@types/rimraf@3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.0.tgz#b9d03f090ece263671898d57bb7bb007023ac19f" @@ -4627,31 +5160,36 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.20.0.tgz#9d8794bd99aad9153092ad13c96164e3082e9a92" - integrity sha512-sw+3HO5aehYqn5w177z2D82ZQlqHCwcKSMboueo7oE4KU9QiC0SAgfS/D4z9xXvpTc8Bt41Raa9fBR8T2tIhoQ== +"@types/yoga-layout@1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@types/yoga-layout/-/yoga-layout-1.9.2.tgz#efaf9e991a7390dc081a0b679185979a83a9639a" + integrity sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw== + +"@typescript-eslint/eslint-plugin@^5.5.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.6.0.tgz#efd8668b3d6627c46ce722c2afe813928fe120a0" + integrity sha512-MIbeMy5qfLqtgs1hWd088k1hOuRsN9JrHUPwVVKCD99EOUqScd7SrwoZl4Gso05EAP9w1kvLWUVGJOVpRPkDPA== dependencies: - "@typescript-eslint/experimental-utils" "4.20.0" - "@typescript-eslint/scope-manager" "4.20.0" - debug "^4.1.1" + "@typescript-eslint/experimental-utils" "5.6.0" + "@typescript-eslint/scope-manager" "5.6.0" + debug "^4.3.2" functional-red-black-tree "^1.0.1" - lodash "^4.17.15" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz#a8ab2d7b61924f99042b7d77372996d5f41dc44b" - integrity sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng== +"@typescript-eslint/experimental-utils@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.6.0.tgz#f3a5960f2004abdcac7bb81412bafc1560841c23" + integrity sha512-VDoRf3Qj7+W3sS/ZBXZh3LBzp0snDLEgvp6qj0vOAIiAPM07bd5ojQ3CTzF/QFl5AKh7Bh1ycgj6lFBJHUt/DA== dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.20.0" - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/typescript-estree" "4.20.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.6.0" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/typescript-estree" "5.6.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" "@typescript-eslint/experimental-utils@^2.5.0": version "2.34.0" @@ -4663,41 +5201,28 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.20.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.0.tgz#e1637327fcf796c641fe55f73530e90b16ac8fe8" - integrity sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q== - dependencies: - "@typescript-eslint/scope-manager" "4.22.0" - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/typescript-estree" "4.22.0" - debug "^4.1.1" - -"@typescript-eslint/scope-manager@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca" - integrity sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ== +"@typescript-eslint/parser@^5.5.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.6.0.tgz#11677324659641400d653253c03dcfbed468d199" + integrity sha512-YVK49NgdUPQ8SpCZaOpiq1kLkYRPMv9U5gcMrywzI8brtwZjr/tG3sZpuHyODt76W/A0SufNjYt9ZOgrC4tLIQ== dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" + "@typescript-eslint/scope-manager" "5.6.0" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/typescript-estree" "5.6.0" + debug "^4.3.2" -"@typescript-eslint/scope-manager@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz#ed411545e61161a8d702e703a4b7d96ec065b09a" - integrity sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q== +"@typescript-eslint/scope-manager@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.6.0.tgz#9dd7f007dc8f3a34cdff6f79f5eaab27ae05157e" + integrity sha512-1U1G77Hw2jsGWVsO2w6eVCbOg0HZ5WxL/cozVSTfqnL/eB9muhb8THsP0G3w+BB5xAHv9KptwdfYFAUfzcIh4A== dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" - -"@typescript-eslint/types@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225" - integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w== + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/visitor-keys" "5.6.0" -"@typescript-eslint/types@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" - integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== +"@typescript-eslint/types@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.6.0.tgz#745cb1b59daadcc1f32f7be95f0f68accf38afdd" + integrity sha512-OIZffked7mXv4mXzWU5MgAEbCf9ecNJBKi+Si6/I9PpTaj+cf2x58h2oHW5/P/yTnPkKaayfjhLvx+crnl5ubA== "@typescript-eslint/typescript-estree@2.34.0": version "2.34.0" @@ -4712,47 +5237,26 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be" - integrity sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA== - dependencies: - "@typescript-eslint/types" "4.20.0" - "@typescript-eslint/visitor-keys" "4.20.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/typescript-estree@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" - integrity sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg== - dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/visitor-keys@4.20.0": - version "4.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62" - integrity sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A== - dependencies: - "@typescript-eslint/types" "4.20.0" - eslint-visitor-keys "^2.0.0" - -"@typescript-eslint/visitor-keys@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" - integrity sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw== +"@typescript-eslint/typescript-estree@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.6.0.tgz#dfbb19c9307fdd81bd9c650c67e8397821d7faf0" + integrity sha512-92vK5tQaE81rK7fOmuWMrSQtK1IMonESR+RJR2Tlc7w4o0MeEdjgidY/uO2Gobh7z4Q1hhS94Cr7r021fMVEeA== + dependencies: + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/visitor-keys" "5.6.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.6.0.tgz#3e36509e103fe9713d8f035ac977235fd63cb6e6" + integrity sha512-1p7hDp5cpRFUyE3+lvA74egs+RWSgumrBpzBCDzfTFv0aQ7lIeay80yU0hIxgAhwQ6PcasW35kaOCyDOv6O/Ng== dependencies: - "@typescript-eslint/types" "4.22.0" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "5.6.0" + eslint-visitor-keys "^3.0.0" "@vercel/fetch-cached-dns@^2.0.2": version "2.0.2" @@ -5175,6 +5679,11 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= +address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + adjust-sourcemap-loader@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/adjust-sourcemap-loader/-/adjust-sourcemap-loader-3.0.0.tgz#5ae12fb5b7b1c585e80bbb5a63ec163a1a45e61e" @@ -5342,6 +5851,18 @@ ansi-regex@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-split@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ansi-split/-/ansi-split-1.0.1.tgz#3cab03754ab6f1d64d4ad13cd10f22fc36db4a45" + integrity sha512-RRxQym4DFtDNmHIkW6aeFVvrXURb11lGAEPXNiryjCe8bK8RsANjzJ0M2aGOkvBYwP4Bl/xZ8ijtr6D3j1x/eg== + dependencies: + ansi-regex "^3.0.0" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -5393,6 +5914,35 @@ aproba@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" +archiver-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" + integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== + dependencies: + glob "^7.1.4" + graceful-fs "^4.2.0" + lazystream "^1.0.0" + lodash.defaults "^4.2.0" + lodash.difference "^4.5.0" + lodash.flatten "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.union "^4.6.0" + normalize-path "^3.0.0" + readable-stream "^2.0.0" + +archiver@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-4.0.2.tgz#43c72865eadb4ddaaa2fb74852527b6a450d927c" + integrity sha512-B9IZjlGwaxF33UN4oPbfBkyA4V1SxNLeIhR1qY8sRXSsbdUkEHrrOvwlYFPx+8uQeCe9M+FG6KgO+imDmQ79CQ== + dependencies: + archiver-utils "^2.1.0" + async "^3.2.0" + buffer-crc32 "^0.2.1" + glob "^7.1.6" + readable-stream "^3.6.0" + tar-stream "^2.1.2" + zip-stream "^3.0.1" + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -5404,6 +5954,11 @@ arg@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.0.tgz#583c518199419e0037abb74062c37f8519e575f0" +arg@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" + integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -5652,12 +6207,22 @@ async-sema@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.0.1.tgz#404225197ea43e3be91ac7d711fb7088f2469c79" +async@0.9.x: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= + async@^2.1.5, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" dependencies: lodash "^4.17.14" +async@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.2.tgz#2eb7671034bb2194d45d30e31e24ec7e7f9670cd" + integrity sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -5674,6 +6239,11 @@ atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" +auto-bind@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/auto-bind/-/auto-bind-4.0.0.tgz#e3589fc6c2da8f7ca43ba9f84fa52a744fc997fb" + integrity sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ== + autoprefixer@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.1.0.tgz#b19fd8524edef8c85c9db3bdb0c998de84e172fb" @@ -5923,6 +6493,11 @@ base64-js@^1.0.2, base64-js@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -5998,7 +6573,7 @@ bl@^4.0.1: inherits "^2.0.4" readable-stream "^3.4.0" -bl@^4.1.0: +bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -6188,7 +6763,7 @@ browserify-zlib@0.2.0, browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.16.6, browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.15.0, browserslist@^4.16.6, browserslist@^4.3.6, browserslist@^4.6.4, browserslist@^4.8.3: +browserslist@4.16.6, browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.15.0, browserslist@^4.16.6, browserslist@^4.17.5, browserslist@^4.3.6, browserslist@^4.6.4, browserslist@^4.8.3: version "4.16.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== @@ -6232,7 +6807,7 @@ bubble-stream-error@~0.0.1: resolved "https://registry.yarnpkg.com/bubble-stream-error/-/bubble-stream-error-0.0.1.tgz#55eb86846ecf26605e896aa2f1a31b3c9dcccb62" integrity sha1-VeuGhG7PJmBeiWqi8aMbPJ3My2I= -buffer-crc32@~0.2.3: +buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -6266,6 +6841,14 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +buffer@^5.1.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builtin-modules@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" @@ -6360,6 +6943,11 @@ cacheable-lookup@^2.0.0: "@types/keyv" "^3.1.1" keyv "^4.0.0" +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -6385,6 +6973,19 @@ cacheable-request@^7.0.1: normalize-url "^4.1.0" responselike "^2.0.0" +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -6474,7 +7075,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001165, caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: +caniuse-lite@1.0.30001274, caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001165, caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228: version "1.0.30001274" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001274.tgz#26ca36204d15b17601ba6fc35dbdad950a647cc7" integrity sha512-+Nkvv0fHyhISkiMIjnyjmf5YJcQ1IQHZN6U9TLUMroWR38FNwpsC51Gb68yueafX1V6ifOisInSgP9WJFS13ew== @@ -6608,6 +7209,19 @@ check-types@^11.1.1: resolved "https://registry.yarnpkg.com/check-types/-/check-types-11.1.2.tgz#86a7c12bf5539f6324eb0e70ca8896c0e38f3e2f" integrity sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ== +checkpoint-client@1.1.19: + version "1.1.19" + resolved "https://registry.yarnpkg.com/checkpoint-client/-/checkpoint-client-1.1.19.tgz#8a32bddbbc6acf6e20542f18780b71e5e0b981ed" + integrity sha512-aChSq/qsvyu3TXAJdtKgA03JxzUD/w3fwKpUhILPGFnHEO8OHx+cg6dgjuchQsIs2r3lSPPcwzgi21xohqTrmQ== + dependencies: + ci-info "3.1.1" + env-paths "2.2.0" + fast-write-atomic "0.2.1" + make-dir "3.1.0" + ms "2.1.3" + node-fetch "2.6.1" + uuid "8.3.2" + checkup@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/checkup/-/checkup-1.3.0.tgz#d3800276fea5d0f247ffc951be78c8b02f8e0d76" @@ -6658,6 +7272,15 @@ cheerio@1.0.0-rc.9: parse5-htmlparser2-tree-adapter "^6.0.1" tslib "^2.2.0" +chevrotain@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-9.1.0.tgz#ca2a811372687ad6f4d11c063cd27a26e5fbd52d" + integrity sha512-A86/55so63HCfu0dgGg3j9u8uuuBOrSqly1OhBZxRu2x6sAKILLzfVjbGMw45kgier6lz45EzcjjWtTRgoT84Q== + dependencies: + "@chevrotain/types" "^9.1.0" + "@chevrotain/utils" "^9.1.0" + regexp-to-ast "0.5.0" + child-process-promise@^2.1.3: version "2.2.1" resolved "https://registry.yarnpkg.com/child-process-promise/-/child-process-promise-2.2.1.tgz#4730a11ef610fad450b8f223c79d31d7bdad8074" @@ -6747,15 +7370,15 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -ci-info@^2.0.0, ci-info@watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540: - version "2.0.0" - resolved "https://codeload.github.com/watson/ci-info/tar.gz/f43f6a1cefff47fb361c88cf4b943fdbcaafe540" - -ci-info@^3.1.1: +ci-info@3.1.1, ci-info@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.1.1.tgz#9a32fcefdf7bcdb6f0a7e1c0f8098ec57897b80a" integrity sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ== +ci-info@^2.0.0, ci-info@watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540: + version "2.0.0" + resolved "https://codeload.github.com/watson/ci-info/tar.gz/f43f6a1cefff47fb361c88cf4b943fdbcaafe540" + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -6814,6 +7437,11 @@ cli-spinners@^1.1.0: version "1.3.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" +cli-spinners@^2.3.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== + cli-spinners@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939" @@ -6858,6 +7486,11 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +clone-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= + clone-deep@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.3.0.tgz#348c61ae9cdbe0edfe053d91ff4cc521d790ede8" @@ -6882,7 +7515,12 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -clone@2.1.2: +clone-stats@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= + +clone@2.1.2, clone@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" @@ -6890,6 +7528,15 @@ clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" +cloneable-readable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" + integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== + dependencies: + inherits "^2.0.1" + process-nextick-args "^2.0.0" + readable-stream "^2.3.5" + clor@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/clor/-/clor-5.2.0.tgz#9ddc74e7e86728cfcd05a80546ba58d317b81035" @@ -6913,6 +7560,13 @@ coa@^2.0.2: chalk "^2.4.1" q "^1.1.2" +code-excerpt@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-3.0.0.tgz#fcfb6748c03dba8431c19f5474747fad3f250f10" + integrity sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw== + dependencies: + convert-to-spaces "^1.0.1" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -7056,6 +7710,16 @@ compose-function@3.0.3: dependencies: arity-n "^1.0.4" +compress-commons@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-3.0.0.tgz#833944d84596e537224dd91cf92f5246823d4f1d" + integrity sha512-FyDqr8TKX5/X0qo+aVfaZ+PVmNJHJeckFBlq8jZGSJOgnynhfifoyl24qaqdUdDIBe0EVTHByN6NAkqYvE/2Xg== + dependencies: + buffer-crc32 "^0.2.13" + crc32-stream "^3.0.1" + normalize-path "^3.0.0" + readable-stream "^2.3.7" + compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -7284,6 +7948,11 @@ convert-source-map@^0.3.3: version "0.3.5" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190" +convert-to-spaces@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz#7e3e48bbe6d997b1417ddca2868204b4d3d85715" + integrity sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU= + cookie-session@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/cookie-session/-/cookie-session-1.4.0.tgz#c325aea685ceb9c8e4fd00b0313a46d547747380" @@ -7430,6 +8099,21 @@ cpy@7.3.0: globby "^9.2.0" nested-error-stacks "^2.1.0" +crc32-stream@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-3.0.1.tgz#cae6eeed003b0e44d739d279de5ae63b171b4e85" + integrity sha512-mctvpXlbzsvK+6z8kJwSJ5crm7yBwrQMTybJzMw1O4lLGJqjlDCXY2Zw7KheiA6XBEcBmfLx1D88mjRGVJtY9w== + dependencies: + crc "^3.4.4" + readable-stream "^3.4.0" + +crc@^3.4.4: + version "3.8.0" + resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" + integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ== + dependencies: + buffer "^5.1.0" + create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" @@ -7917,7 +8601,7 @@ dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.9: +debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -7942,6 +8626,13 @@ debug@4.3.1, debug@^4.0.0, debug@^4.2.0: dependencies: ms "2.1.2" +debug@4.3.2, debug@^4.3.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + debug@^3.0.0, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -7955,10 +8646,10 @@ debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +debug@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -8002,6 +8693,13 @@ decompress-response@^5.0.0: dependencies: mimic-response "^2.0.0" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -8059,6 +8757,20 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +del@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + dependencies: + globby "^11.0.1" + graceful-fs "^4.2.4" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.2" + p-map "^4.0.0" + rimraf "^3.0.2" + slash "^3.0.0" + delay@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/delay/-/delay-4.3.0.tgz#efeebfb8f545579cb396b3a722443ec96d14c50e" @@ -8127,6 +8839,14 @@ detect-node@^2.0.4, detect-node@^2.1.0: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== +detect-port@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== + dependencies: + address "^1.0.1" + debug "^2.6.0" + devalue@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/devalue/-/devalue-2.0.1.tgz#5d368f9adc0928e47b77eea53ca60d2f346f9762" @@ -8148,6 +8868,11 @@ diff-sequences@^27.0.0-next.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.0-next.0.tgz#4f0502557fd02bd7596f9c42ce67bf7d022559e8" integrity sha512-57AobYOk6dK5sIDqkULZyHSbxA6JLMhBEZWuiVuwuNJafFOkgz4tez9DaKylgOPXX+/5YCI1GZSp+8+ctthy+w== +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -8352,6 +9077,11 @@ dotenv@*, dotenv@8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" +dotenv@^8.2.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -8392,6 +9122,13 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" +ejs@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== + dependencies: + jake "^10.6.1" + electron-to-chromium@^1.3.723: version "1.3.725" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.725.tgz#04fc83f9189169aff50f0a00c6b4090b910cba85" @@ -8476,7 +9213,7 @@ enhanced-resolve@^5.7.0: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@2.3.6, enquirer@^2.3.5, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -8491,7 +9228,7 @@ entities@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" -env-paths@^2.2.0: +env-paths@2.2.0, env-paths@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" @@ -8806,6 +9543,13 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" @@ -8820,6 +9564,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint-visitor-keys@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" + integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== + eslint@7.21.0: version "7.21.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.21.0.tgz#4ecd5b8c5b44f5dedc9b8a110b01bbfeb15d1c83" @@ -9260,6 +10009,17 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" +fast-glob@^3.2.5: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -9269,6 +10029,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-write-atomic@0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fast-write-atomic/-/fast-write-atomic-0.2.1.tgz#7ee8ef0ce3c1f531043c09ae8e5143361ab17ede" + integrity sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw== + fastparse@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" @@ -9367,6 +10132,13 @@ file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" +filelist@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== + dependencies: + minimatch "^3.0.4" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -9455,6 +10227,14 @@ find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@5.0.0, find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -9488,6 +10268,13 @@ firebase@7.14.5: "@firebase/storage" "0.3.34" "@firebase/util" "0.2.47" +first-chunk-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70" + integrity sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA= + dependencies: + readable-stream "^2.0.2" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -9982,6 +10769,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -10021,6 +10815,13 @@ global-dirs@^2.0.1: dependencies: ini "1.3.7" +global-dirs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== + dependencies: + ini "2.0.0" + global-modules@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" @@ -10064,10 +10865,10 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.1: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globby@11.0.2, globby@^11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -10076,10 +10877,22 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.2: - version "11.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" - integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== +globby@^11.0.0, globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +globby@^11.0.1: + version "11.0.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" + integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -10134,6 +10947,23 @@ got@10.7.0: to-readable-stream "^2.0.0" type-fest "^0.10.0" +got@^11.8.1: + version "11.8.3" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.3.tgz#f496c8fdda5d729a90b4905d2b07dbd148170770" + integrity sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + got@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" @@ -10344,6 +11174,14 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasha@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" + integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== + dependencies: + is-stream "^2.0.0" + type-fest "^0.8.0" + hast-util-embedded@^1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/hast-util-embedded/-/hast-util-embedded-1.0.6.tgz#ea7007323351cc43e19e1d6256b7cde66ad1aa03" @@ -10604,6 +11442,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + https-browserify@1.0.0, https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" @@ -10678,6 +11524,11 @@ idb@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/idb/-/idb-3.0.2.tgz#c8e9122d5ddd40f13b60ae665e4862f8b13fa384" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ieee754@^1.1.4: version "1.1.13" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -10714,6 +11565,11 @@ ignore@^5.0.0, ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.1.8: + version "5.1.9" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb" + integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== + image-size@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.0.0.tgz#58b31fe4743b1cec0a0ac26f5c914d3c5b2f0750" @@ -10824,6 +11680,11 @@ ini@1.3.7: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" @@ -10847,6 +11708,47 @@ init-package-json@^2.0.2: validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" +ink-spinner@4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/ink-spinner/-/ink-spinner-4.0.3.tgz#0d0f4a787ae1a4270928e063d9c52527cb264feb" + integrity sha512-uJ4nbH00MM9fjTJ5xdw0zzvtXMkeGb0WV6dzSWvFv2/+ks6FIhpkt+Ge/eLdh0Ah6Vjw5pLMyNfoHQpRDRVFbQ== + dependencies: + cli-spinners "^2.3.0" + +ink-testing-library@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ink-testing-library/-/ink-testing-library-2.1.0.tgz#b5ffd1ef1049550ae4d2f008b8770e7ece6e0313" + integrity sha512-7TNlOjJlJXB33vG7yVa+MMO7hCjaC1bCn+zdpSjknWoLbOWMaFdKc7LJvqVkZ0rZv2+akhjXPrcR/dbxissjUw== + +ink@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ink/-/ink-3.2.0.tgz#434793630dc57d611c8fe8fffa1db6b56f1a16bb" + integrity sha512-firNp1q3xxTzoItj/eOOSZQnYSlyrWks5llCTVX37nJ59K3eXbQ8PtzCguqo8YI19EELo5QxaKnJd4VxzhU8tg== + dependencies: + ansi-escapes "^4.2.1" + auto-bind "4.0.0" + chalk "^4.1.0" + cli-boxes "^2.2.0" + cli-cursor "^3.1.0" + cli-truncate "^2.1.0" + code-excerpt "^3.0.0" + indent-string "^4.0.0" + is-ci "^2.0.0" + lodash "^4.17.20" + patch-console "^1.0.0" + react-devtools-core "^4.19.1" + react-reconciler "^0.26.2" + scheduler "^0.20.2" + signal-exit "^3.0.2" + slice-ansi "^3.0.0" + stack-utils "^2.0.2" + string-width "^4.2.2" + type-fest "^0.12.0" + widest-line "^3.1.0" + wrap-ansi "^6.2.0" + ws "^7.5.5" + yoga-layout-prebuilt "^1.9.6" + inquirer@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" @@ -11181,6 +12083,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hexadecimal@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.3.tgz#e8a426a69b6d31470d3a33a47bb825cda02506ee" @@ -11267,7 +12176,12 @@ is-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" -is-path-inside@^3.0.1: +is-path-cwd@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-inside@^3.0.1, is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -11410,7 +12324,7 @@ is-upper-case@^1.1.0: dependencies: upper-case "^1.1.0" -is-utf8@^0.2.0: +is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -11453,6 +12367,11 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isbinaryfile@^4.0.0: + version "4.0.8" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.8.tgz#5d34b94865bd4946633ecc78a026fc76c5b11fcf" + integrity sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -11531,6 +12450,16 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" +jake@^10.6.1: + version "10.8.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" + integrity sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A== + dependencies: + async "0.9.x" + chalk "^2.4.2" + filelist "^1.0.1" + minimatch "^3.0.4" + jest-changed-files@^27.0.0-next.8: version "27.0.0-next.8" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.0.0-next.8.tgz#49665c7852c315da415de5380f8022b39a68ae99" @@ -12040,6 +12969,31 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jscodeshift@0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.13.0.tgz#4b3835c3755ea86bc4910ac80acd4acd230b53ee" + integrity sha512-FNHLuwh7TeI0F4EzNVIRwUSxSqsGWM5nTv596FK4NfBnEEKFpIcyFeG559DMFGHSTIYA5AY4Fqh2cBrJx0EAwg== + dependencies: + "@babel/core" "^7.13.16" + "@babel/parser" "^7.13.16" + "@babel/plugin-proposal-class-properties" "^7.13.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.13.8" + "@babel/plugin-proposal-optional-chaining" "^7.13.12" + "@babel/plugin-transform-modules-commonjs" "^7.13.8" + "@babel/preset-flow" "^7.13.13" + "@babel/preset-typescript" "^7.13.0" + "@babel/register" "^7.13.16" + babel-core "^7.0.0-bridge.0" + colors "^1.1.2" + flow-parser "0.*" + graceful-fs "^4.2.4" + micromatch "^3.1.10" + neo-async "^2.5.0" + node-dir "^0.1.17" + recast "^0.20.4" + temp "^0.8.4" + write-file-atomic "^2.3.0" + jscodeshift@^0.6.4: version "0.6.4" resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.6.4.tgz#e19ab86214edac86a75c4557fc88b3937d558a8e" @@ -12147,7 +13101,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json5@2.2.0: +json5@2.2.0, json5@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== @@ -12348,6 +13302,13 @@ lazy-cache@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +lazystream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" + integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== + dependencies: + readable-stream "^2.0.5" + lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" @@ -12577,6 +13538,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -12607,7 +13575,7 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.defaults@^4.0.1: +lodash.defaults@^4.0.1, lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" @@ -12733,6 +13701,11 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= +lodash.union@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -12863,6 +13836,13 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +make-dir@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -12909,6 +13889,13 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -13072,6 +14059,39 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" +mem-fs-editor@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-8.0.0.tgz#cd8402fa009df302656422f71831ccd8e30319e7" + integrity sha512-0+6Zp44EmPpF01MZOlY0kt7JTndjdvALo4jA7Kk9GPCuqGzGnBmWtcE44Cwzj1aru57IN5/LKIWd1lIvaT6sKw== + dependencies: + commondir "^1.0.1" + deep-extend "^0.6.0" + ejs "^3.1.5" + globby "^11.0.1" + isbinaryfile "^4.0.0" + multimatch "^5.0.0" + normalize-path "^3.0.0" + through2 "^4.0.2" + vinyl "^2.2.1" + +mem-fs@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.2.0.tgz#5f29b2d02a5875cd14cd836c388385892d556cde" + integrity sha512-b8g0jWKdl8pM0LqAPdK9i8ERL7nYrzmJfRhxMiWH2uYdfYnb7uXnmwVb0ZGe7xyEl4lj+nLIU3yf4zPUT+XsVQ== + dependencies: + through2 "^3.0.0" + vinyl "^2.0.1" + vinyl-file "^3.0.0" + +mem@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -13178,6 +14198,11 @@ methods@^1.1.1, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" +micro-memoize@^4.0.9: + version "4.0.9" + resolved "https://registry.yarnpkg.com/micro-memoize/-/micro-memoize-4.0.9.tgz#b44a38c9dffbee1cefc2fd139bc8947952268b62" + integrity sha512-Z2uZi/IUMGQDCXASdujXRqrXXEwSY0XffUrAOllhqzQI3wpUyZbiZTiE2JuYC0HSG2G7DbCS5jZmsEKEGZuemg== + microbundle@0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/microbundle/-/microbundle-0.13.0.tgz#e715a7492c6d2b42c292281f381e550dc0e014ee" @@ -13397,7 +14422,7 @@ mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" -mimic-fn@^2.1.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -13409,6 +14434,11 @@ mimic-response@^2.0.0, mimic-response@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -13624,6 +14654,11 @@ ms@2.1.2, ms@^2.0.0, ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" +ms@2.1.3, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" @@ -13736,6 +14771,11 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz#0fbdcf3e13fe4994781280524f8b96b0cdff9c61" +new-github-issue-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/new-github-issue-url/-/new-github-issue-url-0.2.1.tgz#e17be1f665a92de465926603e44b9f8685630c1d" + integrity sha512-md4cGoxuT4T4d/HDOXbrUHkTKrp/vp+m3aOA7XXVYwNsUNMK49g3SQicTSeV5GIz/5QVGAeYRAOlyp9OvlgsYA== + next-tick@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -14040,6 +15080,11 @@ normalize-url@^4.1.0: version "4.5.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + normalize.css@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" @@ -14155,6 +15200,13 @@ npm-run-all@4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" +npm-run-path@4.0.1, npm-run-path@^4.0.0, npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + npm-run-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f" @@ -14175,13 +15227,6 @@ npm-run-path@^3.0.0: dependencies: path-key "^3.0.0" -npm-run-path@^4.0.0, npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - npm-which@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" @@ -14521,6 +15566,11 @@ p-cancelable@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + p-each-series@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" @@ -14532,6 +15582,13 @@ p-event@^4.0.0: dependencies: p-timeout "^2.0.1" +p-filter@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c" + integrity sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw== + dependencies: + p-map "^2.0.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -14540,7 +15597,12 @@ p-finally@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" -p-limit@3.1.0, p-limit@^3.1.0: +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@3.1.0, p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -14577,11 +15639,23 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -14607,6 +15681,14 @@ p-reduce@^2.0.0, p-reduce@^2.1.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== +p-retry@^4.2.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.1.tgz#8fcddd5cdf7a67a0911a9cf2ef0e5df7f602316c" + integrity sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA== + dependencies: + "@types/retry" "^0.12.0" + retry "^0.13.1" + p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -14868,6 +15950,11 @@ passport@0.4.1: passport-strategy "1.x.x" pause "0.0.1" +patch-console@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/patch-console/-/patch-console-1.0.0.tgz#19b9f028713feb8a3c023702a8cc8cb9f7466f9d" + integrity sha512-nxl9nrnLQmh64iTzMfyylSlRozL7kAXIaxw1fVcLYdyhNkJCRUzirRZTikXGJsg+hc4fqpneTK6iU2H1Q8THSA== + path-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" @@ -14995,6 +16082,11 @@ picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== +pid-cwd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pid-cwd/-/pid-cwd-1.2.0.tgz#c14c03d812b1d23f97aee27767957fc16272c979" + integrity sha512-8QQzIdBmy4bd2l1NKWON1X8flO5TQQRzU2uRDua/XaxSC0iJ+rgbDrlX76t0W3DaJ7OevTYpftyvQ6oMe3hclQ== + pidtree@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b" @@ -15059,6 +16151,13 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-dir@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" + integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== + dependencies: + find-up "^5.0.0" + pkg-up@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -15958,25 +17057,30 @@ pretty-ms@7.0.0: dependencies: parse-ms "^2.1.0" +prettysize@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prettysize/-/prettysize-2.0.0.tgz#902c02480d865d9cc0813011c9feb4fa02ce6996" + integrity sha512-VVtxR7sOh0VsG8o06Ttq5TrI1aiZKmC+ClSn4eBPaNf4SHr5lzbYW+kYGX3HocBL/MfpVrRfFZ9V3vCbLaiplg== + private@^0.1.8, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" +process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - process@0.11.10, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@2.0.3, progress@^2.0.0: +progress@2.0.3, progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -16090,6 +17194,11 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= +ps-list@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/ps-list/-/ps-list-7.2.0.tgz#3d110e1de8249a4b178c9b1cf2a215d1e4e42fc0" + integrity sha512-v4Bl6I3f2kJfr5o80ShABNHAokIgY+wFDTQfE+X3zWYgSGQOCBeYptLZUpoOALBqO5EawmDN/tjTldJesd0ujQ== + ps-tree@=1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.1.tgz#5f1ba35455b8c25eeb718d04c37de1555d96d3db" @@ -16232,6 +17341,11 @@ querystring@0.2.0, querystring@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue@6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.2.tgz#b91525283e2315c7553d2efa18d83e76432fed65" @@ -16244,6 +17358,11 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + quotation@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/quotation/-/quotation-1.1.3.tgz#2a4d11f70105ad398b577883f310469367f53351" @@ -16316,6 +17435,14 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: loose-envify "^1.1.0" object-assign "^4.1.1" +react-devtools-core@^4.19.1: + version "4.21.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.21.0.tgz#a54c9a0fd7261491e616d6c87d1869e011d8521d" + integrity sha512-clGWwJHV5MHwTwYyKc+7FZHwzdbzrD2/AoZSkicUcr6YLc3Za9a9FaLhccWDHfjQ+ron9yzNhDT6Tv+FiPkD3g== + dependencies: + shell-quote "^1.6.1" + ws "^7" + "react-dom-18@npm:react-dom@next": version "18.0.0-alpha-c76e4dbbc-20210722" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.0.0-alpha-c76e4dbbc-20210722.tgz#4fc4518926332983788d48aaad0c6ca5e5d806e5" @@ -16357,6 +17484,15 @@ react-query@3.21.1: broadcast-channel "^3.4.1" match-sorter "^6.0.2" +react-reconciler@^0.26.2: + version "0.26.2" + resolved "https://registry.yarnpkg.com/react-reconciler/-/react-reconciler-0.26.2.tgz#bbad0e2d1309423f76cf3c3309ac6c96e05e9d91" + integrity sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "^0.20.2" + react-refresh@0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" @@ -16487,7 +17623,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@^2.3.7, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" dependencies: @@ -16499,7 +17635,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -16575,6 +17711,16 @@ recast@0.18.5: private "^0.1.8" source-map "~0.6.1" +recast@0.20.5, recast@^0.20.4: + version "0.20.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" + integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ== + dependencies: + ast-types "0.14.2" + esprima "~4.0.0" + source-map "~0.6.1" + tslib "^2.0.1" + recast@^0.16.1: version "0.16.2" resolved "https://registry.yarnpkg.com/recast/-/recast-0.16.2.tgz#3796ebad5fe49ed85473b479cd6df554ad725dc2" @@ -16663,6 +17809,11 @@ regex-parser@^2.2.11: resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.11.tgz#3b37ec9049e19479806e878cabe7c1ca83ccfe58" integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== +regexp-to-ast@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz#56c73856bee5e1fef7f73a00f1473452ab712a24" + integrity sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw== + regexp.prototype.flags@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" @@ -16671,15 +17822,16 @@ regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" - regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -16909,6 +18061,11 @@ replace-ext@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" +replace-ext@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== + request-promise-core@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.2.tgz#339f6aababcafdb31c799ff158700336301d3346" @@ -16982,7 +18139,12 @@ requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" -resolve-cwd@^3.0.0: +resolve-alpn@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + +resolve-cwd@3.0.0, resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== @@ -17008,6 +18170,13 @@ resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" +resolve-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg/-/resolve-pkg-2.0.0.tgz#ac06991418a7623edc119084edc98b0e6bf05a41" + integrity sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ== + dependencies: + resolve-from "^5.0.0" + resolve-url-loader@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz#235e2c28e22e3e432ba7a5d4e305c59a58edfc08" @@ -17132,6 +18301,11 @@ retry@0.12.0, retry@^0.12.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -17393,6 +18567,14 @@ scheduler@0.21.0-alpha-c76e4dbbc-20210722: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + schema-utils@2.7.1, schema-utils@^2.6.5, schema-utils@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" @@ -17502,7 +18684,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1: +semver@^7.2.1, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -17656,6 +18838,11 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" +shellwords-ts@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shellwords-ts/-/shellwords-ts-3.0.0.tgz#cd0679116dbe8581a8a0299b4f5f52a067ac79f2" + integrity sha512-4uZTHR2P7zKRZmSoOiUCFK1K+5LlDxay/RVNWDDImnGG1/4r/dZ2Y3rzpo871Iche913yOgYeKrrxl+3vengFw== + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -18028,6 +19215,13 @@ stable@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" +stack-utils@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== + dependencies: + escape-string-regexp "^2.0.0" + stack-utils@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" @@ -18183,6 +19377,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string.prototype.matchall@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.4.tgz#608f255e93e072107f5de066f81a2dfb78cf6b29" @@ -18307,6 +19510,28 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom-buf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572" + integrity sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI= + dependencies: + is-utf8 "^0.2.1" + +strip-bom-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" + integrity sha1-+H217yYT9paKpUWr/h7HKLaoKco= + dependencies: + first-chunk-stream "^2.0.0" + strip-bom "^2.0.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -18329,19 +19554,19 @@ strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - dependencies: - get-stdin "^4.0.1" - -strip-indent@^3.0.0: +strip-indent@3.0.0, strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== dependencies: min-indent "^1.0.0" +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -18581,6 +19806,17 @@ tar-stream@2.1.3: inherits "^2.0.3" readable-stream "^3.1.1" +tar-stream@^2.1.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar@4.4.18, tar@^4, tar@^4.4.12: version "4.4.18" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.18.tgz#a565090fdcf786ee08ed14b1739179451b3cc476" @@ -18603,6 +19839,18 @@ tar@^2.0.0: fstream "^1.0.12" inherits "2" +tar@^6.0.1: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + tar@^6.0.2, tar@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.0.tgz#d1724e9bcc04b977b18d5c573b333a2207229a83" @@ -18630,6 +19878,11 @@ temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + temp-fs@^0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/temp-fs/-/temp-fs-0.9.9.tgz#8071730437870720e9431532fe2814364f8803d7" @@ -18647,19 +19900,30 @@ temp-write@^4.0.0: temp-dir "^1.0.0" uuid "^3.3.2" -temp@^0.8.1: +temp@^0.8.1, temp@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== dependencies: rimraf "~2.6.2" +tempy@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-1.0.1.tgz#30fe901fd869cfb36ee2bd999805aa72fbb035de" + integrity sha512-biM9brNqxSc04Ee71hzFbryD11nX7VPhQQY32AdDmjFvodsRFz/3ufeoTZ6uYkRFfGo188tENcASNs3vTdsM0w== + dependencies: + del "^6.0.0" + is-stream "^2.0.0" + temp-dir "^2.0.0" + type-fest "^0.16.0" + unique-string "^2.0.0" + term-size@^2.1.0: version "2.2.1" resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== -terminal-link@^2.0.0: +terminal-link@^2.0.0, terminal-link@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== @@ -18766,7 +20030,15 @@ through2@^2.0.0, through2@^2.0.2: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^4.0.0: +through2@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== + dependencies: + inherits "^2.0.4" + readable-stream "2 || 3" + +through2@^4.0.0, through2@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== @@ -18831,6 +20103,13 @@ tmp@0.0.30: dependencies: os-tmpdir "~1.0.1" +tmp@0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -19025,6 +20304,11 @@ tslib@2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== +tslib@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + tslib@^2.0.1, tslib@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" @@ -19053,6 +20337,13 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -19094,17 +20385,27 @@ type-fest@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.10.0.tgz#7f06b2b9fbfc581068d1341ffabd0349ceafc642" +type-fest@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.12.0.tgz#f57a27ab81c68d136a51fd71467eff94157fa1ee" + integrity sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg== + type-fest@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== +type-fest@^0.16.0: + version "0.16.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" + integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== + type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== -type-fest@^0.21.3: +type-fest@^0.21.2, type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== @@ -19122,7 +20423,7 @@ type-fest@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" -type-fest@^0.8.1: +type-fest@^0.8.0, type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -19172,6 +20473,30 @@ uid-number@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +ultra-runner@3.10.5: + version "3.10.5" + resolved "https://registry.yarnpkg.com/ultra-runner/-/ultra-runner-3.10.5.tgz#7a723b64326642a6d4649ca4cd51a9900c7eccd2" + integrity sha512-0U2OPII7sbvtbu9rhDlUUkP4Au/DPz2Tzbnawd/XwDuUruDqd+t/Bmel3cLJxl3yMLHf0OY0TMcIx9zzxdlAZw== + dependencies: + ansi-split "^1.0.1" + chalk "^4.1.0" + cross-spawn "^7.0.3" + fast-glob "^3.2.5" + globrex "^0.1.2" + ignore "^5.1.8" + json5 "^2.2.0" + micro-memoize "^4.0.9" + npm-run-path "4.0.1" + pid-cwd "^1.2.0" + ps-list "^7.2.0" + shellwords-ts "^3.0.0" + string-width "^4.2.0" + tslib "2.1.0" + type-fest "^0.21.2" + wrap-ansi "^7.0.0" + yamljs "^0.3.0" + yargs "^16.2.0" + umask@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" @@ -19186,6 +20511,11 @@ unbox-primitive@^1.0.0: has-symbols "^1.0.0" which-boxed-primitive "^1.0.1" +undici@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/undici/-/undici-3.3.3.tgz#a90a783a5605fd3d0e093624e261aae234646452" + integrity sha512-JcC6p86DLPDne5vhm9nZ9N6hW/WPCtO8/NV+7YHS+x/mQ+NpWvtGxIt28ObBsySPec8FsabyiLPhmn7Htl9w3A== + unfetch@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db" @@ -19561,6 +20891,14 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +url-parse@^1.4.7: + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + url-template@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" @@ -19588,6 +20926,14 @@ use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" +username@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/username/-/username-5.1.0.tgz#a7f9325adce2d0166448cdd55d4985b1360f2508" + integrity sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg== + dependencies: + execa "^1.0.0" + mem "^4.3.0" + util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -19644,6 +20990,11 @@ utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" +uuid@8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + uuid@^3.3.2: version "3.3.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" @@ -19761,6 +21112,29 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" +vinyl-file@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365" + integrity sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U= + dependencies: + graceful-fs "^4.1.2" + pify "^2.3.0" + strip-bom-buf "^1.0.0" + strip-bom-stream "^2.0.0" + vinyl "^2.0.1" + +vinyl@2.2.1, vinyl@^2.0.1, vinyl@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.1.tgz#23cfb8bbab5ece3803aa2c0a1eb28af7cbba1974" + integrity sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw== + dependencies: + clone "^2.1.1" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + vm-browserify@1.1.2, vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -20176,6 +21550,11 @@ write-pkg@^4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" +ws@^7, ws@^7.5.5: + version "7.5.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" + integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== + ws@^7.3.1: version "7.4.1" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" @@ -20247,6 +21626,14 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== +yamljs@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b" + integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ== + dependencies: + argparse "^1.0.7" + glob "^7.0.5" + yargs-parser@20.2.4, yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -20331,6 +21718,22 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yoga-layout-prebuilt@^1.9.6: + version "1.10.0" + resolved "https://registry.yarnpkg.com/yoga-layout-prebuilt/-/yoga-layout-prebuilt-1.10.0.tgz#2936fbaf4b3628ee0b3e3b1df44936d6c146faa6" + integrity sha512-YnOmtSbv4MTf7RGJMK0FvZ+KD8OEe/J5BNnR0GHhD8J/XcG/Qvxgszm0Un6FTHWW4uHlTgP0IztiXQnGyIR45g== + dependencies: + "@types/yoga-layout" "1.9.2" + +zip-stream@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-3.0.1.tgz#cb8db9d324a76c09f9b76b31a12a48638b0b9708" + integrity sha512-r+JdDipt93ttDjsOVPU5zaq5bAyY+3H19bDrThkvuVxC0xMQzU1PJcS6D+KrP3u96gH9XLomcHPb+2skoDjulQ== + dependencies: + archiver-utils "^2.1.0" + compress-commons "^3.0.0" + readable-stream "^3.6.0" + zod@3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/zod/-/zod-3.10.1.tgz#ea5fdbb9d6ed0abc3c3000be9b768d692c2d5275" diff --git a/package.json b/package.json index 38ae707747..1574230d4a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "nextjs", "nextjs/packages/next", "nextjs/packages/next-mdx", + "nextjs/packages/installer", "nextjs/packages/eslint-config-next", "nextjs/packages/eslint-plugin-next", "nextjs/packages/next-env", @@ -20,6 +21,7 @@ "preconstruct": { "packages": [ "packages/*", + "nextjs/packages/installer", "!packages/cli", "!packages/eslint-config" ] diff --git a/packages/installer/jest.config.js b/packages/installer/jest.config.js deleted file mode 100644 index 4a5b929e59..0000000000 --- a/packages/installer/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - preset: "../../jest-unit.config.js", -} diff --git a/packages/installer/src/components/enter-to-continue.tsx b/packages/installer/src/components/enter-to-continue.tsx deleted file mode 100644 index 39df42dcbb..0000000000 --- a/packages/installer/src/components/enter-to-continue.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import {Text} from "ink" -import * as React from "react" -import {Newline} from "./newline" - -export const EnterToContinue: React.FC<{message?: string}> = ({ - message = "Press ENTER to continue", -}) => ( - <> - - {message} - -) diff --git a/packages/installer/src/components/newline.tsx b/packages/installer/src/components/newline.tsx deleted file mode 100644 index 767fe672a0..0000000000 --- a/packages/installer/src/components/newline.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import {Box} from "ink" -import * as React from "react" - -export const Newline: React.FC<{count?: number}> = ({count = 1}) => { - return -} diff --git a/packages/installer/src/index.ts b/packages/installer/src/index.ts deleted file mode 100644 index dc6d886307..0000000000 --- a/packages/installer/src/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from "./recipe-executor" -export * from "./recipe-builder" -export * from "./executors/executor" -export {type as AddDependencyType} from "./executors/add-dependency-executor" -export {type as FileTransformType} from "./executors/file-transform-executor" -export {type as NewFileType} from "./executors/new-file-executor" -export {type as PrintMessageType} from "./executors/print-message-executor" - -export * from "./utils/paths" -export * from "./transforms" -export {customTsParser} from "./utils/transform" -export type {Program, RecipeCLIArgs, RecipeCLIFlags} from "./types" diff --git a/packages/installer/src/recipe-executor.tsx b/packages/installer/src/recipe-executor.tsx deleted file mode 100644 index a4f4267e3c..0000000000 --- a/packages/installer/src/recipe-executor.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import {render} from "ink" -import {baseLogger} from "next/dist/server/lib/logging" -import React from "react" -import * as AddDependencyExecutor from "./executors/add-dependency-executor" -import * as FileTransformExecutor from "./executors/file-transform-executor" -import * as NewFileExecutor from "./executors/new-file-executor" -import * as PrintMessageExecutor from "./executors/print-message-executor" -import {RecipeRenderer} from "./recipe-renderer" -import {RecipeCLIArgs, RecipeCLIFlags, RecipeMeta} from "./types" -// const debug = require('debug')("blitz:installer") - -type ExecutorConfig = - | AddDependencyExecutor.Config - | FileTransformExecutor.Config - | NewFileExecutor.Config - | PrintMessageExecutor.Config - -export type {ExecutorConfig as ExecutorConfigUnion} - -export class RecipeExecutor { - private readonly steps: ExecutorConfig[] - private readonly options: Options - - constructor(options: Options, steps: ExecutorConfig[]) { - this.options = options - this.steps = steps - } - - async run( - cliArgs: RecipeCLIArgs = {}, - cliFlags: RecipeCLIFlags = {yesToAll: false}, - ): Promise { - try { - const {waitUntilExit} = render( - , - {exitOnCtrlC: false}, - ) - await waitUntilExit() - baseLogger({displayDateTime: false, displayLogLevel: false}).silly( - `\nšŸŽ‰ The ${this.options.name} recipe has been installed!\n`, - ) - } catch (e) { - baseLogger({displayDateTime: false}).error(e as any) - return - } - } -} diff --git a/packages/installer/src/transforms/add-blitz-middleware.ts b/packages/installer/src/transforms/add-blitz-middleware.ts deleted file mode 100644 index 088be010de..0000000000 --- a/packages/installer/src/transforms/add-blitz-middleware.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type {ExpressionKind} from "ast-types/gen/kinds" -import j from "jscodeshift" -import {Program} from "../types" -import {transformBlitzConfig} from "." - -export const addBlitzMiddleware = (program: Program, middleware: ExpressionKind): Program => - transformBlitzConfig(program, (config) => { - // Locate the middleware property - const middlewareProp = config.properties.find( - (value) => - value.type === "ObjectProperty" && - value.key.type === "Identifier" && - value.key.name === "middleware", - ) as j.ObjectProperty | undefined - - if (middlewareProp && middlewareProp.value.type === "ArrayExpression") { - // We found it, pop on our middleware. - middlewareProp.value.elements.push(middleware) - } else { - // No middleware prop, add our own. - config.properties.push( - j.property("init", j.identifier("middleware"), { - type: "ArrayExpression", - elements: [middleware], - loc: null, - comments: null, - }), - ) - } - - return config - }) diff --git a/packages/installer/src/transforms/find-module-exports-expressions.ts b/packages/installer/src/transforms/find-module-exports-expressions.ts deleted file mode 100644 index 1c28b16493..0000000000 --- a/packages/installer/src/transforms/find-module-exports-expressions.ts +++ /dev/null @@ -1,14 +0,0 @@ -import j from "jscodeshift" -import {Program} from "../types" - -export const findModuleExportsExpressions = (program: Program) => - program.find(j.AssignmentExpression).filter((path) => { - const {left, right} = path.value - return ( - left.type === "MemberExpression" && - left.object.type === "Identifier" && - left.property.type === "Identifier" && - left.property.name === "exports" && - right.type === "ObjectExpression" - ) - }) diff --git a/packages/installer/src/transforms/index.ts b/packages/installer/src/transforms/index.ts deleted file mode 100644 index d3f881262c..0000000000 --- a/packages/installer/src/transforms/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./add-import" -export * from "./add-blitz-middleware" -export * from "./find-module-exports-expressions" -export * from "./prisma" -export * from "./transform-blitz-config" -export * from "./update-babel-config" -export * from "./wrap-blitz-config" diff --git a/packages/installer/src/transforms/prisma/index.ts b/packages/installer/src/transforms/prisma/index.ts deleted file mode 100644 index 477c5934e2..0000000000 --- a/packages/installer/src/transforms/prisma/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./add-prisma-enum" -export * from "./add-prisma-field" -export * from "./add-prisma-generator" -export * from "./add-prisma-model-attribute" -export * from "./add-prisma-model" -export * from "./produce-schema" -export * from "./set-prisma-data-source" diff --git a/packages/installer/src/utils/use-enter-to-continue.ts b/packages/installer/src/utils/use-enter-to-continue.ts deleted file mode 100644 index 0306df4b41..0000000000 --- a/packages/installer/src/utils/use-enter-to-continue.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {useInput} from "ink" - -export function useEnterToContinue(cb: Function, additionalCondition: boolean = true) { - useInput((_input, key) => { - if (additionalCondition && key.return) { - cb() - } - }) -} diff --git a/packages/installer/src/utils/use-user-input.ts b/packages/installer/src/utils/use-user-input.ts deleted file mode 100644 index a427ea22b8..0000000000 --- a/packages/installer/src/utils/use-user-input.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {useStdin} from "ink" -import {RecipeCLIFlags} from "../types" - -export function useUserInput(cliFlags: RecipeCLIFlags) { - const {isRawModeSupported} = useStdin() - return isRawModeSupported && !cliFlags.yesToAll -} diff --git a/packages/installer/test/executors/add-dependency-executor.test.ts b/packages/installer/test/executors/add-dependency-executor.test.ts deleted file mode 100644 index 7b4568feff..0000000000 --- a/packages/installer/test/executors/add-dependency-executor.test.ts +++ /dev/null @@ -1,73 +0,0 @@ -import {spawn} from "cross-spawn" -import {existsSync} from "fs-extra" -import {mocked} from "ts-jest/utils" -import * as AddDependencyExecutor from "../../src/executors/add-dependency-executor" - -jest.mock("fs-extra") -jest.mock("cross-spawn") - -describe("add dependency executor", () => { - const testConfiguration = { - stepId: "addDependencies", - stepName: "Add dependencies", - stepType: "add-dependency", - explanation: "This step will add some dependencies for testing purposes", - packages: [{name: "typescript", version: "4"}, {name: "ts-node"}], - } - - it("should properly identify executor", () => { - const wrongConfiguration = { - stepId: "wrongStep", - stepName: "Wrong Step", - stepType: "wrong-type", - explanation: "This step is wrong", - } - expect(AddDependencyExecutor.isAddDependencyExecutor(wrongConfiguration)).toBeFalsy() - expect(AddDependencyExecutor.isAddDependencyExecutor(testConfiguration)).toBeTruthy() - }) - - it("should choose proper package manager according to lock file", () => { - mocked(existsSync).mockReturnValueOnce(true) - expect(AddDependencyExecutor.getPackageManager()).toEqual("yarn") - expect(AddDependencyExecutor.getPackageManager()).toEqual("npm") - }) - - it("should issue proper commands according to the specified packages", async () => { - const mockedSpawn = mockSpawn() - mocked(spawn).mockImplementation(mockedSpawn.spawn as any) - - // NPM - mocked(existsSync).mockReturnValue(false) - await AddDependencyExecutor.installPackages(testConfiguration.packages, true) - await AddDependencyExecutor.installPackages(testConfiguration.packages, false) - - // Yarn - mocked(existsSync).mockReturnValue(true) - await AddDependencyExecutor.installPackages(testConfiguration.packages, true) - await AddDependencyExecutor.installPackages(testConfiguration.packages, false) - - expect(mockedSpawn.calls.length).toEqual(4) - expect(mockedSpawn.calls[0]).toEqual("npm install --save-dev typescript@4 ts-node") - expect(mockedSpawn.calls[1]).toEqual("npm install typescript@4 ts-node") - expect(mockedSpawn.calls[2]).toEqual("yarn add -D typescript@4 ts-node") - expect(mockedSpawn.calls[3]).toEqual("yarn add typescript@4 ts-node") - }) -}) - -/** - * Primitive mock of spawn function - */ -const mockSpawn = () => { - let calls: string[] = [] - - return { - spawn: (command: string, args: string[], _: unknown = {}) => { - calls.push(`${command} ${args.join(" ")}`) - - return { - on: (_: string, resolve: () => void) => resolve(), - } - }, - calls, - } -} diff --git a/packages/installer/test/executors/executor.test.tsx b/packages/installer/test/executors/executor.test.tsx deleted file mode 100644 index 6c289689b6..0000000000 --- a/packages/installer/test/executors/executor.test.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import {render} from "ink-testing-library" -import React from "react" -import stripAnsi from "strip-ansi" -import {Frontmatter} from "../../src/executors/executor" - -describe("Executor", () => { - const executorConfig = { - stepId: "newFile", - stepName: "New File", - stepType: "new-file", - explanation: "Testing text for a new file", - } - it("should render Frontmatter", () => { - const {lastFrame} = render() - - expect(stripAnsi(lastFrame())).toMatchSnapshot() - }) - - it("should contain a step name and explanation", () => { - const {frames} = render() - - expect(frames[0].includes("New File")).toBeTruthy() - expect(frames[0].includes("Testing text for a new file")).toBeTruthy() - }) -}) diff --git a/packages/installer/test/executors/print-message-executor.test.tsx b/packages/installer/test/executors/print-message-executor.test.tsx deleted file mode 100644 index 138f9d4b49..0000000000 --- a/packages/installer/test/executors/print-message-executor.test.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import {render} from "ink-testing-library" -import React from "react" -import stripAnsi from "strip-ansi" -import {Commit as PrintMessageExecutor} from "../../src/executors/print-message-executor" - -describe("Executor", () => { - const executorConfig = { - stepId: "printMessage", - stepName: "Print message", - stepType: "print-message", - explanation: "Testing text for a print message", - message: "My message", - } - it("should render PrintMessageExecutor", () => { - const {lastFrame} = render( - {}} - step={executorConfig} - />, - ) - - expect(stripAnsi(lastFrame())).toMatchSnapshot() - }) - - it("should contain a step name and explanation", () => { - const {frames} = render( - {}} - step={executorConfig} - />, - ) - - expect(frames[0].includes("My message")).toBeTruthy() - }) -}) diff --git a/packages/installer/test/transforms/add-import.test.ts b/packages/installer/test/transforms/add-import.test.ts deleted file mode 100644 index 54c8fb5aa6..0000000000 --- a/packages/installer/test/transforms/add-import.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {addImport, customTsParser} from "@blitzjs/installer" -import j from "jscodeshift" - -function executeImport(fileStr: string, importStatement: j.ImportDeclaration): string { - return addImport(j(fileStr, {parser: customTsParser}), importStatement).toSource({tabWidth: 60}) -} - -describe("addImport transform", () => { - it("adds import at start of file with no imports present", () => { - const file = `export const truth = () => 42` - const importStatement = j.importDeclaration( - [j.importDefaultSpecifier(j.identifier("React"))], - j.literal("react"), - ) - expect(executeImport(file, importStatement)).toMatchSnapshot() - }) - - it("adds import at the end of all imports if imports are present", () => { - const file = `import React from 'react' - -export default function Comp() { - return
hello world!
-}` - const importStatement = j.importDeclaration([], j.literal("app/styles/app.css")) - expect(executeImport(file, importStatement)).toMatchSnapshot() - }) -}) diff --git a/packages/installer/test/transforms/prisma/add-prisma-model.test.ts b/packages/installer/test/transforms/prisma/add-prisma-model.test.ts deleted file mode 100644 index 9a665ef6ab..0000000000 --- a/packages/installer/test/transforms/prisma/add-prisma-model.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {addPrismaModel} from "@blitzjs/installer" - -describe("addPrismaModel", () => { - const subject = (source: string) => - addPrismaModel(source, { - type: "model", - name: "Project", - properties: [{type: "field", name: "id", fieldType: "String"}], - }) - - it("creates model", async () => { - const source = ` -datasource db { - provider = "sqlite" - url = "file:./db.sqlite" -}`.trim() - - expect(await subject(source)).toMatchSnapshot() - }) -}) diff --git a/packages/installer/test/transforms/update-babel-config.test.ts b/packages/installer/test/transforms/update-babel-config.test.ts deleted file mode 100644 index bd2eda7088..0000000000 --- a/packages/installer/test/transforms/update-babel-config.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import {addBabelPlugin, addBabelPreset, customTsParser} from "@blitzjs/installer" -import j from "jscodeshift" - -function executeBabelPlugin(fileStr: string, plugin: string | [string, Object]): string { - return addBabelPlugin(j(fileStr, {parser: customTsParser}), plugin).toSource() -} - -function executeBabelPreset(fileStr: string, plugin: string | [string, Object]): string { - return addBabelPreset(j(fileStr, {parser: customTsParser}), plugin).toSource() -} - -describe("addBabelPlugin transform", () => { - it("adds babel plugin literal", () => { - const source = `module.exports = { - presets: ["@babel/preset-typescript"], - plugins: [], - }` - - expect(executeBabelPlugin(source, "@emotion")).toMatchSnapshot() - }) - - it("adds babel plugin array", () => { - const source = `module.exports = { - presets: ["@babel/preset-typescript"], - plugins: [], - }` - - expect( - executeBabelPlugin(source, ["@babel/plugin-proposal-decorators", {legacy: true}]), - ).toMatchSnapshot() - }) - - it("avoid duplicated", () => { - const source = `module.exports = { - presets: ["@babel/preset-typescript"], - plugins: ["@babel/plugin-proposal-decorators"], - }` - - expect( - executeBabelPlugin(source, ["@babel/plugin-proposal-decorators", {legacy: true}]), - ).toMatchSnapshot() - }) -}) - -describe("addBabelPreset transform", () => { - it("adds babel preset literal", () => { - const source = `module.exports = { - presets: ["@babel/preset-typescript"], - plugins: [], - }` - - expect(executeBabelPreset(source, "blitz/babel")).toMatchSnapshot() - }) - - it("adds babel preset array", () => { - const source = `module.exports = { - presets: ["@babel/preset-typescript"], - plugins: [], - }` - - expect(executeBabelPreset(source, ["blitz/babel", {legacy: true}])).toMatchSnapshot() - }) - - it("avoid duplicated", () => { - const source = `module.exports = { - presets: [["blitz/babel", {legacy: true}]], - plugins: [], - }` - - expect(executeBabelPreset(source, "blitz/babel")).toMatchSnapshot() - }) -}) diff --git a/packages/installer/test/utils/paths.test.ts b/packages/installer/test/utils/paths.test.ts deleted file mode 100644 index b503351d55..0000000000 --- a/packages/installer/test/utils/paths.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {paths} from "@blitzjs/installer" -import * as fs from "fs-extra" - -jest.mock("fs-extra") - -const testIfNotWindows = process.platform === "win32" ? test.skip : test - -describe("path utils", () => { - it("returns proper file paths in a TS project", () => { - fs.existsSync.mockReturnValue(true) - expect(paths.document()).toBe("app/pages/_document.tsx") - expect(paths.app()).toBe("app/pages/_app.tsx") - expect(paths.entry()).toBe("app/pages/index.tsx") - // Blitz and Babel configs are always JS, we shouldn't transform this extension - expect(paths.blitzConfig()).toBe("blitz.config.ts") - expect(paths.babelConfig()).toBe("babel.config.js") - }) - - // SKIP test because the fs mock is failing on windows - testIfNotWindows("returns proper file paths in a JS project", () => { - fs.existsSync.mockReturnValue(false) - expect(paths.document()).toBe("app/pages/_document.js") - expect(paths.app()).toBe("app/pages/_app.js") - expect(paths.entry()).toBe("app/pages/index.js") - expect(paths.blitzConfig()).toBe("blitz.config.js") - expect(paths.babelConfig()).toBe("babel.config.js") - }) -}) diff --git a/tsconfig.json b/tsconfig.json index fdea9ab451..43a939ab57 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,10 +32,10 @@ "packages/blitz/src/**/*", "packages/display/src/**/*", "packages/generator/src/**/*", - "packages/installer/src/**/*", "packages/repl/src/**/*", "packages/server/src/**/*", - "recipes/*" + "recipes/*", + "nextjs/packages/installer/src/**/*" ], "exclude": ["*.test.ts", "*.test.tsx"] }