From c75762307b0ce037defc48b40dd88204ba42ed40 Mon Sep 17 00:00:00 2001 From: rrr523 Date: Thu, 14 Sep 2023 16:11:21 +0800 Subject: [PATCH] feat: Template Init --- README.md | 7 +- package.json | 6 +- packages/chain-sdk/package.json | 4 - packages/create-gnfd-app/README.md | 4 + packages/create-gnfd-app/createApp.ts | 48 +++ packages/create-gnfd-app/helpers/copy.ts | 50 +++ .../helpers/get-pkg-manager.ts | 15 + .../helpers/install-template.ts | 162 +++++++++ packages/create-gnfd-app/helpers/install.ts | 113 ++++++ .../helpers/is-folder-empty.ts | 58 +++ .../create-gnfd-app/helpers/is-writeable.ts | 14 + packages/create-gnfd-app/index.ts | 130 +++++++ packages/create-gnfd-app/package.json | 45 +++ packages/create-gnfd-app/rollup.config.js | 44 +++ .../templates/cra/ts/README.md | 1 + .../templates/nextjs/ts/README.md | 1 + packages/create-gnfd-app/tsconfig.json | 14 + pnpm-lock.yaml | 335 ++++++++++++++++-- 18 files changed, 1020 insertions(+), 31 deletions(-) create mode 100644 packages/create-gnfd-app/README.md create mode 100644 packages/create-gnfd-app/createApp.ts create mode 100644 packages/create-gnfd-app/helpers/copy.ts create mode 100644 packages/create-gnfd-app/helpers/get-pkg-manager.ts create mode 100644 packages/create-gnfd-app/helpers/install-template.ts create mode 100644 packages/create-gnfd-app/helpers/install.ts create mode 100644 packages/create-gnfd-app/helpers/is-folder-empty.ts create mode 100644 packages/create-gnfd-app/helpers/is-writeable.ts create mode 100644 packages/create-gnfd-app/index.ts create mode 100644 packages/create-gnfd-app/package.json create mode 100644 packages/create-gnfd-app/rollup.config.js create mode 100644 packages/create-gnfd-app/templates/cra/ts/README.md create mode 100644 packages/create-gnfd-app/templates/nextjs/ts/README.md create mode 100644 packages/create-gnfd-app/tsconfig.json diff --git a/README.md b/README.md index e2a7a1d9..47e339dc 100644 --- a/README.md +++ b/README.md @@ -30,18 +30,19 @@ You can try out some examples directly in your browser through Stackblitz: ### Running Examples Locally Clone the project and install dependencies: + ```bash > git clone git@github.com:bnb-chain/greenfield-js-sdk.git > cd greenfield-js-sdk > pnpm install ``` -and build package: +Build package: ```bash -> pnpm run -r build +> pnpm run -F "./packages/**" -r build ``` -and then copy env template file: +copy env template file: ```bash > cp .env.simple .env ``` diff --git a/package.json b/package.json index 2fd95489..624b0aec 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,10 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-strip": "^3.0.2", "@rollup/plugin-typescript": "^8.5.0", + "rollup": "^2.79.1", + "rollup-plugin-auto-external": "^2.0.0", + "rollup-plugin-polyfill-node": "^0.10.2", + "rollup-plugin-terser": "^7.0.2", "@types/chai": "^4.3.5", "@types/mocha": "^9.1.1", "@types/node": "^18.16.18", @@ -45,4 +49,4 @@ "prettier": "^2.8.8", "rimraf": "^3.0.2" } -} \ No newline at end of file +} diff --git a/packages/chain-sdk/package.json b/packages/chain-sdk/package.json index 950c8a2a..246a1b9c 100644 --- a/packages/chain-sdk/package.json +++ b/packages/chain-sdk/package.json @@ -85,10 +85,6 @@ "@types/xml2js": "^0.4.11", "jest": "^29.5.0", "mime": "^3.0.0", - "rollup": "^2.79.1", - "rollup-plugin-auto-external": "^2.0.0", - "rollup-plugin-polyfill-node": "^0.10.2", - "rollup-plugin-terser": "^7.0.2", "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "tslib": "^2.5.0", diff --git a/packages/create-gnfd-app/README.md b/packages/create-gnfd-app/README.md new file mode 100644 index 00000000..1ea7d2e6 --- /dev/null +++ b/packages/create-gnfd-app/README.md @@ -0,0 +1,4 @@ +# Create Greemfielf App + +`create-gnfd-app` allows you to create a new Greenfield app within seconds. + diff --git a/packages/create-gnfd-app/createApp.ts b/packages/create-gnfd-app/createApp.ts new file mode 100644 index 00000000..8e55c7ae --- /dev/null +++ b/packages/create-gnfd-app/createApp.ts @@ -0,0 +1,48 @@ +import path from 'path'; +import { green } from 'picocolors'; +import { PackageManager } from './helpers/get-pkg-manager'; +import { installTemplate, TemplateType } from './helpers/install-template'; +import { isFolderEmpty } from './helpers/is-folder-empty'; +import { isWriteable, makeDir } from './helpers/is-writeable'; + +export async function createApp({ + appPath, + packageManager, + template, +}: { + appPath: string; + packageManager: PackageManager; + template: TemplateType; +}) { + const root = path.resolve(appPath); + if (!(await isWriteable(path.dirname(root)))) { + /* eslint-disable-next-line no-console */ + console.error( + `The application path is not writable, please check folder permissions and try again. + It is likely you do not have write permissions for this folder. + `, + ); + process.exit(1); + } + + const appName = path.basename(root); + await makeDir(root); + if (!isFolderEmpty(root, appName)) { + process.exit(1); + } + + const originalDirectory = process.cwd(); + /* eslint-disable-next-line no-console */ + console.log(`Creating a new Greenfield app in ${green(root)}.`); + process.chdir(root); + const packageJsonPath = path.join(root, 'package.json'); + + await installTemplate({ + appName, + root, + packageManager, + isOnline: true, + template, + mode: 'ts', + }); +} diff --git a/packages/create-gnfd-app/helpers/copy.ts b/packages/create-gnfd-app/helpers/copy.ts new file mode 100644 index 00000000..aa694e43 --- /dev/null +++ b/packages/create-gnfd-app/helpers/copy.ts @@ -0,0 +1,50 @@ +/* eslint-disable no-console */ +import { async as glob } from 'fast-glob'; +import path from 'path'; +import fs from 'fs'; + +interface CopyOption { + cwd?: string; + rename?: (basename: string) => string; + parents?: boolean; +} + +const identity = (x: string) => x; + +export const copy = async ( + src: string | string[], + dest: string, + { cwd, rename = identity, parents = true }: CopyOption = {}, +) => { + const source = typeof src === 'string' ? [src] : src; + + if (source.length === 0 || !dest) { + throw new TypeError('`src` and `dest` are required'); + } + + const sourceFiles = await glob(source, { + cwd, + dot: true, + absolute: false, + stats: false, + }); + + const destRelativeToCwd = cwd ? path.resolve(cwd, dest) : dest; + + return Promise.all( + sourceFiles.map(async (p) => { + const dirname = path.dirname(p); + const basename = rename(path.basename(p)); + + const from = cwd ? path.resolve(cwd, p) : p; + const to = parents + ? path.join(destRelativeToCwd, dirname, basename) + : path.join(destRelativeToCwd, basename); + + // Ensure the destination directory exists + await fs.promises.mkdir(path.dirname(to), { recursive: true }); + + return fs.promises.copyFile(from, to); + }), + ); +}; diff --git a/packages/create-gnfd-app/helpers/get-pkg-manager.ts b/packages/create-gnfd-app/helpers/get-pkg-manager.ts new file mode 100644 index 00000000..f1165267 --- /dev/null +++ b/packages/create-gnfd-app/helpers/get-pkg-manager.ts @@ -0,0 +1,15 @@ +export type PackageManager = 'npm' | 'pnpm' | 'yarn'; + +export function getPkgManager(): PackageManager { + const userAgent = process.env.npm_config_user_agent || ''; + + if (userAgent.startsWith('yarn')) { + return 'yarn'; + } + + if (userAgent.startsWith('pnpm')) { + return 'pnpm'; + } + + return 'npm'; +} diff --git a/packages/create-gnfd-app/helpers/install-template.ts b/packages/create-gnfd-app/helpers/install-template.ts new file mode 100644 index 00000000..67434320 --- /dev/null +++ b/packages/create-gnfd-app/helpers/install-template.ts @@ -0,0 +1,162 @@ +/* eslint-disable no-console */ +import fs from 'fs'; +import os from 'os'; +import path from 'path'; +import { bold, cyan } from 'picocolors'; +import { copySync } from 'fs-extra'; +import { PackageManager } from './get-pkg-manager'; +import { install } from './install'; +import { makeDir } from './is-writeable'; + +export const SRC_DIR_NAMES = ['app', 'pages', 'styles']; + +export type TemplateType = 'nextjs' | 'cra'; +export type TemplateMode = 'js' | 'ts'; + +export const installTemplate = async ({ + appName, + root, + packageManager, + isOnline, + template, + mode, +}: InstallTemplateArgs) => { + console.log(bold(`Using ${packageManager}.`)); + + /** + * Copy the template files to the target directory. + */ + console.log('\nInitializing project with template:', template, '\n'); + const templatePath = path.join(__dirname, 'templates', template, mode); + + // console.log('root', root); + // console.log('__dirname', __dirname); + // console.log('templatePath', templatePath); + + // await copy(copySource, root, { + // parents: true, + // cwd: templatePath, + // rename(name) { + // switch (name) { + // case 'gitignore': + // case 'eslintrc.json': { + // return `.${name}`; + // } + // // README.md is ignored by webpack-asset-relocator-loader used by ncc: + // // https://github.com/vercel/webpack-asset-relocator-loader/blob/e9308683d47ff507253e37c9bcbb99474603192b/src/asset-relocator.js#L227 + // case 'README-template.md': { + // return 'README.md'; + // } + // default: { + // return name; + // } + // } + // }, + // }); + + copySync(templatePath, root); + + // const tsconfigFile = path.join(root, mode === 'js' ? 'jsconfig.json' : 'tsconfig.json'); + /* await fs.promises.writeFile( + tsconfigFile, + (await fs.promises.readFile(tsconfigFile, 'utf8')) + .replace(`"@/*": ["./*"]`, srcDir ? `"@/*": ["./src/*"]` : `"@/*": ["./*"]`) + .replace(`"@/*":`, `"${importAlias}":`), + ); */ + + // update import alias in any files if not using the default + + // await makeDir(path.join(root, 'src')); + await Promise.all( + SRC_DIR_NAMES.map(async (file) => { + await fs.promises.rename(path.join(root, file), path.join(root, 'src', file)).catch((err) => { + if (err.code !== 'ENOENT') { + throw err; + } + }); + }), + ); + + console.log('root', root); + + /** + * Create a package.json for the new project and write it to disk. + */ + const packageJson = { + name: appName, + version: '0.1.0', + private: true, + scripts: { + dev: 'next dev', + build: 'next build', + start: 'next start', + lint: 'next lint', + }, + dependencies: { + '@types/node': '20.6.0', + '@types/react': '18.2.21', + '@types/react-dom': '18.2.7', + eslint: '8.49.0', + 'eslint-config-next': '13.4.19', + next: '13.4.19', + react: '18.2.0', + 'react-dom': '18.2.0', + typescript: '5.2.2', + }, + }; + await fs.promises.writeFile( + path.join(root, 'package.json'), + JSON.stringify(packageJson, null, 2) + os.EOL, + ); + + /** + * These flags will be passed to `install()`, which calls the package manager + * install process. + */ + const installFlags = { packageManager, isOnline }; + + /** + * Default dependencies. + */ + // const dependencies = [ + // 'react', + // 'react-dom', + // `next${ + // process.env.NEXT_PRIVATE_TEST_VERSION ? `@${process.env.NEXT_PRIVATE_TEST_VERSION}` : '' + // }`, + // ]; + + /** + * TypeScript projects will have type definitions and other devDependencies. + */ + // if (mode === 'ts') { + // dependencies.push('typescript', '@types/react', '@types/node', '@types/react-dom'); + // } + + /** + * Install package.json dependencies if they exist. + */ + /* if (dependencies.length) { + console.log(); + console.log('Installing dependencies:'); + for (const dependency of dependencies) { + console.log(`- ${cyan(dependency)}`); + } + console.log(); + + await install(root, dependencies, installFlags); + } */ +}; + +export interface InstallTemplateArgs { + appName: string; + root: string; + packageManager: PackageManager; + isOnline: boolean; + template: TemplateType; + mode: TemplateMode; + // eslint: boolean; + // tailwind: boolean; + // srcDir: boolean; + // importAlias: string; +} diff --git a/packages/create-gnfd-app/helpers/install.ts b/packages/create-gnfd-app/helpers/install.ts new file mode 100644 index 00000000..ed3c90b3 --- /dev/null +++ b/packages/create-gnfd-app/helpers/install.ts @@ -0,0 +1,113 @@ +/* eslint-disable no-console */ +import { yellow } from 'picocolors'; +import spawn from 'cross-spawn'; +import type { PackageManager } from './get-pkg-manager'; + +interface InstallArgs { + /** + * Indicate whether to install packages using npm, pnpm or Yarn. + */ + packageManager: PackageManager; + /** + * Indicate whether there is an active Internet connection. + */ + isOnline: boolean; + /** + * Indicate whether the given dependencies are devDependencies. + */ + devDependencies?: boolean; +} + +/** + * Spawn a package manager installation with either Yarn or NPM. + * + * @returns A Promise that resolves once the installation is finished. + */ +export function install( + root: string, + dependencies: string[] | null, + { packageManager, isOnline, devDependencies }: InstallArgs, +): Promise { + /** + * (p)npm-specific command-line flags. + */ + const npmFlags: string[] = []; + /** + * Yarn-specific command-line flags. + */ + const yarnFlags: string[] = []; + /** + * Return a Promise that resolves once the installation is finished. + */ + return new Promise((resolve, reject) => { + let args: string[]; + const command = packageManager; + const useYarn = packageManager === 'yarn'; + + if (dependencies && dependencies.length) { + /** + * If there are dependencies, run a variation of `{packageManager} add`. + */ + if (useYarn) { + /** + * Call `yarn add --exact (--offline)? (-D)? ...`. + */ + args = ['add', '--exact']; + if (!isOnline) args.push('--offline'); + args.push('--cwd', root); + if (devDependencies) args.push('--dev'); + args.push(...dependencies); + } else { + /** + * Call `(p)npm install [--save|--save-dev] ...`. + */ + args = ['install', '--save-exact']; + args.push(devDependencies ? '--save-dev' : '--save'); + args.push(...dependencies); + } + } else { + /** + * If there are no dependencies, run a variation of `{packageManager} + * install`. + */ + args = ['install']; + if (!isOnline) { + console.log(yellow('You appear to be offline.')); + if (useYarn) { + console.log(yellow('Falling back to the local Yarn cache.')); + console.log(); + args.push('--offline'); + } else { + console.log(); + } + } + } + /** + * Add any package manager-specific flags. + */ + if (useYarn) { + args.push(...yarnFlags); + } else { + args.push(...npmFlags); + } + /** + * Spawn the installation process. + */ + const child = spawn(command, args, { + stdio: 'inherit', + env: { + ...process.env, + ADBLOCK: '1', + NODE_ENV: 'development', + DISABLE_OPENCOLLECTIVE: '1', + }, + }); + child.on('close', (code) => { + if (code !== 0) { + reject({ command: `${command} ${args.join(' ')}` }); + return; + } + resolve(); + }); + }); +} diff --git a/packages/create-gnfd-app/helpers/is-folder-empty.ts b/packages/create-gnfd-app/helpers/is-folder-empty.ts new file mode 100644 index 00000000..9cea216b --- /dev/null +++ b/packages/create-gnfd-app/helpers/is-folder-empty.ts @@ -0,0 +1,58 @@ +/* eslint-disable no-console */ +import { green, blue } from 'picocolors'; +import fs from 'fs'; +import path from 'path'; + +export function isFolderEmpty(root: string, name: string): boolean { + const validFiles = [ + '.DS_Store', + '.git', + '.gitattributes', + '.gitignore', + '.gitlab-ci.yml', + '.hg', + '.hgcheck', + '.hgignore', + '.idea', + '.npmignore', + '.travis.yml', + 'LICENSE', + 'Thumbs.db', + 'docs', + 'mkdocs.yml', + 'npm-debug.log', + 'yarn-debug.log', + 'yarn-error.log', + 'yarnrc.yml', + '.yarn', + ]; + + const conflicts = fs + .readdirSync(root) + .filter((file) => !validFiles.includes(file)) + // Support IntelliJ IDEA-based editors + .filter((file) => !/\.iml$/.test(file)); + + if (conflicts.length > 0) { + console.log(`The directory ${green(name)} contains files that could conflict:`); + console.log(); + for (const file of conflicts) { + try { + const stats = fs.lstatSync(path.join(root, file)); + if (stats.isDirectory()) { + console.log(` ${blue(file)}/`); + } else { + console.log(` ${file}`); + } + } catch { + console.log(` ${file}`); + } + } + console.log(); + console.log('Either try using a new directory name, or remove the files listed above.'); + console.log(); + return false; + } + + return true; +} diff --git a/packages/create-gnfd-app/helpers/is-writeable.ts b/packages/create-gnfd-app/helpers/is-writeable.ts new file mode 100644 index 00000000..32481d1a --- /dev/null +++ b/packages/create-gnfd-app/helpers/is-writeable.ts @@ -0,0 +1,14 @@ +import fs from 'fs'; + +export async function isWriteable(directory: string): Promise { + try { + await fs.promises.access(directory, (fs.constants || fs).W_OK); + return true; + } catch (err) { + return false; + } +} + +export function makeDir(root: string, options = { recursive: true }): Promise { + return fs.promises.mkdir(root, options); +} diff --git a/packages/create-gnfd-app/index.ts b/packages/create-gnfd-app/index.ts new file mode 100644 index 00000000..ffe39e12 --- /dev/null +++ b/packages/create-gnfd-app/index.ts @@ -0,0 +1,130 @@ +import prompts from '@inquirer/prompts'; +import Commander from 'commander'; +import fs, { readFileSync } from 'fs'; +import path, { resolve } from 'path'; +import { cyan, green } from 'picocolors'; +import validateNpmName from 'validate-npm-package-name'; +import { createApp } from './createApp'; +import { getPkgManager, PackageManager } from './helpers/get-pkg-manager'; +import { TemplateType } from './helpers/install-template'; +import { isFolderEmpty } from './helpers/is-folder-empty'; + +const packageJson = JSON.parse(readFileSync(resolve(__dirname, '../package.json'), 'utf-8')); +let projectPath = ''; +// const projectName = 'xxx'; + +const program = new Commander.Command(packageJson.name); +program + .version(packageJson.version) + .argument('[project-directory]') + .usage(`${green('[project-directory]')} [options]`) + .action((str) => { + projectPath = str; + }) + // .option('-n, --name ', "What's your app name?") + // .option('-i, --integer ', 'An integer argument', parseInt) + .option( + '--ts, --typescript', + ` + Initialize as a Typescript project(default) + `, + ) + .option('--use-npm', `Explicitly tell the CLI to bootstrap the application using npm`) + .option('--use-yarn', `Explicitly tell the CLI to bootstrap the application using npm`) + .option('--use-pnpm', `Explicitly tell the CLI to bootstrap the application using npm`) + .allowUnknownOption() + .parse(process.argv); + +const { useYarn, useNpm, usePnpm } = program.opts(); +const packageManager: PackageManager = !!useNpm + ? 'npm' + : !!usePnpm + ? 'pnpm' + : !!useYarn + ? 'yarn' + : getPkgManager(); + +// console.log('packageManager', packageManager); +// console.log('projectPath', projectPath); +// console.log(program.name()); +// console.log(program.opts()); + +async function runInitPrompts(): Promise { + if (!projectPath) { + projectPath = await prompts.input({ + message: 'What is your project named?', + validate: (val) => { + const { validForNewPackages } = validateNpmName(val); + if (!validForNewPackages) { + return 'Invalid NPM name'; + } + return true; + }, + }); + + projectPath = projectPath.trim(); + } + + if (!projectPath) { + /* eslint-disable-next-line no-console */ + console.log( + '\nPlease specify the project directory:\n' + + ` ${cyan(program.name())} ${green('')}\n` + + 'For example:\n' + + ` ${cyan(program.name())} ${green('my-next-app')}\n\n` + + `Run ${cyan(`${program.name()} --help`)} to see all options.`, + ); + process.exit(1); + } + + const template: TemplateType = await prompts.select({ + message: 'select a template?', + choices: [ + { name: 'nextjs', value: 'nextjs' }, + { name: 'create-react-app', value: 'cra' }, + ], + }); + + // console.log('template', template); + + const resolvedProjectPath = path.resolve(projectPath); + // const projectName = path.basename(resolvedProjectPath); + + const root = path.resolve(resolvedProjectPath); + // console.log('root', root); + + // console.log('resolvedProjectPath', resolvedProjectPath); + // console.log('projectName', projectName); + + const appName = path.basename(root); + const folderExists = fs.existsSync(root); + + // console.log('appName', appName); + // console.log('folderExists', folderExists); + + if (folderExists && !isFolderEmpty(root, appName)) { + process.exit(1); + } + + try { + await createApp({ + appPath: resolvedProjectPath, + packageManager, + template, + // example: example && example !== 'default' ? example : undefined, + // examplePath: program.examplePath, + // typescript: program.typescript, + // tailwind: program.tailwind, + // eslint: program.eslint, + // appRouter: program.app, + // srcDir: program.srcDir, + // importAlias: program.importAlias, + }); + } catch (reason) { + // . + } +} + +runInitPrompts().catch(() => { + // ignore error +}); diff --git a/packages/create-gnfd-app/package.json b/packages/create-gnfd-app/package.json new file mode 100644 index 00000000..f92ad000 --- /dev/null +++ b/packages/create-gnfd-app/package.json @@ -0,0 +1,45 @@ +{ + "name": "@bnb-chain/create-gnfd-app", + "version": "0.0.1", + "description": "help you create greenfield project quickly", + "main": "index.js", + "bin": { + "create-gnfd-app": "./dist/index.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/bnb-chain/greenfield-js-sdk", + "directory": "packages/create-gnfd-app" + }, + "homepage": "https://github.com/bnb-chain/greenfield-js-sdk/packages/create-gnfd-app#readme", + "scripts": { + "dev": "rollup -cw", + "build": "rollup -c" + }, + "keywords": [ + "greenfield", + "quickstart", + "create-app" + ], + "author": "", + "license": "MIT", + "dependencies": { + "@inquirer/prompts": "^3.1.1", + "async-sema": "^3.1.1", + "commander": "^11.0.0", + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.1", + "fs-extra": "^11.1.1", + "picocolors": "^1.0.0", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": ">=16.14.0" + }, + "devDependencies": { + "@types/cross-spawn": "^6.0.3", + "@types/fs-extra": "^11.0.1", + "@types/validate-npm-package-name": "^4.0.0", + "rollup-plugin-copy": "^3.5.0" + } +} diff --git a/packages/create-gnfd-app/rollup.config.js b/packages/create-gnfd-app/rollup.config.js new file mode 100644 index 00000000..b15a92de --- /dev/null +++ b/packages/create-gnfd-app/rollup.config.js @@ -0,0 +1,44 @@ +import commonjs from '@rollup/plugin-commonjs'; +import typescript from '@rollup/plugin-typescript'; +import nodePolyfills from 'rollup-plugin-polyfill-node'; +import copy from 'rollup-plugin-copy'; +import autoExternal from 'rollup-plugin-auto-external'; +import pkg from './package.json'; + +function resolveExternal() { + return [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})]; +} + +export default async () => { + return [ + { + input: './index.ts', + output: { + dir: './dist', + format: 'cjs', + banner: '#!/usr/bin/env node', + }, + external: resolveExternal(), + plugins: [ + autoExternal(), + nodePolyfills({ + include: 'node_modules/**', + }), + commonjs({ + ignoreDynamicRequires: true, + }), + typescript({ + tsconfig: './tsconfig.json', + }), + copy({ + targets: [ + { + src: './templates', + dest: './dist', + }, + ], + }), + ], + }, + ]; +}; diff --git a/packages/create-gnfd-app/templates/cra/ts/README.md b/packages/create-gnfd-app/templates/cra/ts/README.md new file mode 100644 index 00000000..72a15fdd --- /dev/null +++ b/packages/create-gnfd-app/templates/cra/ts/README.md @@ -0,0 +1 @@ +# Greenfield App diff --git a/packages/create-gnfd-app/templates/nextjs/ts/README.md b/packages/create-gnfd-app/templates/nextjs/ts/README.md new file mode 100644 index 00000000..72a15fdd --- /dev/null +++ b/packages/create-gnfd-app/templates/nextjs/ts/README.md @@ -0,0 +1 @@ +# Greenfield App diff --git a/packages/create-gnfd-app/tsconfig.json b/packages/create-gnfd-app/tsconfig.json new file mode 100644 index 00000000..3a219a20 --- /dev/null +++ b/packages/create-gnfd-app/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es2019", + "moduleResolution": "node", + "strict": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "skipLibCheck": false + }, + "exclude": [ + "templates", + "dist" + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ebb0a463..ce071632 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,18 @@ importers: rimraf: specifier: ^3.0.2 version: 3.0.2 + rollup: + specifier: ^2.79.1 + version: 2.79.1 + rollup-plugin-auto-external: + specifier: ^2.0.0 + version: 2.0.0(rollup@2.79.1) + rollup-plugin-polyfill-node: + specifier: ^0.10.2 + version: 0.10.2(rollup@2.79.1) + rollup-plugin-terser: + specifier: ^7.0.2 + version: 7.0.2(rollup@2.79.1) examples/nextjs: dependencies: @@ -290,18 +302,6 @@ importers: mime: specifier: ^3.0.0 version: 3.0.0 - rollup: - specifier: ^2.79.1 - version: 2.79.1 - rollup-plugin-auto-external: - specifier: ^2.0.0 - version: 2.0.0(rollup@2.79.1) - rollup-plugin-polyfill-node: - specifier: ^0.10.2 - version: 0.10.2(rollup@2.79.1) - rollup-plugin-terser: - specifier: ^7.0.2 - version: 7.0.2(rollup@2.79.1) ts-jest: specifier: ^29.1.0 version: 29.1.0(@babel/core@7.22.15)(jest@29.5.0)(typescript@4.9.5) @@ -315,6 +315,46 @@ importers: specifier: ^4.9.5 version: 4.9.5 + packages/create-gnfd-app: + dependencies: + '@inquirer/prompts': + specifier: ^3.1.1 + version: 3.1.1 + async-sema: + specifier: ^3.1.1 + version: 3.1.1 + commander: + specifier: ^11.0.0 + version: 11.0.0 + cross-spawn: + specifier: ^7.0.3 + version: 7.0.3 + fast-glob: + specifier: ^3.3.1 + version: 3.3.1 + fs-extra: + specifier: ^11.1.1 + version: 11.1.1 + picocolors: + specifier: ^1.0.0 + version: 1.0.0 + validate-npm-package-name: + specifier: ^5.0.0 + version: 5.0.0 + devDependencies: + '@types/cross-spawn': + specifier: ^6.0.3 + version: 6.0.3 + '@types/fs-extra': + specifier: ^11.0.1 + version: 11.0.1 + '@types/validate-npm-package-name': + specifier: ^4.0.0 + version: 4.0.0 + rollup-plugin-copy: + specifier: ^3.5.0 + version: 3.5.0 + packages/file-handle: devDependencies: clean-webpack-plugin: @@ -2982,6 +3022,125 @@ packages: /@humanwhocodes/object-schema@1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@inquirer/checkbox@1.3.11: + resolution: {integrity: sha512-SaQBDr7niZQzoP5Mqzak5pQY7476mvf4Sj2V8VFrbFHWHsavy3nKGKEOgijNHy151bEgqDog1829g/pKa9Qcrw==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + figures: 3.2.0 + dev: false + + /@inquirer/confirm@2.0.12: + resolution: {integrity: sha512-Oxz3L0ti+0nWYHPPUIrPkxA2KnQZUGBHnk56yF5RjKqPGFrwvgLZdIXNe/w4I/OtdLeOBqHCrJ+kCvNvHVdk9g==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + chalk: 4.1.2 + dev: false + + /@inquirer/core@5.0.0: + resolution: {integrity: sha512-q2o4BcANKFyuUI5V6ejmPs1f9SdbJxfnLmhQVb72Fj7hOudoKsJpByJZ0imv9a/rpKDogA+93vtBBMqsnS7/Fg==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/type': 1.1.4 + '@types/mute-stream': 0.0.1 + '@types/node': 20.6.0 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-spinners: 2.9.0 + cli-width: 4.1.0 + figures: 3.2.0 + mute-stream: 1.0.0 + run-async: 3.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: false + + /@inquirer/editor@1.2.10: + resolution: {integrity: sha512-aluYpazbxIdM54L+xNmVHzOjoXGwkliTCvHxhtPg6itmqDGMVmU1z+T2akHt6Xnx9RyrTpbumFB4xn1iI0UfnA==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + chalk: 4.1.2 + external-editor: 3.1.0 + dev: false + + /@inquirer/expand@1.1.11: + resolution: {integrity: sha512-GSZJbYKPBniyXgWeFLsqiv7TSK9QjpQqCr+i/85Yts3wwixXTrAeoqM3TVVgHO/3j+xeFcuhOm1wy/F2QY5aEg==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + chalk: 4.1.2 + figures: 3.2.0 + dev: false + + /@inquirer/input@1.2.11: + resolution: {integrity: sha512-sV1nO6+RxMFTHAznmxMkbMkjGQ8NGMWr0mvXjU35YQ0OFEL+YlD+DPbNd9s3ltnswODZAcnM1yFvdko3S/Kj/w==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + chalk: 4.1.2 + dev: false + + /@inquirer/password@1.1.11: + resolution: {integrity: sha512-r2eiLMlTuY+k+yJf6XLbnAEz7EDyWdjOrgVAWjSKoEDBc3T9/rq2I+7WiY9FUFArYY/1LxmsNWavs5NuMICx8Q==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/input': 1.2.11 + '@inquirer/type': 1.1.4 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + dev: false + + /@inquirer/prompts@3.1.1: + resolution: {integrity: sha512-7m/7Q4eupJYmn0GxM1H1dcekE4F4YlIB6bSKZs2SVeShARYUVPiAKFZ9c15UzYnBtdjCv4zXI17jbNtCNqmxGQ==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/checkbox': 1.3.11 + '@inquirer/confirm': 2.0.12 + '@inquirer/core': 5.0.0 + '@inquirer/editor': 1.2.10 + '@inquirer/expand': 1.1.11 + '@inquirer/input': 1.2.11 + '@inquirer/password': 1.1.11 + '@inquirer/rawlist': 1.2.11 + '@inquirer/select': 1.2.11 + dev: false + + /@inquirer/rawlist@1.2.11: + resolution: {integrity: sha512-4S2t2pCCR3VgyB3lbPKoiJ9020HHAi9g4M+DIyXHYwGE++7wURAwKkzb6v78fS0yKfCbyFt3BTcL2UffQRQ9Fg==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + chalk: 4.1.2 + dev: false + + /@inquirer/select@1.2.11: + resolution: {integrity: sha512-LH2wzAsWfu/+wcapeht07zTDefuvGTpv0+9dCAQ68QigF+4gHzpWq5+AbBLbxzuH2Wz4WlHcti85nFUPPM1t3A==} + engines: {node: '>=14.18.0'} + dependencies: + '@inquirer/core': 5.0.0 + '@inquirer/type': 1.1.4 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + figures: 3.2.0 + dev: false + + /@inquirer/type@1.1.4: + resolution: {integrity: sha512-a6+RCiXBQEbiA73RT1pBfwiH2I+MPcoZoGKuuUYFkws+6ud7nb5kUQGHFGUSBim25IyVMT/mqbWIrkxetcIb/w==} + engines: {node: '>=14.18.0'} + dev: false + /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -4160,6 +4319,12 @@ packages: '@types/node': 18.16.18 dev: false + /@types/cross-spawn@6.0.3: + resolution: {integrity: sha512-BDAkU7WHHRHnvBf5z89lcvACsvkz/n7Tv+HyD/uW76O29HoH1Tk/W6iQrepaZVbisvlEek4ygwT8IW7ow9XLAA==} + dependencies: + '@types/node': 18.16.18 + dev: true + /@types/debug@4.1.7: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} dependencies: @@ -4188,6 +4353,19 @@ packages: resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} dev: true + /@types/fs-extra@11.0.1: + resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} + dependencies: + '@types/jsonfile': 6.1.1 + '@types/node': 18.16.18 + dev: true + + /@types/fs-extra@8.1.2: + resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} + dependencies: + '@types/node': 18.16.18 + dev: true + /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: @@ -4237,6 +4415,12 @@ packages: /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + /@types/jsonfile@6.1.1: + resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} + dependencies: + '@types/node': 18.16.18 + dev: true + /@types/lodash.clonedeep@4.5.7: resolution: {integrity: sha512-ccNqkPptFIXrpVqUECi60/DFxjNKsfoQxSQsgcBJCX/fuX1wgyQieojkcWH/KpE3xzLoWN/2k+ZeGqIN3paSvw==} dependencies: @@ -4283,12 +4467,22 @@ packages: resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} dev: false + /@types/mute-stream@0.0.1: + resolution: {integrity: sha512-0yQLzYhCqGz7CQPE3iDmYjhb7KMBFOP+tBkyw+/Y2YyDI5wpS7itXXxneN1zSsUwWx3Ji6YiVYrhAnpQGS/vkw==} + dependencies: + '@types/node': 18.16.18 + dev: false + /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} /@types/node@18.16.18: resolution: {integrity: sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==} + /@types/node@20.6.0: + resolution: {integrity: sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==} + dev: false + /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -4353,6 +4547,14 @@ packages: resolution: {integrity: sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==} dev: false + /@types/validate-npm-package-name@4.0.0: + resolution: {integrity: sha512-RpO62vB2lkjEkyLbwTheA2+uwYmtVMWTr/kWRI++UAgVdZqNqdAuIQl/SxBCGeMKfdjWaXPbyhZbiCc4PAj+KA==} + dev: true + + /@types/wrap-ansi@3.0.0: + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + dev: false + /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: @@ -5348,7 +5550,6 @@ packages: engines: {node: '>=8'} dependencies: type-fest: 0.21.3 - dev: true /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} @@ -5493,6 +5694,10 @@ packages: tslib: 2.5.2 dev: false + /async-sema@3.1.1: + resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} + dev: false + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false @@ -5868,6 +6073,12 @@ packages: semver: 6.3.1 dev: true + /builtins@5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} + dependencies: + semver: 7.5.2 + dev: false + /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -5944,7 +6155,6 @@ packages: /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - dev: true /check-error@1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} @@ -6008,6 +6218,11 @@ packages: restore-cursor: 3.1.0 dev: true + /cli-spinners@2.9.0: + resolution: {integrity: sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==} + engines: {node: '>=6'} + dev: false + /cli-truncate@2.1.0: resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} engines: {node: '>=8'} @@ -6024,6 +6239,11 @@ packages: string-width: 5.1.2 dev: true + /cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + dev: false + /client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} dev: false @@ -6102,6 +6322,10 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + /colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + dev: true + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true @@ -6118,6 +6342,11 @@ packages: engines: {node: '>=14'} dev: true + /commander@11.0.0: + resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} + engines: {node: '>=16'} + dev: false + /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -7396,7 +7625,6 @@ packages: chardet: 0.7.0 iconv-lite: 0.4.24 tmp: 0.0.33 - dev: true /eyes@0.1.8: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} @@ -7420,6 +7648,16 @@ packages: merge2: 1.4.1 micromatch: 4.0.5 + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -7462,6 +7700,13 @@ packages: bser: 2.1.1 dev: true + /figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + dependencies: + escape-string-regexp: 1.0.5 + dev: false + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -7550,7 +7795,6 @@ packages: graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.0 - dev: true /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} @@ -7727,6 +7971,20 @@ packages: /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + /globby@10.0.1: + resolution: {integrity: sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==} + engines: {node: '>=8'} + dependencies: + '@types/glob': 7.2.0 + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.1 + glob: 7.2.3 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -7901,7 +8159,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: true /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -8146,6 +8403,11 @@ packages: isobject: 3.0.1 dev: true + /is-plain-object@3.0.1: + resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==} + engines: {node: '>=0.10.0'} + dev: true + /is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: @@ -8859,7 +9121,6 @@ packages: universalify: 2.0.0 optionalDependencies: graceful-fs: 4.2.11 - dev: true /jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} @@ -9391,6 +9652,11 @@ packages: resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} dev: false + /mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: false + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -9625,7 +9891,6 @@ packages: /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} - dev: true /outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} @@ -10352,6 +10617,17 @@ packages: semver: 5.7.1 dev: true + /rollup-plugin-copy@3.5.0: + resolution: {integrity: sha512-wI8D5dvYovRMx/YYKtUNt3Yxaw4ORC9xo6Gt9t22kveWz1enG9QrhVlagzwrxSC455xD1dHMKhIJkbsQ7d48BA==} + engines: {node: '>=8.3'} + dependencies: + '@types/fs-extra': 8.1.2 + colorette: 1.4.0 + fs-extra: 8.1.0 + globby: 10.0.1 + is-plain-object: 3.0.1 + dev: true + /rollup-plugin-polyfill-node@0.10.2(rollup@2.79.1): resolution: {integrity: sha512-5GMywXiLiuQP6ZzED/LO/Q0HyDi2W6b8VN+Zd3oB0opIjyRs494Me2ZMaqKWDNbGiW4jvvzl6L2n4zRgxS9cSQ==} peerDependencies: @@ -10394,6 +10670,11 @@ packages: utf-8-validate: 5.0.10 dev: false + /run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + dev: false + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -10437,7 +10718,6 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true /scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} @@ -10592,6 +10872,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: false + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -11041,7 +11326,6 @@ packages: engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 - dev: true /tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -11214,7 +11498,6 @@ packages: /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - dev: true /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} @@ -11295,7 +11578,6 @@ packages: /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} - dev: true /update-browserslist-db@1.0.11(browserslist@4.21.10): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} @@ -11397,6 +11679,13 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /validate-npm-package-name@5.0.0: + resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + builtins: 5.0.1 + dev: false + /valtio@1.10.6(react@18.2.0): resolution: {integrity: sha512-SxN1bHUmdhW6V8qsQTpCgJEwp7uHbntuH0S9cdLQtiohuevwBksbpXjwj5uDMA7bLwg1WKyq9sEpZrx3TIMrkA==} engines: {node: '>=12.20.0'}