From c28429de2f37c9338eb9af37bb980b50000a843e Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Wed, 14 Jun 2023 21:20:45 -0500 Subject: [PATCH] feat: initial commit modular configuration, db service works --- .gitignore | 1 + .tool-versions | 2 + config.example.yml | 13 +- package.json | 9 +- src/cmd.js | 17 +- src/config.js | 164 +++++-- src/entry.sh | 17 + src/index.js | 40 +- src/net.js | 6 + src/service/db.js | 45 ++ src/service/linux-user.js | 133 ++++++ src/system.js | 74 ++++ test/config.js | 346 +++++++++++++++ yarn.lock | 890 ++++++++++++++++++++++++++++++++++++++ 14 files changed, 1696 insertions(+), 61 deletions(-) create mode 100644 .tool-versions create mode 100755 src/entry.sh create mode 100644 src/net.js create mode 100644 src/service/db.js create mode 100644 src/service/linux-user.js create mode 100644 src/system.js create mode 100644 test/config.js diff --git a/.gitignore b/.gitignore index 05b3370..13a96fa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ config.yml config.*.yml !config.example.yml node_modules +tmp diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..31c86c5 --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +node 20.2.0 +postgres 15.3 diff --git a/config.example.yml b/config.example.yml index 4c0e0c5..e3e6818 100644 --- a/config.example.yml +++ b/config.example.yml @@ -2,23 +2,24 @@ linux_user: username: 'foo_db' allowed_ssh_public_keys: ['ssh-ed25519 my special ssh key'] - # files not listed will be deleted when script is re-run. - # relative paths are resolved from /home/ - persist: ['data'] + # files not listed will be deleted when script is re-run. + # relative paths are resolved from /home/ + persist: ['data'] network: # valid values for interface: ['public', 'local'] interface: 'public' port: 1 domain: 'db.foo.org' ssl: false - pg_admin: + postgres: username: 'postgres' password: 'password' + data_dir: '/home/foo_db/data' - api: linux_user: username: 'foo_api' allowed_ssh_public_keys: ['ssh-ed25519 my special ssh key'] - persist: [] + persist: [] network: interface: 'public' port: 2 @@ -28,7 +29,7 @@ linux_user: username: 'foo_ui' allowed_ssh_public_keys: ['ssh-ed25519 my special ssh key'] - persist: [] + persist: [] network: interface: 'public' port: 3 diff --git a/package.json b/package.json index c0023cb..094c9e9 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,9 @@ "author": "Orion Kindel ", "license": "MIT", "scripts": { - "fmt:check": "prettier --check 'src/**/*.js'", - "fmt": "prettier --write 'src/**/*.js'" + "fmt:check": "prettier --check src/**/*.js test/**/*.js", + "fmt": "prettier --write src/**/*.js test/**/*.js", + "test": "ava" }, "dependencies": { "@matchbook/ts": "^1.0.0", @@ -16,6 +17,10 @@ "yaml": "^2.3.1" }, "devDependencies": { + "ava": "^5.3.0", "prettier": "^2.8.8" + }, + "ava": { + "files": ["test/**/*"] } } diff --git a/src/cmd.js b/src/cmd.js index fdee471..b64aefc 100644 --- a/src/cmd.js +++ b/src/cmd.js @@ -2,6 +2,8 @@ const Either = require('fp-ts/Either') const { pipe, identity: id } = require('fp-ts/function') const cp = require('child_process') +const System = require('./system.js') + const run = script => pipe( Either.tryCatch( @@ -16,7 +18,18 @@ const run = script => ) : Either.right(o), ), - Either.map(o => o.stdout.trim()), + ) + +const doas = (user, script) => + run( + [ + 'script=$(', + 'cat << "EOSCRIPT"', + script, + 'EOSCRIPT', + ')', + `ssh -F /dev/null -o IdentitiesOnly=yes -i ${System.localSshKeyPath} ${user}@localhost "set -xo pipefail; $script"`, + ].join('\n'), ) const ignoringStatus = Either.orElse(e => @@ -31,4 +44,4 @@ const ignoringStatus = Either.orElse(e => ), ) -module.exports = { run, ignoringStatus } +module.exports = { run, doas, ignoringStatus } diff --git a/src/config.js b/src/config.js index 83c18e4..ba18c39 100644 --- a/src/config.js +++ b/src/config.js @@ -1,28 +1,94 @@ +const path = require('path') const yaml = require('yaml') const { strike, match, otherwise } = require('@matchbook/ts') const Array_ = require('fp-ts/Array') const Either = require('fp-ts/Either') const { identity: id, flow, pipe } = require('fp-ts/function') -const parseSegmentLinuxUser = o => - 'linux_user' in o - ? 'username' in o.linux_user - ? Either.right({ - username: o.linux_user.username.trim(), - allowedSshPublicKeys: (o.allowed_ssh_public_keys || []).map(pubkey => - pubkey.trim(), - ), - }) - : Either.left(new Error('linux_user.username required')) - : Either.left(new Error('linux_user required')) +const Net = require('./net.js') -const parseSegmentPgAdmin = flow( +const parseSegmentLinuxUser = flow( o => - 'pg_admin' in o - ? Either.right(o.pg_admin) + 'linux_user' in o + ? Either.right(o.linux_user) : Either.left( new Error( - ['pg_admin required', `in: ${JSON.stringify(o)}`].join('\n'), + ['linux_user required', `in: ${yaml.stringify(o)}`].join('\n'), + ), + ), + Either.flatMap(lx => + 'username' in lx + ? Either.right({ + ...lx, + username: lx.username.trim(), + homeDir: `/home/${lx.username.trim()}`, + persistDir: `/tmp`, + }) + : Either.left( + new Error( + ['linux_user.username required', `in: ${yaml.stringify(lx)}`].join( + '\n', + ), + ), + ), + ), + Either.map(lx => ({ + ...lx, + persist: (lx.persist || []).map(p => + path.isAbsolute(p) ? p : path.join(lx.homeDir, p.trim()), + ), + })), + Either.flatMap(lx => + !'persist' in lx || + ('persist' in lx && + lx.persist.every(p => path.dirname(p).startsWith(lx.homeDir))) + ? Either.right(lx) + : Either.left( + new Error( + [ + `all paths in linux_user.persist must be subpaths of ${lx.homeDir}`, + `in: ${yaml.stringify(lx)}`, + ].join('\n'), + ), + ), + ), + Either.map(lx => ({ + username: lx.username, + homeDir: lx.homeDir, + persistDir: lx.persistDir, + persist: lx.persist, + allowedSshPublicKeys: (lx.allowed_ssh_public_keys || []).map(p => p.trim()), + })), +) + +const parseSegmentPostgres = (cfg, linuxUser) => pipe( + 'postgres' in cfg + ? Either.right(cfg.postgres) + : Either.left( + new Error( + ['postgres required', `in: ${yaml.stringify(cfg)}`].join('\n'), + ), + ), + Either.map(pg => ({ + ...pg, + data_dir: pg.data_dir || './data', + })), + Either.map(pg => ({ + ...pg, + data_dir: path.isAbsolute(pg.data_dir) + ? pg.data_dir + : path.join(linuxUser.homeDir, pg.data_dir.trim()), + })), + Either.flatMap(pg => + path.dirname(pg.data_dir).startsWith(linuxUser.homeDir) + ? Either.right(pg) + : Either.left( + new Error( + [ + `postgres.data_dir must be a subpath of ${linuxUser.homeDir}`, + `in: ${yaml.stringify(pg)}`, + ].join('\n'), + ), ), ), Either.flatMap(pg => @@ -30,7 +96,7 @@ const parseSegmentPgAdmin = flow( ? Either.right(pg) : Either.left( new Error( - ['pg_admin.username required', `in: ${JSON.stringify(pg)}`].join( + ['postgres.username required', `in: ${yaml.stringify(pg)}`].join( '\n', ), ), @@ -41,7 +107,7 @@ const parseSegmentPgAdmin = flow( ? Either.right(pg) : Either.left( new Error( - ['pg_admin.password required', `in: ${JSON.stringify(pg)}`].join( + ['postgres.password required', `in: ${yaml.stringify(pg)}`].join( '\n', ), ), @@ -50,6 +116,7 @@ const parseSegmentPgAdmin = flow( Either.map(pg => ({ username: pg.username.trim(), password: pg.password.trim(), + dataDir: pg.data_dir, })), ) @@ -59,7 +126,7 @@ const parseSegmentNetwork = flow( ? Either.right(o.network) : Either.left( new Error( - ['network required', `in: ${JSON.stringify(o)}`].join('\n'), + ['network required', `in: ${yaml.stringify(o)}`].join('\n'), ), ), Either.flatMap(n => @@ -69,7 +136,7 @@ const parseSegmentNetwork = flow( new Error( [ "network.interface required, and must be 'public' or 'local'", - `in: ${JSON.stringify(n)}`, + `in: ${yaml.stringify(n)}`, ].join('\n'), ), ), @@ -81,34 +148,35 @@ const parseSegmentNetwork = flow( new Error( [ 'network.port required and must be an integer', - `in: ${JSON.stringify(n)}`, + `in: ${yaml.stringify(n)}`, ].join('\n'), ), ), ), Either.flatMap(n => - n.interface === 'public' || (n.interface === 'local' && !'domain' in n) + n.interface === 'public' || (n.interface === 'local' && !n.domain) ? Either.right(n) : Either.left( new Error( [ "network.interface is 'local', network.domain must not be present.", - `in: ${JSON.stringify(n)}`, + `in: ${yaml.stringify(n)}`, ].join('\n'), ), ), ), Either.flatMap(n => - n.interface === 'public' && - 'domain' in n && - typeof n.domain === 'string' && - n.domain.length > 0 + n.interface === 'local' || + (n.interface === 'public' && + 'domain' in n && + typeof n.domain === 'string' && + n.domain.length > 0) ? Either.right(n) : Either.left( new Error( [ "network.interface is 'public', network.domain be set to a value.", - `in: ${JSON.stringify(n)}`, + `in: ${yaml.stringify(n)}`, ].join('\n'), ), ), @@ -120,7 +188,7 @@ const parseSegmentNetwork = flow( new Error( [ 'network.ssl required and must be a bool', - `in: ${JSON.stringify(n)}`, + `in: ${yaml.stringify(n)}`, ].join('\n'), ), ), @@ -129,6 +197,8 @@ const parseSegmentNetwork = flow( ssl: n.ssl, domain: (n.domain || '').trim(), interface: n.interface, + interfaceIp: + n.interface === 'local' ? Net.localInterfaceIp : Net.publicInterfaceIp, port: n.port, })), ) @@ -136,49 +206,46 @@ const parseSegmentNetwork = flow( const parseServiceDb = svc => pipe( Either.Do, + Either.let('serviceType', () => 'db'), Either.bind('linuxUser', () => parseSegmentLinuxUser(svc)), - Either.let('persist', () => - (svc.persist || []).filter(s => typeof s === 'string' && s.length > 0), - ), Either.bind('network', () => parseSegmentNetwork(svc)), - Either.bind('pgAdmin', () => parseSegmentPgAdmin(svc)), + Either.bind('postgres', ({linuxUser}) => parseSegmentPostgres(svc, linuxUser)), ) const parseServiceApi = svc => pipe( Either.Do, + Either.let('serviceType', () => 'api'), Either.bind('linuxUser', () => parseSegmentLinuxUser(svc)), - Either.let('persist', () => - (svc.persist || []).filter(s => typeof s === 'string' && s.length > 0), - ), Either.bind('network', () => parseSegmentNetwork(svc)), ) const parseServiceUi = svc => pipe( Either.Do, + Either.let('serviceType', () => 'ui'), Either.bind('linuxUser', () => parseSegmentLinuxUser(svc)), - Either.let('persist', () => - (svc.persist || []).filter(s => typeof s === 'string' && s.length > 0), - ), Either.bind('network', () => parseSegmentNetwork(svc)), ) +const badService = svc => + new Error( + [ + `top-level array elements must be records with a key named "db", "ui", or "api".`, + `in: ${yaml.stringify(svc)}`, + ].join('\n'), + ) + const parseService = svc => - 'db' in svc + typeof svc !== 'object' + ? Either.left(badService(svc)) + : 'db' in svc ? parseServiceDb(svc.db) : 'api' in svc ? parseServiceApi(svc.api) : 'ui' in svc ? parseServiceUi(svc.ui) - : Either.left( - new Error( - [ - `top-level array elements must be records with a key named "db", "ui", or "api".`, - `in: ${JSON.stringify(svc)}`, - ].join('\n'), - ), - ) + : Either.left(badService(svc)) const ensureUniq = ({ getWith, onConflict, isConflict }) => @@ -195,6 +262,7 @@ const ensureUniq = ), Either.map(() => array), ) + const ensureServicesDoNotOverlap = flow( ensureUniq({ getWith: s => s.linuxUser.username, @@ -213,7 +281,7 @@ const ensureServicesDoNotOverlap = flow( getWith: s => s.network.domain, onConflict: domain => new Error(`network.domain must be unique: ${domain}`), - isConflict: (seen, cur) => seen.includes(cur), + isConflict: (seen, cur) => cur && seen.includes(cur), }), ), ) diff --git a/src/entry.sh b/src/entry.sh new file mode 100755 index 0000000..d546d1b --- /dev/null +++ b/src/entry.sh @@ -0,0 +1,17 @@ +#! /bin/sh +apt-get update -y 1>/dev/null + +if [ ! -x /usr/bin/curl ]; then + apt-get install -y curl bash 1>/dev/null +fi + +if [ ! -x /usr/bin/node ]; then + (curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs) 1>/dev/null +fi + +if [ ! -x /usr/local/bin/yarn ]; then + npm install --global yarn 1>/dev/null +fi + +yarn install 1>/dev/null +node src/index.js diff --git a/src/index.js b/src/index.js index 39ed27b..aa0f9c9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,41 @@ -const Config = require('./config.js') -const Cmd = require('./cmd.js') const fs = require('fs') + const { pipe } = require('fp-ts/function') +const Applicative = require('fp-ts/Applicative') +const Array_ = require('fp-ts/Array') const Either = require('fp-ts/Either') -pipe(Cmd.run('cat ./config.example.yml'), Either.flatMap(Config.parse)) +const System = require('./system.js') +const DbService = require('./service/db.js') +const Config = require('./config.js') +const Cmd = require('./cmd.js') + +pipe( + Cmd.run('cat ./config.yml'), + Either.map(({stdout}) => stdout), + Either.flatMap(Config.parse), + Either.map(svcs => + svcs.reduce( + (steps, svc) => + svc.serviceType === 'db' ? [...steps, ...DbService.steps(svc)] : steps, + [System.step], + ), + ), + Either.flatMap(steps => + Array_.reverse(steps).reduce((a, step) => { + if (step.down) { + console.log(step.down.label) + return Either.flatMap(step.down.work)(a) + } else { + return a; + } + }, Either.right(steps)), + ), + Either.flatMap(steps => + steps.reduce((a, step) => { + console.log(step.up.label) + return Either.flatMap(step.up.work)(a) + }, Either.right(steps)), + ), + Either.getOrElse(e => {throw e;}) +) diff --git a/src/net.js b/src/net.js new file mode 100644 index 0000000..af78c0c --- /dev/null +++ b/src/net.js @@ -0,0 +1,6 @@ +const Cmd = require('./cmd.js') + +const inaddrAny = '0.0.0.0' +const inaddrLoopback = '127.0.0.1' + +module.exports = {publicInterfaceIp: inaddrAny, localInterfaceIp: inaddrLoopback} diff --git a/src/service/db.js b/src/service/db.js new file mode 100644 index 0000000..bfa0322 --- /dev/null +++ b/src/service/db.js @@ -0,0 +1,45 @@ +const yaml = require('yaml') +const { pipe } = require('fp-ts/function') +const Either = require('fp-ts/Either') + +const Cmd = require('../cmd.js') +const LinuxUser = require('./linux-user.js') + +const dockerCompose = cfg => yaml.stringify({ + services: { + db: { + image: 'postgres:15.3', + // restart: always will start the container on system startup / reboot if + // docker.service enabled (see ./linux-user.js) + restart: 'always', + volumes: [`${cfg.postgres.dataDir}:/var/lib/postgres/data`], + ports: [`${cfg.network.interfaceIp}:${cfg.network.port}:5432`], + environment: { + POSTGRES_USER: cfg.postgres.username, + POSTGRES_PASSWORD: cfg.postgres.password, + }, + } + }, +}) + +const steps = cfg => [ + LinuxUser.step(cfg), + { + up: { + label: `${cfg.linuxUser.username}: create db on ${cfg.network.interfaceIp}:${cfg.network.port}`, + work: (a) => pipe( + Cmd.doas(cfg.linuxUser.username, [ + 'set -x', + 'cat << "EOCOMPOSE" > ~/docker-compose.yaml', + dockerCompose(cfg), + 'EOCOMPOSE', + 'docker compose up -d', + ].join('\n')), + Either.map(() => a), + ), + }, + // down handled by LinuxUser killing user processes + } +] + +module.exports = { steps } diff --git a/src/service/linux-user.js b/src/service/linux-user.js new file mode 100644 index 0000000..dadd9e6 --- /dev/null +++ b/src/service/linux-user.js @@ -0,0 +1,133 @@ +const path = require('path') + +const { pipe } = require('fp-ts/function') +const Either = require('fp-ts/Either') +const NEArray = require('fp-ts/NonEmptyArray') +const Array_ = require('fp-ts/Array') + +const System = require('../system.js') +const Cmd = require('../cmd.js') + +const userCreated = cfg => + Cmd.run(`useradd --create-home --shell /bin/bash ${cfg.linuxUser.username}`) + +const userSessionsLinger = cfg => + Cmd.run(`loginctl enable-linger ${cfg.linuxUser.username}`) + +const persistedStateRestored = cfg => + Cmd.run( + [ + // if /tmp/home/foo exists, copy /tmp/home/foo/* to /home/foo + `if [[ -d ${path.join( + cfg.linuxUser.persistDir, + cfg.linuxUser.homeDir, + )} ]]; then`, + ` cp -R ${path.join( + cfg.linuxUser.persistDir, + cfg.linuxUser.homeDir, + )}/* ${cfg.linuxUser.homeDir}`, + ` rm -r ${path.join(cfg.linuxUser.persistDir, cfg.linuxUser.homeDir)}`, + ` chown -R ${cfg.linuxUser.username}:${cfg.linuxUser.username} ${cfg.linuxUser.homeDir}`, + `fi`, + ].join('\n'), + ) + +const sshAllowed = cfg => + Cmd.run( + [ + `mkdir -p ${cfg.linuxUser.homeDir}/.ssh`, + `cp ${System.localSshPubKeyPath} ${cfg.linuxUser.homeDir}/.ssh/authorized_keys`, + ...cfg.linuxUser.allowedSshPublicKeys.map( + pubkey => + `echo '${pubkey}' >> ${cfg.linuxUser.homeDir}/.ssh/authorized_keys`, + ), + `chown -R ${cfg.linuxUser.username}:${cfg.linuxUser.username} ${cfg.linuxUser.homeDir}/.ssh`, + `chmod 600 ${cfg.linuxUser.homeDir}/.ssh/authorized_keys`, + ].join('\n'), + ) + +const bashrcHasPath = cfg => + Cmd.doas( + cfg.linuxUser.username, + [ + `echo "export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" > ~/.bashrc`, + `echo "export PATH=/usr/bin:/usr/sbin:$PATH" >> ~/.bashrc`, + ].join('\n'), + ) + +const dockerRootlessConfigured = cfg => + Cmd.doas( + cfg.linuxUser.username, + [ + 'source ~/.bashrc', + 'dockerd-rootless-setuptool.sh install', + 'systemctl --user enable docker', + 'systemctl --user start docker', + ].join('\n'), + ) + +const assertUserExists = cfg => + pipe( + Cmd.run(`id -u ${cfg.linuxUser.username}`), + Either.mapLeft(() => 'user_not_exist'), + ) + +const recoverUserNotExist = cfg => + Either.orElse(e => + e === 'user_not_exist' ? Either.right(cfg) : Either.left(e), + ) + +const statePersisted = cfg => + pipe( + Cmd.run( + [ + `mkdir -p ${path.join( + cfg.linuxUser.persistDir, + cfg.linuxUser.homeDir, + )}`, + // NOTE: all paths in `persist` should already be fully normalized absolute paths + // leading with /home/, so this will resemble `mv /home/foo/bar/baz /tmp/home/foo/bar/baz` + ...cfg.linuxUser.persist.map( + p => `mv ${p} ${path.join(cfg.linuxUser.persistDir, p)} || true`, + ), + ].join('\n'), + ), + ) + +const userDeleted = cfg => pipe( + Cmd.run(`until userdel ${cfg.linuxUser.username}; do pkill -eU ${cfg.linuxUser.username} || true; done;`), + Either.flatMap(() => Cmd.run(`rm -r ${cfg.linuxUser.homeDir} || true`)), + ) + +const step = cfg => ({ + up: { + label: `${cfg.linuxUser.username}: create user`, + work: a => + pipe( + cfg, + Either.right, + Either.tap(userCreated), + Either.tap(userSessionsLinger), + Either.tap(persistedStateRestored), + Either.tap(sshAllowed), + Either.tap(bashrcHasPath), + Either.tap(dockerRootlessConfigured), + Either.map(() => a), + ), + }, + down: { + label: `${cfg.linuxUser.username}: remove user`, + work: a => + pipe( + cfg, + Either.right, + Either.tap(assertUserExists), + Either.tap(statePersisted), + Either.tap(userDeleted), + recoverUserNotExist(cfg), + Either.map(() => a), + ), + }, +}) + +module.exports = { step } diff --git a/src/system.js b/src/system.js new file mode 100644 index 0000000..025fc24 --- /dev/null +++ b/src/system.js @@ -0,0 +1,74 @@ +const Either = require('fp-ts/Either') +const { flow } = require('fp-ts/function') + +const Cmd = () => require('./cmd.js') + +const localSshKeyPath = '/root/.ssh/id_ed25519' +const localSshPubKeyPath = '/root/.ssh/id_ed25519.pub' + +const pkgs = [ + 'man', + 'nginx', + 'neovim', + 'ca-certificates', + 'gnupg', + 'curl', + 'wget', + 'dbus-user-session', + 'uidmap', + 'ufw', + 'certbot', + 'python3-certbot-nginx', + 'git', + 'systemd-container', + 'fuse-overlayfs', + 'slirp4netns', +] + +const apt = () => + Cmd().run( + [ + 'apt update -y', + 'apt upgrade -y', + `apt-get install -fy ${pkgs.join(' ')}`, + ].join('\n'), + ) + +const docker = () => + Cmd().run( + [ + 'install -m 0755 -d /etc/apt/keyrings', + 'rm /etc/apt/keyrings/docker.gpg || true', + `curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg`, + 'chmod a+r /etc/apt/keyrings/docker.gpg', + `echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null`, + 'apt-get update -y', + 'apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin', + ].join('\n'), + ) + +const localSshKeyCreated = () => + Cmd().run(`ssh-keygen -t ed25519 -C "local" -f ${localSshKeyPath} -P ''`) + +const localSshKeyDeleted = () => Cmd().run(`rm ${localSshKeyPath} || true`) + +const step = { + up: { + label: 'system: setup', + work: flow( + Either.right, + Either.tap(apt), + Either.tap(docker), + Either.tap(localSshKeyCreated), + ), + }, + down: { + label: 'system: teardown', + work: flow(Either.right, Either.tap(localSshKeyDeleted)), + }, +} + +module.exports = { step, localSshKeyPath, localSshPubKeyPath } diff --git a/test/config.js b/test/config.js new file mode 100644 index 0000000..945029c --- /dev/null +++ b/test/config.js @@ -0,0 +1,346 @@ +const test = require('ava') +const Either = require('fp-ts/Either') +const { pipe } = require('fp-ts/function') + +const Config = require('../src/config.js') + +const fail = (t, cfg) => { + const res = Config.parse(cfg) + t.assert(Either.isLeft(res), 'parsing erroneously succeeded') +} + +const pass = (t, cfg, { ret } = { ret: false }) => { + const res = Config.parse(cfg) + const parsed = Either.getOrElse(e => { + throw e + })(res) + if (ret) { + return parsed + } else { + t.pass() + } +} + +test('config fails when top-level node is not array', t => { + fail(t, `foo: 'bar'`) + fail(t, `'bar'`) + pass(t, '[]') +}) + +test('config fails when service unknown', t => { + fail(t, `- foo`) + fail( + t, + ` +- foo: + bar: 'baz' +`, + ) +}) + +test('config fails when linux_user bad', t => { + const rest = `network: + interface: 'public' + port: 1 + domain: 'db.foo.org' + ssl: false + postgres: + username: 'postgres' + password: 'password'` + + fail( + t, + ` +- db: + ${rest} +`, + ) + + fail( + t, + ` +- db: + linux_user: + persist: [] + ${rest} +`, + ) + + pass( + t, + ` +- db: + linux_user: + username: 'foo' + ${rest} +`, + ) +}) + +test('config fails when linux_user.persist is not subpath of homedir', t => { + const rest = `network: + interface : 'public' + port: 1 + domain: 'db.foo.org' + ssl: false + postgres: + username: 'postgres' + password: 'password'` + + fail( + t, + ` +- db: + linux_user: + username: 'foo' + persist: ['/tmp'] + ${rest}`, + ) + + fail( + t, + ` +- db: + linux_user: + username: 'foo' + persist: ['../tmp'] + ${rest}`, + ) + + const parsed = pass( + t, + ` +- db: + linux_user: + username: 'foo' + persist: + - '/home/foo/bar' + - './bar/baz' + - './tmp' + ${rest}`, + { ret: true }, + ) + + t.deepEqual(parsed[0].linuxUser.persist, [ + '/home/foo/bar', + '/home/foo/bar/baz', + '/home/foo/tmp', + ]) +}) + +test('config fails when bad combo of network.interface and network.domain', t => { + const rest = `linux_user: + username: 'foo' + postgres: + username: 'postgres' + password: 'password'` + + fail( + t, + ` +- db: + network: + interface: 'public' + port: 1 + ssl: false + ${rest}`, + ) + + fail( + t, + ` +- db: + network: + interface: 'local' + domain: 'foo.org' + port: 1 + ssl: false + ${rest}`, + ) + + pass( + t, + ` +- db: + network: + interface: 'public' + domain: 'foo.org' + port: 1 + ssl: false + ${rest}`, + ) + + pass( + t, + ` +- db: + network: + interface: 'local' + port: 1 + ssl: false + ${rest}`, + ) +}) + +test('config fails when postgres bad', t => { + const rest = `linux_user: + username: 'foo' + network: + interface: 'local' + port: 1 + ssl: false` + + fail( + t, + ` +- db: + ${rest} +`, + ) + + fail( + t, + ` +- db: + postgres: + username: 'foo' + ${rest} +`, + ) + + fail( + t, + ` +- db: + postgres: + password: 'foo' + ${rest} +`, + ) + + fail( + t, + ` +- db: + postgres: + username: 'foo' + password: 'foo' + data_dir: '/tmp' + ${rest}`, + ) + + fail( + t, + ` +- db: + postgres: + username: 'foo' + password: 'foo' + data_dir: '/tmp' + ${rest}`, + ) + + pass( + t, + ` +- db: + postgres: + username: 'foo' + password: 'foo' + data_dir: 'data' + ${rest} +`, + ) + + pass( + t, + ` +- db: + postgres: + username: 'foo' + password: 'foo' + data_dir: '/home/foo/data' + ${rest} +`, + ) + + pass( + t, + ` +- db: + postgres: + username: 'foo' + password: 'foo' + ${rest} +`, + ) +}) + +test('config allows multiple services', t => { + const one = (un, port) => ` +- db: + postgres: + username: 'foo' + password: 'bar' + linux_user: + username: '${un}' + network: + interface: 'local' + port: ${port} + ssl: false` + + pass( + t, + ` +${one('a', 0)} +${one('b', 1)} +`, + ) +}) + +test('config fails when port, linux_user.username, or domain reused', t => { + const one = (un, port, domain) => ` +- db: + postgres: + username: 'foo' + password: 'bar' + linux_user: + username: '${un}' + network: + interface: 'public' + port: ${port} + domain: ${domain} + ssl: false` + + fail( + t, + ` +${one('a', 0, 'foo.org')} +${one('b', 1, 'foo.org')} +`, + ) + + fail( + t, + ` +${one('a', 1, 'foo.baz.org')} +${one('b', 1, 'foo.org')} +`, + ) + + fail( + t, + ` +${one('a', 0, 'foo.baz.org')} +${one('a', 1, 'foo.org')} +`, + ) + + pass( + t, + ` +${one('a', 0, 'foo.baz.org')} +${one('b', 1, 'foo.org')} +`, + ) +}) diff --git a/yarn.lock b/yarn.lock index 1059c36..2d05346 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,17 +7,907 @@ resolved "https://registry.yarnpkg.com/@matchbook/ts/-/ts-1.0.0.tgz#7338b3fc3fd15f46c5849bf898cde200c6865b48" integrity sha512-0eOE/mJSNa3Z8fxP3fWumBQjVjd+N/oZIqctZ+CVl/l8bZc6rgW/YfsjiHzjZzHJkYdrFOfD2S4u9kqGAcs7iA== +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.8.2: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +aggregate-error@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-4.0.1.tgz#25091fe1573b9e0be892aeda15c7c66a545f758e" + integrity sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w== + dependencies: + clean-stack "^4.0.0" + indent-string "^5.0.0" + +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-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^6.0.0, ansi-styles@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw== + +arrgv@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arrgv/-/arrgv-1.0.2.tgz#025ed55a6a433cad9b604f8112fc4292715a6ec0" + integrity sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw== + +arrify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-3.0.0.tgz#ccdefb8eaf2a1d2ab0da1ca2ce53118759fd46bc" + integrity sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw== + +ava@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ava/-/ava-5.3.0.tgz#b5c9e6b92f97cb0d4f9bf09be51daa4101ff21cf" + integrity sha512-QYvBdyygl1LGX13IuYsC4bkwVCzZeovMGbxYkD73i7DVJxNlWnFa06YgrBOTbjw2QvSKUl5fOJ92Kj5WK9hSeg== + dependencies: + acorn "^8.8.2" + acorn-walk "^8.2.0" + ansi-styles "^6.2.1" + arrgv "^1.0.2" + arrify "^3.0.0" + callsites "^4.0.0" + cbor "^8.1.0" + chalk "^5.2.0" + chokidar "^3.5.3" + chunkd "^2.0.1" + ci-info "^3.8.0" + ci-parallel-vars "^1.0.1" + clean-yaml-object "^0.1.0" + cli-truncate "^3.1.0" + code-excerpt "^4.0.0" + common-path-prefix "^3.0.0" + concordance "^5.0.4" + currently-unhandled "^0.4.1" + debug "^4.3.4" + emittery "^1.0.1" + figures "^5.0.0" + globby "^13.1.4" + ignore-by-default "^2.1.0" + indent-string "^5.0.0" + is-error "^2.2.2" + is-plain-object "^5.0.0" + is-promise "^4.0.0" + matcher "^5.0.0" + mem "^9.0.2" + ms "^2.1.3" + p-event "^5.0.1" + p-map "^5.5.0" + picomatch "^2.3.1" + pkg-conf "^4.0.0" + plur "^5.1.0" + pretty-ms "^8.0.0" + resolve-cwd "^3.0.0" + stack-utils "^2.0.6" + strip-ansi "^7.0.1" + supertap "^3.0.1" + temp-dir "^3.0.0" + write-file-atomic "^5.0.1" + yargs "^17.7.2" + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blueimp-md5@^2.10.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz#b53feea5498dcb53dc6ec4b823adb84b729c4af0" + integrity sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w== + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +callsites@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-4.0.0.tgz#8014cea4fedfe681a30e2f7d2d557dd95808a92a" + integrity sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ== + +cbor@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" + integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== + dependencies: + nofilter "^3.1.0" + +chalk@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + +chokidar@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chunkd@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chunkd/-/chunkd-2.0.1.tgz#49cd1d7b06992dc4f7fccd962fe2a101ee7da920" + integrity sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ== + +ci-info@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" + integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== + +ci-parallel-vars@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz#e87ff0625ccf9d286985b29b4ada8485ca9ffbc2" + integrity sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg== + +clean-stack@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-4.2.0.tgz#c464e4cde4ac789f4e0735c5d75beb49d7b30b31" + integrity sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg== + dependencies: + escape-string-regexp "5.0.0" + +clean-yaml-object@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" + integrity sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw== + +cli-truncate@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== + dependencies: + slice-ansi "^5.0.0" + string-width "^5.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +code-excerpt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-4.0.0.tgz#2de7d46e98514385cb01f7b3b741320115f4c95e" + integrity sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA== + dependencies: + convert-to-spaces "^2.0.1" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + +concordance@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/concordance/-/concordance-5.0.4.tgz#9896073261adced72f88d60e4d56f8efc4bbbbd2" + integrity sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw== + dependencies: + date-time "^3.1.0" + esutils "^2.0.3" + fast-diff "^1.2.0" + js-string-escape "^1.0.1" + lodash "^4.17.15" + md5-hex "^3.0.1" + semver "^7.3.2" + well-known-symbols "^2.0.0" + +convert-to-spaces@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz#61a6c98f8aa626c16b296b862a91412a33bceb6b" + integrity sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ== + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng== + dependencies: + array-find-index "^1.0.1" + +date-time@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/date-time/-/date-time-3.1.0.tgz#0d1e934d170579f481ed8df1e2b8ff70ee845e1e" + integrity sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg== + dependencies: + time-zone "^1.0.0" + +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +emittery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-1.0.1.tgz#e0cf36e2d7eef94dbd025969f642d57ae50a56cd" + integrity sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@5.0.0, escape-string-regexp@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" + integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esutils@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +fast-diff@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.11: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + 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" + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +figures@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" + integrity sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg== + dependencies: + escape-string-regexp "^5.0.0" + is-unicode-supported "^1.2.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + fp-ts@^2.16.0: version "2.16.0" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.0.tgz#64e03314dfc1c7ce5e975d3496ac14bc3eb7f92e" integrity sha512-bLq+KgbiXdTEoT1zcARrWEpa5z6A/8b7PcDW7Gef3NSisQ+VS7ll2Xbf1E+xsgik0rWub/8u0qP/iTTjj+PhxQ== +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +glob-parent@^5.1.2, 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" + +globby@^13.1.4: + version "13.1.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" + integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + +ignore-by-default@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-2.1.0.tgz#c0e0de1a99b6065bdc93315a6f728867981464db" + integrity sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw== + +ignore@^5.2.0: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" + integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== + +irregular-plurals@^3.3.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-3.5.0.tgz#0835e6639aa8425bdc8b0d33d0dc4e89d9c01d2b" + integrity sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-error@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.2.tgz#c10ade187b3c93510c5470a5567833ee25649843" + integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + +is-glob@^4.0.1, is-glob@~4.0.1: + 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-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + +is-promise@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + +is-unicode-supported@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + +js-string-escape@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" + integrity sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg== + +js-yaml@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +load-json-file@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-7.0.1.tgz#a3c9fde6beffb6bedb5acf104fad6bb1604e1b00" + integrity sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ== + +locate-path@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +map-age-cleaner@^0.1.3: + 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" + +matcher@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/matcher/-/matcher-5.0.0.tgz#cd82f1c7ae7ee472a9eeaf8ec7cac45e0fe0da62" + integrity sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw== + dependencies: + escape-string-regexp "^5.0.0" + +md5-hex@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c" + integrity sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw== + dependencies: + blueimp-md5 "^2.10.0" + +mem@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/mem/-/mem-9.0.2.tgz#bbc2d40be045afe30749681e8f5d554cee0c0354" + integrity sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A== + dependencies: + map-age-cleaner "^0.1.3" + mimic-fn "^4.0.0" + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +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== + +nofilter@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" + integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== + +p-event@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-5.0.1.tgz#614624ec02ae7f4f13d09a721c90586184af5b0c" + integrity sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ== + dependencies: + p-timeout "^5.0.2" + +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + +p-map@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-5.5.0.tgz#054ca8ca778dfa4cf3f8db6638ccb5b937266715" + integrity sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg== + dependencies: + aggregate-error "^4.0.0" + +p-timeout@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" + integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== + +parse-ms@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-3.0.0.tgz#3ea24a934913345fcc3656deda72df921da3a70e" + integrity sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw== + +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-conf@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-4.0.0.tgz#63ace00cbacfa94c2226aee133800802d3e3b80c" + integrity sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w== + dependencies: + find-up "^6.0.0" + load-json-file "^7.0.0" + +plur@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/plur/-/plur-5.1.0.tgz#bff58c9f557b9061d60d8ebf93959cf4b08594ae" + integrity sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg== + dependencies: + irregular-plurals "^3.3.0" + prettier@^2.8.8: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +pretty-ms@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-8.0.0.tgz#a35563b2a02df01e595538f86d7de54ca23194a3" + integrity sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q== + dependencies: + parse-ms "^3.0.0" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +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== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +semver@^7.3.2: + version "7.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" + integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== + dependencies: + lru-cache "^6.0.0" + +serialize-error@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" + integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== + dependencies: + type-fest "^0.13.1" + +signal-exit@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967" + integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q== + +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + 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-width@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +strip-ansi@^6.0.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-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +supertap@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/supertap/-/supertap-3.0.1.tgz#aa89e4522104402c6e8fe470a7d2db6dc4037c6a" + integrity sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw== + dependencies: + indent-string "^5.0.0" + js-yaml "^3.14.1" + serialize-error "^7.0.1" + strip-ansi "^7.0.1" + +temp-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-3.0.0.tgz#7f147b42ee41234cc6ba3138cd8e8aa2302acffa" + integrity sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw== + +time-zone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d" + integrity sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +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== + +well-known-symbols@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-2.0.0.tgz#e9c7c07dbd132b7b84212c8174391ec1f9871ba5" + integrity sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +write-file-atomic@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^4.0.1" + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yaml@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==