From f81ac0cf433e41d8166e36e8711228e10d17d23b Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 30 Sep 2024 20:04:33 +0200 Subject: [PATCH 01/30] feat!: setup oclif with a basic 'init' command --- bin/dev.cmd | 3 + bin/dev.js | 7 ++ bin/run.cmd | 3 + bin/run.js | 6 ++ package.json | 17 ++++- src/commands/init.ts | 83 ++++++++++++++++++++++ src/utils/pjson.ts | 47 ++++++++++++ tsconfig.json | 7 +- yarn.lock | 166 ++++++++++++++++++++++++++++++++++++++++--- 9 files changed, 327 insertions(+), 12 deletions(-) create mode 100644 bin/dev.cmd create mode 100755 bin/dev.js create mode 100644 bin/run.cmd create mode 100755 bin/run.js create mode 100644 src/commands/init.ts create mode 100644 src/utils/pjson.ts diff --git a/bin/dev.cmd b/bin/dev.cmd new file mode 100644 index 0000000..cec553b --- /dev/null +++ b/bin/dev.cmd @@ -0,0 +1,3 @@ +@echo off + +node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %* diff --git a/bin/dev.js b/bin/dev.js new file mode 100755 index 0000000..b044d4f --- /dev/null +++ b/bin/dev.js @@ -0,0 +1,7 @@ +#!/usr/bin/env bun +// #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning + +// eslint-disable-next-line n/shebang +import { execute } from '@oclif/core' + +await execute({ development: true, dir: import.meta.url }) diff --git a/bin/run.cmd b/bin/run.cmd new file mode 100644 index 0000000..968fc30 --- /dev/null +++ b/bin/run.cmd @@ -0,0 +1,3 @@ +@echo off + +node "%~dp0\run" %* diff --git a/bin/run.js b/bin/run.js new file mode 100755 index 0000000..195d9ff --- /dev/null +++ b/bin/run.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node + +import { execute } from '@oclif/core' + +console.log('Running the CLI:', import.meta.url) +await execute({ dir: import.meta.url }) diff --git a/package.json b/package.json index 54f3804..288ddfa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@publicodes/tools", "version": "1.2.5", - "description": "A set of utility functions to build tools around Publicodes models", + "description": "A CLI tool for Publicodes", "type": "module", "main": "dist/index.js", "scripts": { @@ -55,8 +55,14 @@ ], "author": "Emile Rolley ", "license": "MIT", + "bin": { + "publicodes": "./bin/run.js" + }, "dependencies": { + "@clack/prompts": "^0.7.0", + "@oclif/core": "^4.0.23", "@types/node": "^18.11.18", + "chalk": "^5.3.0", "glob": "^10.4.1", "path": "^0.12.7", "publicodes": "^1.3.3", @@ -79,7 +85,8 @@ "src/index.ts", "src/optims/index.ts", "src/compilation/index.ts", - "src/migration/index.ts" + "src/migration/index.ts", + "src/commands" ], "format": [ "cjs", @@ -90,6 +97,12 @@ "clean": true, "cjsInterop": true }, + "oclif": { + "bin": "publicodes", + "commands": "./dist/commands", + "dirname": "publicodes", + "topicSeparator": ":" + }, "publishConfig": { "access": "public" } diff --git a/src/commands/init.ts b/src/commands/init.ts new file mode 100644 index 0000000..c3282ac --- /dev/null +++ b/src/commands/init.ts @@ -0,0 +1,83 @@ +import { Args, Command, Flags, ux } from '@oclif/core' +import { exec } from 'node:child_process' +import * as p from '@clack/prompts' +import chalk from 'chalk' +import fs from 'fs' +import path from 'path' +import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' + +export default class Init extends Command { + static override args = {} + + static override description = 'initialize a new project' + + static override examples = ['<%= command.id %>'] + + static override flags = {} + + public async run(): Promise { + p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) + + const pjson = getPackageJson() + + if (pjson) { + p.log.info(`Updating existing ${chalk.bold('package.json')} file`) + updatePackageJson(pjson) + } else { + p.log.step(`Creating a new ${chalk.bold('package.json')} file`) + const pjson = await askPackageJsonInfo() + updatePackageJson(pjson) + } + + p.outro('🚀 publicodes is ready to use!') + } +} + +function updatePackageJson(pjson: PackageJson): void { + const packageJsonPath = path.join(process.cwd(), 'package.json') + const fullPjson = { ...basePackageJson, ...pjson } + try { + fs.writeFileSync(packageJsonPath, JSON.stringify(fullPjson, null, 2)) + p.log.success(`${chalk.bold('package.json')} file written`) + } catch (error) { + p.cancel( + `An error occurred while writing the ${chalk.magenta('package.json')} file`, + ) + process.exit(1) + } +} + +function askPackageJsonInfo(): Promise { + const currentDir = path.basename(process.cwd()) + + return p.group( + { + name: () => + p.text({ + message: 'Name', + defaultValue: currentDir, + placeholder: currentDir, + }), + description: () => p.text({ message: 'Description', defaultValue: '' }), + version: () => + p.text({ + message: 'Version', + defaultValue: '1.0.0', + placeholder: '1.0.0', + }), + author: () => p.text({ message: 'Author', defaultValue: '' }), + license: () => + p.text({ + message: 'License', + defaultValue: 'MIT', + placeholder: 'MIT', + }), + }, + { + onCancel: () => { + p.cancel('init cancelled') + process.exit(1) + }, + }, + ) +} diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts new file mode 100644 index 0000000..9aadd86 --- /dev/null +++ b/src/utils/pjson.ts @@ -0,0 +1,47 @@ +import fs from 'fs' + +export type PackageJson = { + name: string + version: string + description: string + main?: string + type?: string + types?: string + files?: string[] + repository?: { + url: string + type: string + } + author: string + license: string + scripts?: { + [key: string]: string + } + peerDependencies?: { + [key: string]: string + } +} + +export const basePackageJson: PackageJson = { + name: '', + version: '1.0.0', + description: '', + author: '', + type: 'module', + main: 'dist/index.js', + types: 'dist/index.d.ts', + license: 'MIT', + files: ['dist'], + peerDependencies: { + // TODO: how to get the latest version of publicodes? + publicodes: '^1.5.1', + }, +} + +export function getPackageJson(): PackageJson | undefined { + try { + return JSON.parse(fs.readFileSync('package.json', 'utf8')) + } catch (error) { + return undefined + } +} diff --git a/tsconfig.json b/tsconfig.json index f2fe015..9cdf630 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,9 @@ "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true }, - "include": ["src"], - "exclude": ["./node_modules/", "./dist/", "./jest.config.js", "./test/"] + "include": ["src/**/*"], + "exclude": ["./node_modules/", "./dist/", "./jest.config.js", "./test/"], + "ts-node": { + "esm": true + } } diff --git a/yarn.lock b/yarn.lock index ffdc88a..2f6b3cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -301,6 +301,23 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@clack/core@^0.3.3": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@clack/core/-/core-0.3.4.tgz#375e82fc8fe46650b37cab2f2ea8752c6b7f0450" + integrity sha512-H4hxZDXgHtWTwV3RAVenqcC4VbJZNegbBjlPvzOzCouXtS2y3sDvlO3IsbrPNWuLWPPlYVYPghQdSF64683Ldw== + dependencies: + picocolors "^1.0.0" + sisteransi "^1.0.5" + +"@clack/prompts@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@clack/prompts/-/prompts-0.7.0.tgz#6aaef48ea803d91cce12bc80811cfcb8de2e75ea" + integrity sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA== + dependencies: + "@clack/core" "^0.3.3" + picocolors "^1.0.0" + sisteransi "^1.0.5" + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -711,6 +728,30 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@oclif/core@^4.0.23": + version "4.0.23" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.0.23.tgz#8772cfd57f850e2e17b703166b44da092a7986a0" + integrity sha512-wDl/eis7XDIM1pQWUGKLB+EQKJO9UrjaQ5NcwIbz7GW0gWuJfo9QAK75csgNUN/9Pbok9Ryt+sJgogS4RCIp5g== + dependencies: + ansi-escapes "^4.3.2" + ansis "^3.3.2" + clean-stack "^3.0.1" + cli-spinners "^2.9.2" + debug "^4.3.7" + ejs "^3.1.10" + get-package-type "^0.1.0" + globby "^11.1.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + lilconfig "^3.1.2" + minimatch "^9.0.5" + semver "^7.6.3" + string-width "^4.2.3" + supports-color "^8" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -950,7 +991,7 @@ acorn@^8.11.0, acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -ansi-escapes@^4.2.1: +ansi-escapes@^4.2.1, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -996,6 +1037,11 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +ansis@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.3.2.tgz#15adc36fea112da95c74d309706e593618accac3" + integrity sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA== + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -1026,6 +1072,11 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +async@^3.2.3: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -1188,7 +1239,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0: +chalk@^4.0.0, chalk@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1196,6 +1247,11 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -1226,6 +1282,18 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== +clean-stack@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-3.0.1.tgz#155bf0b2221bf5f4fba89528d24c5953f17fe3a8" + integrity sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg== + dependencies: + escape-string-regexp "4.0.0" + +cli-spinners@^2.9.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -1318,6 +1386,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" +debug@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + dedent@^1.0.0: version "1.5.3" resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" @@ -1362,6 +1437,13 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +ejs@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + electron-to-chromium@^1.4.796: version "1.4.818" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz#7762c8bfd15a07c3833b7f5deed990e9e5a4c24f" @@ -1423,6 +1505,11 @@ escalade@^3.1.1, escalade@^3.1.2: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1499,6 +1586,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -1593,7 +1687,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globby@^11.0.3: +globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -1655,6 +1749,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -1692,6 +1791,11 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.2" +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -1724,6 +1828,13 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1791,6 +1902,16 @@ jackspeak@^3.1.2: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jake@^10.8.5: + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== + dependencies: + async "^3.2.3" + chalk "^4.0.2" + filelist "^1.0.4" + minimatch "^3.1.2" + jest-changed-files@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" @@ -2197,7 +2318,7 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -lilconfig@^3.0.0: +lilconfig@^3.0.0, lilconfig@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" integrity sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow== @@ -2298,14 +2419,21 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.0, minimatch@^9.0.4: +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.0, minimatch@^9.0.4, minimatch@^9.0.5: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -2322,6 +2450,11 @@ ms@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== + mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -2626,6 +2759,11 @@ semver@^7.5.3, semver@^7.5.4: resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.6.3: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2717,7 +2855,7 @@ string-length@^4.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.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== @@ -2798,7 +2936,7 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: +supports-color@^8, supports-color@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -3022,6 +3160,18 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" From e398310f9ef321b4e1af60613d03c49f97b68fa3 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 12:45:09 +0200 Subject: [PATCH 02/30] test: setup tests for the CLI --- bin/dev.js | 1 - bin/run.js | 1 - package.json | 10 +- test/cli-utils.ts | 98 ++ test/commands-data/yarn-init/package.json | 16 + test/commands/base.test.ts | 13 + test/commands/init.test.ts | 31 + test/optims/constantFolding.test.ts | 2 +- test/{utils.test.ts => utils.ts} | 3 + tsconfig.json | 2 +- yarn.lock | 1889 +++++---------------- 11 files changed, 549 insertions(+), 1517 deletions(-) create mode 100644 test/cli-utils.ts create mode 100644 test/commands-data/yarn-init/package.json create mode 100644 test/commands/base.test.ts create mode 100644 test/commands/init.test.ts rename test/{utils.test.ts => utils.ts} (84%) diff --git a/bin/dev.js b/bin/dev.js index b044d4f..78b910a 100755 --- a/bin/dev.js +++ b/bin/dev.js @@ -1,5 +1,4 @@ #!/usr/bin/env bun -// #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning // eslint-disable-next-line n/shebang import { execute } from '@oclif/core' diff --git a/bin/run.js b/bin/run.js index 195d9ff..92b78ec 100755 --- a/bin/run.js +++ b/bin/run.js @@ -2,5 +2,4 @@ import { execute } from '@oclif/core' -console.log('Running the CLI:', import.meta.url) await execute({ dir: import.meta.url }) diff --git a/package.json b/package.json index 288ddfa..a3c344f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "tsup", "watch": "tsup --watch", "clean": "rm -rf dist docs", - "test": "jest", + "test": "vitest --globals", "docs": "typedoc", "format": "prettier --write .", "format:check": "prettier --check ." @@ -39,7 +39,8 @@ } }, "files": [ - "dist" + "dist", + "bin" ], "repository": { "type": "git", @@ -69,16 +70,17 @@ "yaml": "^2.4.5" }, "devDependencies": { + "@oclif/test": "^4.0.9", "@types/jest": "^29.2.5", "docdash": "^2.0.1", - "jest": "^29.4.1", "prettier": "^3.0.0", "ts-jest": "^29.0.4", "ts-node": "^10.9.2", "tsup": "^8.0.2", "typedoc": "^0.24.8", "typedoc-plugin-export-functions": "^1.0.0", - "typescript": "^4.9.4" + "typescript": "^4.9.4", + "vitest": "^2.1.1" }, "tsup": { "entry": [ diff --git a/test/cli-utils.ts b/test/cli-utils.ts new file mode 100644 index 0000000..6befb80 --- /dev/null +++ b/test/cli-utils.ts @@ -0,0 +1,98 @@ +import { + ExecException, + execSync, + ExecSyncOptionsWithBufferEncoding, +} from 'child_process' +import path, { join } from 'path' +import fs, { mkdtempSync } from 'fs' +import os from 'os' + +export type ExecError = ExecException & { stderr: string; stdout: string } + +export type ExecOptions = ExecSyncOptionsWithBufferEncoding & { + silent?: boolean +} + +export type ExecResult = { + code: number + stdout?: string + stderr?: string + error?: ExecError +} + +const TEST_DATA_DIR = path.join(process.cwd(), 'test', 'commands-data') + +/** + * Utility test class to execute the CLI command + */ +export class CLIExecutor { + private binPath: string + + constructor() { + const curentDir = process.cwd() + this.binPath = + process.platform === 'win32' + ? path.join(curentDir, 'bin', 'dev.cmd') + : path.join(curentDir, 'bin', 'dev.js') + } + + public execCommand(cmd: string, options?: ExecOptions): Promise { + const silent = options?.silent ?? true + const command = `${this.binPath} ${cmd}` + const cwd = process.cwd() + + return new Promise((resolve) => { + if (silent) { + try { + const r = execSync(command, { ...options, stdio: 'pipe', cwd }) + const stdout = r.toString() + + resolve({ code: 0, stdout }) + } catch (error) { + const err = error as ExecError + console.log(error) + + resolve({ + code: 1, + error: err, + stdout: err.stdout?.toString() ?? '', + stderr: err.stderr?.toString() ?? '', + }) + } + } else { + execSync(command, { ...options, stdio: 'inherit', cwd }) + resolve({ code: 0 }) + } + }) + } +} + +// On macOS, os.tmpdir() is not a real path: +// https://github.com/nodejs/node/issues/11422 +const TMP_DIR = fs.realpathSync(os.tmpdir()) + +export async function runInDir( + dir: 'tmp' | string, + fn: () => Promise, +): Promise { + const baseCwd = process.cwd() + const ctd = + dir === 'tmp' + ? mkdtempSync(path.join(TMP_DIR, 'publicodes-cli-test-')) + : path.join(TEST_DATA_DIR, dir) + + if (!fs.existsSync(ctd)) { + fs.mkdirSync(ctd, { recursive: true }) + } + + process.chdir(ctd) + + try { + await fn() + } finally { + process.chdir(baseCwd) + if (dir === 'tmp' && fs.existsSync(ctd)) { + fs.rmSync(ctd, { recursive: true }) + } + } +} diff --git a/test/commands-data/yarn-init/package.json b/test/commands-data/yarn-init/package.json new file mode 100644 index 0000000..c28622d --- /dev/null +++ b/test/commands-data/yarn-init/package.json @@ -0,0 +1,16 @@ +{ + "name": "yarn-init", + "version": "1.0.0", + "description": "", + "author": "", + "type": "module", + "main": "index.js", + "types": "dist/index.d.ts", + "license": "MIT", + "files": [ + "dist" + ], + "peerDependencies": { + "publicodes": "^1.5.1" + } +} \ No newline at end of file diff --git a/test/commands/base.test.ts b/test/commands/base.test.ts new file mode 100644 index 0000000..394f498 --- /dev/null +++ b/test/commands/base.test.ts @@ -0,0 +1,13 @@ +import { CLIExecutor, runInDir } from '../cli-utils' + +describe('publicodes --help', () => { + it('should list all available commands', async () => { + const cli = new CLIExecutor() + + runInDir('tmp', async () => { + const { stdout } = await cli.execCommand('--help') + + expect(stdout).toContain('init initialize a new project') + }) + }) +}) diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts new file mode 100644 index 0000000..4d24c76 --- /dev/null +++ b/test/commands/init.test.ts @@ -0,0 +1,31 @@ +import { execSync } from 'child_process' +import { CLIExecutor, runInDir } from '../cli-utils' +import fs from 'fs' + +describe('publicodes init', () => { + it('should update existing package.json', async () => { + const cli = new CLIExecutor() + + runInDir('tmp', async () => { + execSync('yarn init -y') + const { stdout } = await cli.execCommand('init') + + expect(stdout).toContain('existing package.json file') + expect(stdout).toContain('package.json file written') + expect(stdout).toContain('🚀 publicodes is ready to use!') + const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) + expect(packageJson).toMatchObject({ + type: 'module', + main: 'dist/index.js', + types: 'dist/index.d.ts', + files: ['dist'], + peerDependencies: { + publicodes: '^1.5.1', + }, + devDependencies: { + '@publicodes/tools': '^1.5.1', + }, + }) + }) + }) +}) diff --git a/test/optims/constantFolding.test.ts b/test/optims/constantFolding.test.ts index 33fd112..47455f0 100644 --- a/test/optims/constantFolding.test.ts +++ b/test/optims/constantFolding.test.ts @@ -2,7 +2,7 @@ import Engine, { RuleNode } from 'publicodes' import { serializeParsedRules } from '../../src' import { RuleName, RawRules, disabledLogger } from '../../src/commons' import { constantFolding } from '../../src/optims/' -import { callWithEngine } from '../utils.test' +import { callWithEngine } from '../utils' function constantFoldingWith(rawRules: any, targets?: RuleName[]): RawRules { const res = callWithEngine( diff --git a/test/utils.test.ts b/test/utils.ts similarity index 84% rename from test/utils.test.ts rename to test/utils.ts index 8f434b6..4d316a2 100644 --- a/test/utils.test.ts +++ b/test/utils.ts @@ -1,6 +1,9 @@ import { RuleName, disabledLogger } from '../src/commons' import Engine from 'publicodes' import type { ParsedRules } from 'publicodes' +import { ChildProcess, exec } from 'child_process' +import fs from 'fs' +import path from 'path' export function callWithEngine(fn: (engine: Engine) => R, rawRules: any): R { const engine = new Engine(rawRules, { diff --git a/tsconfig.json b/tsconfig.json index 9cdf630..3735280 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "resolveJsonModule": true, "allowJs": true, "sourceMap": true, - "types": ["jest", "node"], + "types": ["vitest/globals", "node"], "declaration": true, "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true diff --git a/yarn.lock b/yarn.lock index 2f6b3cf..af81b9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,15 +2,7 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7": +"@babel/code-frame@^7.12.13": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== @@ -18,137 +10,11 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== - -"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== - dependencies: - "@babel/types" "^7.24.7" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== - dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-module-imports@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" - integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== - dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" - integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== - -"@babel/helper-simple-access@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" - integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== - "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== - -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - "@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" @@ -159,148 +25,6 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" - integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== - dependencies: - "@babel/helper-plugin-utils" "^7.24.7" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" - integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== - dependencies: - "@babel/helper-plugin-utils" "^7.24.7" - -"@babel/template@^7.24.7", "@babel/template@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== - dependencies: - "@babel/helper-string-parser" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - "@clack/core@^0.3.3": version "0.3.4" resolved "https://registry.yarnpkg.com/@clack/core/-/core-0.3.4.tgz#375e82fc8fe46650b37cab2f2ea8752c6b7f0450" @@ -452,78 +176,6 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== - dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - "@jest/expect-utils@^29.7.0": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" @@ -531,66 +183,6 @@ dependencies: jest-get-type "^29.6.3" -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -598,56 +190,6 @@ dependencies: "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" @@ -660,7 +202,7 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": +"@jridgewell/gen-mapping@^0.3.2": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== @@ -684,6 +226,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -692,7 +239,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.24": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -752,6 +299,14 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" +"@oclif/test@^4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@oclif/test/-/test-4.0.9.tgz#c4b4b4878911489a79f296a15448e76d860b39d2" + integrity sha512-xDGBFBNE6ckoBT9EhMi6ZvwAaEeJRGvRmn2qZWujJl9EJ56a72KHZsvTJVgl2p/AQ2vZ1UH06YZ440GOnjExzQ== + dependencies: + ansis "^3.3.2" + debug "^4.3.6" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -762,100 +317,166 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" integrity sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ== +"@rollup/rollup-android-arm-eabi@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.23.0.tgz#17c381804b84fecee9dd8588e93d9b2a4544ea42" + integrity sha512-8OR+Ok3SGEMsAZispLx8jruuXw0HVF16k+ub2eNXKHDmdxL4cf9NlNpAzhlOhNyXzKDEJuFeq0nZm+XlNb1IFw== + "@rollup/rollup-android-arm64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz#97255ef6384c5f73f4800c0de91f5f6518e21203" integrity sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA== +"@rollup/rollup-android-arm64@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.23.0.tgz#0594aab393e7b13c4cd7f21bb72d953c128cdae4" + integrity sha512-rEFtX1nP8gqmLmPZsXRMoLVNB5JBwOzIAk/XAcEPuKrPa2nPJ+DuGGpfQUR0XjRm8KjHfTZLpWbKXkA5BoFL3w== + "@rollup/rollup-darwin-arm64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz#b6dd74e117510dfe94541646067b0545b42ff096" integrity sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w== +"@rollup/rollup-darwin-arm64@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.23.0.tgz#1bc123d4e69920d026f0ffc791bc3c4e04a33b60" + integrity sha512-ZbqlMkJRMMPeapfaU4drYHns7Q5MIxjM/QeOO62qQZGPh9XWziap+NF9fsqPHT0KzEL6HaPspC7sOwpgyA3J9g== + "@rollup/rollup-darwin-x64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz#e07d76de1cec987673e7f3d48ccb8e106d42c05c" integrity sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA== +"@rollup/rollup-darwin-x64@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.23.0.tgz#272b6787d8a356ac8460738c03b0281af75ed73e" + integrity sha512-PfmgQp78xx5rBCgn2oYPQ1rQTtOaQCna0kRaBlc5w7RlA3TDGGo7m3XaptgitUZ54US9915i7KeVPHoy3/W8tA== + "@rollup/rollup-linux-arm-gnueabihf@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz#9f1a6d218b560c9d75185af4b8bb42f9f24736b8" integrity sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA== +"@rollup/rollup-linux-arm-gnueabihf@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.23.0.tgz#c35a35414d11c028db1e11b158b3947d1fa3abb0" + integrity sha512-WAeZfAAPus56eQgBioezXRRzArAjWJGjNo/M+BHZygUcs9EePIuGI1Wfc6U/Ki+tMW17FFGvhCfYnfcKPh18SA== + "@rollup/rollup-linux-arm-musleabihf@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz#53618b92e6ffb642c7b620e6e528446511330549" integrity sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A== +"@rollup/rollup-linux-arm-musleabihf@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.23.0.tgz#f490e10393558d37c8bc71e71fcab919f2a5bec6" + integrity sha512-v7PGcp1O5XKZxKX8phTXtmJDVpE20Ub1eF6w9iMmI3qrrPak6yR9/5eeq7ziLMrMTjppkkskXyxnmm00HdtXjA== + "@rollup/rollup-linux-arm64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz#99a7ba5e719d4f053761a698f7b52291cefba577" integrity sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw== +"@rollup/rollup-linux-arm64-gnu@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.23.0.tgz#1b685e1c219494e39f7441cd6b15fe4779ceda77" + integrity sha512-nAbWsDZ9UkU6xQiXEyXBNHAKbzSAi95H3gTStJq9UGiS1v+YVXwRHcQOQEF/3CHuhX5BVhShKoeOf6Q/1M+Zhg== + "@rollup/rollup-linux-arm64-musl@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz#f53db99a45d9bc00ce94db8a35efa7c3c144a58c" integrity sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ== +"@rollup/rollup-linux-arm64-musl@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.23.0.tgz#a6cf6cdb340abde851b055e6d8785308ef4ace1a" + integrity sha512-5QT/Di5FbGNPaVw8hHO1wETunwkPuZBIu6W+5GNArlKHD9fkMHy7vS8zGHJk38oObXfWdsuLMogD4sBySLJ54g== + "@rollup/rollup-linux-powerpc64le-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz#cbb0837408fe081ce3435cf3730e090febafc9bf" integrity sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA== +"@rollup/rollup-linux-powerpc64le-gnu@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.23.0.tgz#2ce0518e709a8a4c0ae563ae0dd4526bc8b14df8" + integrity sha512-Sefl6vPyn5axzCsO13r1sHLcmPuiSOrKIImnq34CBurntcJ+lkQgAaTt/9JkgGmaZJ+OkaHmAJl4Bfd0DmdtOQ== + "@rollup/rollup-linux-riscv64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz#8ed09c1d1262ada4c38d791a28ae0fea28b80cc9" integrity sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg== +"@rollup/rollup-linux-riscv64-gnu@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.23.0.tgz#008bbfc76beae9651b989a36a0308fbb90ce9fcd" + integrity sha512-o4QI2KU/QbP7ZExMse6ULotdV3oJUYMrdx3rBZCgUF3ur3gJPfe8Fuasn6tia16c5kZBBw0aTmaUygad6VB/hQ== + "@rollup/rollup-linux-s390x-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz#938138d3c8e0c96f022252a28441dcfb17afd7ec" integrity sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg== +"@rollup/rollup-linux-s390x-gnu@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.23.0.tgz#dac114e4eda8d6c5d6b46abd7f1638c6e5846f75" + integrity sha512-+bxqx+V/D4FGrpXzPGKp/SEZIZ8cIW3K7wOtcJAoCrmXvzRtmdUhYNbgd+RztLzfDEfA2WtKj5F4tcbNPuqgeg== + "@rollup/rollup-linux-x64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz#1a7481137a54740bee1ded4ae5752450f155d942" integrity sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w== +"@rollup/rollup-linux-x64-gnu@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.23.0.tgz#5d813f8fa79830e13ebeb69433cc786c5522da87" + integrity sha512-I/eXsdVoCKtSgK9OwyQKPAfricWKUMNCwJKtatRYMmDo5N859tbO3UsBw5kT3dU1n6ZcM1JDzPRSGhAUkxfLxw== + "@rollup/rollup-linux-x64-musl@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz#f1186afc601ac4f4fc25fac4ca15ecbee3a1874d" integrity sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg== +"@rollup/rollup-linux-x64-musl@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.23.0.tgz#cca8bf6f96467494c4cb8bba996752d3c7b20714" + integrity sha512-4ZoDZy5ShLbbe1KPSafbFh1vbl0asTVfkABC7eWqIs01+66ncM82YJxV2VtV3YVJTqq2P8HMx3DCoRSWB/N3rw== + "@rollup/rollup-win32-arm64-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz#ed6603e93636a96203c6915be4117245c1bd2daf" integrity sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA== +"@rollup/rollup-win32-arm64-msvc@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.23.0.tgz#9e09307dd0656a63db9ef86a6004679f56d9ddcf" + integrity sha512-+5Ky8dhft4STaOEbZu3/NU4QIyYssKO+r1cD3FzuusA0vO5gso15on7qGzKdNXnc1gOrsgCqZjRw1w+zL4y4hQ== + "@rollup/rollup-win32-ia32-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz#14e0b404b1c25ebe6157a15edb9c46959ba74c54" integrity sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg== +"@rollup/rollup-win32-ia32-msvc@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.23.0.tgz#ebd6a789dd59c1a4e94ab055de0c37ab4ae43618" + integrity sha512-0SPJk4cPZQhq9qA1UhIRumSE3+JJIBBjtlGl5PNC///BoaByckNZd53rOYD0glpTkYFBQSt7AkMeLVPfx65+BQ== + "@rollup/rollup-win32-x64-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz#5d694d345ce36b6ecf657349e03eb87297e68da4" integrity sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g== +"@rollup/rollup-win32-x64-msvc@4.23.0": + version "4.23.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.23.0.tgz#54e3562ebd264ef5839f8091618310c40d43d8a9" + integrity sha512-lqCK5GQC8fNo0+JvTSxcG7YB1UKYp8yrNLhsArlvPWN+16ovSZgoehlVHg6X0sSWPUkpjRBR5TuR12ZugowZ4g== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@sinonjs/commons@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" - integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== - dependencies: - "@sinonjs/commons" "^3.0.0" - "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -876,52 +497,17 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@types/babel__core@^7.1.14": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" - integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== - dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" - integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.6" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" - integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== - dependencies: - "@babel/types" "^7.20.7" - "@types/estree@1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" +"@types/estree@1.0.6", "@types/estree@^1.0.0": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== @@ -979,6 +565,65 @@ dependencies: "@types/yargs-parser" "*" +"@vitest/expect@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-2.1.1.tgz#907137a86246c5328929d796d741c4e95d1ee19d" + integrity sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w== + dependencies: + "@vitest/spy" "2.1.1" + "@vitest/utils" "2.1.1" + chai "^5.1.1" + tinyrainbow "^1.2.0" + +"@vitest/mocker@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/mocker/-/mocker-2.1.1.tgz#3e37c80ac267318d4aa03c5073a017d148dc8e67" + integrity sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA== + dependencies: + "@vitest/spy" "^2.1.0-beta.1" + estree-walker "^3.0.3" + magic-string "^0.30.11" + +"@vitest/pretty-format@2.1.1", "@vitest/pretty-format@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/pretty-format/-/pretty-format-2.1.1.tgz#fea25dd4e88c3c1329fbccd1d16b1d607eb40067" + integrity sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ== + dependencies: + tinyrainbow "^1.2.0" + +"@vitest/runner@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-2.1.1.tgz#f3b1fbc3c109fc44e2cceecc881344453f275559" + integrity sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA== + dependencies: + "@vitest/utils" "2.1.1" + pathe "^1.1.2" + +"@vitest/snapshot@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-2.1.1.tgz#38ef23104e90231fea5540754a19d8468afbba66" + integrity sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw== + dependencies: + "@vitest/pretty-format" "2.1.1" + magic-string "^0.30.11" + pathe "^1.1.2" + +"@vitest/spy@2.1.1", "@vitest/spy@^2.1.0-beta.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-2.1.1.tgz#20891f7421a994256ea0d739ed72f05532c78488" + integrity sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g== + dependencies: + tinyspy "^3.0.0" + +"@vitest/utils@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-2.1.1.tgz#284d016449ecb4f8704d198d049fde8360cc136e" + integrity sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ== + dependencies: + "@vitest/pretty-format" "2.1.1" + loupe "^3.1.1" + tinyrainbow "^1.2.0" + acorn-walk@^8.1.1: version "8.3.3" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" @@ -991,7 +636,7 @@ acorn@^8.11.0, acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.2: +ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -1047,7 +692,7 @@ any-promise@^1.0.0: resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== -anymatch@^3.0.3, anymatch@~3.1.2: +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== @@ -1060,83 +705,21 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -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-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +assertion-error@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7" + integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA== + async@^3.2.3: version "3.2.6" resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== -babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1169,16 +752,6 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.22.2: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== - dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" - node-releases "^2.0.14" - update-browserslist-db "^1.0.16" - bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -1186,18 +759,6 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "2.x" -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - bundle-require@^4.0.0: version "4.2.1" resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.2.1.tgz#4c450a5807381d20ade987bde8ac391544257919" @@ -1205,30 +766,21 @@ bundle-require@^4.0.0: dependencies: load-tsconfig "^0.2.3" -cac@^6.7.12: +cac@^6.7.12, cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001629: - version "1.0.30001640" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz#32c467d4bf1f1a0faa63fc793c2ba81169e7652f" - integrity sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA== +chai@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-5.1.1.tgz#f035d9792a22b481ead1c65908d14bb62ec1c82c" + integrity sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA== + dependencies: + assertion-error "^2.0.1" + check-error "^2.1.1" + deep-eql "^5.0.1" + loupe "^3.1.0" + pathval "^2.0.0" chalk@^2.4.2: version "2.4.2" @@ -1252,10 +804,10 @@ chalk@^5.3.0: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +check-error@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc" + integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw== chokidar@^3.5.1: version "3.6.0" @@ -1277,11 +829,6 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -cjs-module-lexer@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" - integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== - clean-stack@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-3.0.1.tgz#155bf0b2221bf5f4fba89528d24c5953f17fe3a8" @@ -1294,25 +841,6 @@ cli-spinners@^2.9.2: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== -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" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -1347,24 +875,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -1379,34 +889,24 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: +debug@^4.3.1: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== dependencies: ms "2.1.2" -debug@^4.3.7: +debug@^4.3.6, debug@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: ms "^2.1.3" -dedent@^1.0.0: - version "1.5.3" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" - integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== +deep-eql@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341" + integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q== diff-sequences@^29.6.3: version "29.6.3" @@ -1444,16 +944,6 @@ ejs@^3.1.10: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.796: - version "1.4.818" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.818.tgz#7762c8bfd15a07c3833b7f5deed990e9e5a4c24f" - integrity sha512-eGvIk2V0dGImV9gWLq8fDfTTsCAeMDwZqEPMr+jMInxZdnp9Us8UpovYpRCf9NQ7VOFgrN2doNSgvISbsbNpxA== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -1464,14 +954,7 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -esbuild@^0.21.4: +esbuild@^0.21.3, esbuild@^0.21.4: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== @@ -1500,11 +983,6 @@ esbuild@^0.21.4: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" -escalade@^3.1.1, escalade@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" - integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -1520,10 +998,12 @@ escape-string-regexp@^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== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" execa@^5.0.0: version "5.1.1" @@ -1540,12 +1020,7 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expect@^29.0.0, expect@^29.7.0: +expect@^29.0.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== @@ -1567,7 +1042,7 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: +fast-json-stable-stringify@2.x: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -1579,13 +1054,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -1600,14 +1068,6 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - foreground-child@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" @@ -1616,30 +1076,15 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -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== +get-func-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-package-type@^0.1.0: version "0.1.0" @@ -1670,23 +1115,6 @@ glob@^10.3.10, glob@^10.4.1: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globby@^11.0.3, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -1714,18 +1142,6 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -1736,47 +1152,16 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -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@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - 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" @@ -1784,13 +1169,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.13.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" - integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== - dependencies: - hasown "^2.0.2" - is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" @@ -1806,11 +1184,6 @@ is-fullwidth-code-point@^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-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - 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" @@ -1840,157 +1213,24 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.7" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - jackspeak@^3.1.2: version "3.4.1" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.1.tgz#145422416740568e9fc357bf60c844b3c1585f09" integrity sha512-U23pQPDnmYybVkYjObcuYMk43VRlMLLqLI+RdZy8s8WV8WsxO9SnqSroKaluuvcNOdCAlauKszDwd+umbot5Mg== dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -jake@^10.8.5: - version "10.9.2" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" - integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== - dependencies: - async "^3.2.3" - chalk "^4.0.2" - filelist "^1.0.4" - minimatch "^3.1.2" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== +jake@^10.8.5: + version "10.9.2" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" + async "^3.2.3" + chalk "^4.0.2" + filelist "^1.0.4" + minimatch "^3.1.2" jest-diff@^29.7.0: version "29.7.0" @@ -2002,68 +1242,11 @@ jest-diff@^29.7.0: jest-get-type "^29.6.3" pretty-format "^29.7.0" -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - jest-matcher-utils@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" @@ -2089,129 +1272,6 @@ jest-message-util@^29.7.0: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - jest-util@^29.0.0, jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" @@ -2224,52 +1284,6 @@ jest-util@^29.0.0, jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" - leven "^3.1.0" - pretty-format "^29.7.0" - -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== - dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.4.1: - version "29.7.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - joycon@^3.0.1: version "3.1.1" resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" @@ -2280,24 +1294,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.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" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -2308,16 +1304,6 @@ jsonc-parser@^3.2.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - lilconfig@^3.0.0, lilconfig@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" @@ -2333,13 +1319,6 @@ load-tsconfig@^0.2.3: resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - lodash.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -2355,42 +1334,35 @@ lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +loupe@^3.1.0, loupe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-3.1.1.tgz#71d038d59007d890e3247c5db97c1ec5a92edc54" + integrity sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw== + dependencies: + get-func-name "^2.0.1" + lru-cache@^10.2.0: version "10.3.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.3.1.tgz#a37050586f84ccfdb570148a253bf1632a29ef44" integrity sha512-9/8QXrtbGeMB6LxwQd4x1tIMnsmUxMvIH/qWGsccz6bt9Uln3S+sgAaqfQNhbGA8ufzs2fHuP/yqapGgP9Hh2g== -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== +magic-string@^0.30.11: + version "0.30.11" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954" + integrity sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A== dependencies: - semver "^7.5.3" + "@jridgewell/sourcemap-codec" "^1.5.0" make-error@1.x, make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - marked@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" @@ -2419,7 +1391,7 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -2464,20 +1436,10 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -2496,13 +1458,6 @@ object-assign@^4.0.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" @@ -2510,67 +1465,16 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - package-json-from-dist@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - path-scurry@^1.11.1: version "1.11.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" @@ -2592,28 +1496,36 @@ path@^0.12.7: process "^0.11.1" util "^0.10.3" -picocolors@^1.0.0, picocolors@^1.0.1: +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + +pathval@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.0.tgz#7e2550b422601d4f6b8e26f1301bc8f15a741a25" + integrity sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA== + +picocolors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== +picocolors@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pirates@^4.0.1, pirates@^4.0.4: +pirates@^4.0.1: version "4.0.6" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - postcss-load-config@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz#7159dcf626118d33e299f485d6afe4aff7c4a3e3" @@ -2622,6 +1534,15 @@ postcss-load-config@^4.0.1: lilconfig "^3.0.0" yaml "^2.3.4" +postcss@^8.4.43: + version "8.4.47" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== + dependencies: + nanoid "^3.3.7" + picocolors "^1.1.0" + source-map-js "^1.2.1" + prettier@^3.0.0: version "3.3.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" @@ -2641,14 +1562,6 @@ process@^0.11.1: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - publicodes@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.3.3.tgz#8e9491b282a408e918458dfedabc4512aac05cb1" @@ -2659,11 +1572,6 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -pure-rand@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" - integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -2681,37 +1589,11 @@ readdirp@~3.6.0: 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== -resolve.exports@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" - integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== - -resolve@^1.20.0: - version "1.22.8" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2742,6 +1624,31 @@ rollup@^4.0.2: "@rollup/rollup-win32-x64-msvc" "4.18.0" fsevents "~2.3.2" +rollup@^4.20.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.23.0.tgz#6eed667340a6e95407eebbbb65de1138fbce1a79" + integrity sha512-vXB4IT9/KLDrS2WRXmY22sVB2wTsTwkpxjB8Q3mnakTENcYw3FRmfdYDy/acNmls+lHmDazgrRjK/yQ6hQAtwA== + dependencies: + "@types/estree" "1.0.6" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.23.0" + "@rollup/rollup-android-arm64" "4.23.0" + "@rollup/rollup-darwin-arm64" "4.23.0" + "@rollup/rollup-darwin-x64" "4.23.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.23.0" + "@rollup/rollup-linux-arm-musleabihf" "4.23.0" + "@rollup/rollup-linux-arm64-gnu" "4.23.0" + "@rollup/rollup-linux-arm64-musl" "4.23.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.23.0" + "@rollup/rollup-linux-riscv64-gnu" "4.23.0" + "@rollup/rollup-linux-s390x-gnu" "4.23.0" + "@rollup/rollup-linux-x64-gnu" "4.23.0" + "@rollup/rollup-linux-x64-musl" "4.23.0" + "@rollup/rollup-win32-arm64-msvc" "4.23.0" + "@rollup/rollup-win32-ia32-msvc" "4.23.0" + "@rollup/rollup-win32-x64-msvc" "4.23.0" + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -2749,12 +1656,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.5.3, semver@^7.5.4: +semver@^7.5.3: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -2786,7 +1688,12 @@ shiki@^0.14.1: vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" -signal-exit@^3.0.3, signal-exit@^3.0.7: +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + +signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -2806,13 +1713,10 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== source-map@0.8.0-beta.0: version "0.8.0-beta.0" @@ -2821,16 +1725,6 @@ source-map@0.8.0-beta.0: dependencies: whatwg-url "^7.0.0" -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -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.3: version "2.0.6" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" @@ -2838,13 +1732,15 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== "string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" @@ -2855,7 +1751,7 @@ string-length@^4.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.0.0, string-width@^4.1.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== @@ -2894,21 +1790,11 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - sucrase@^3.20.3: version "3.35.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" @@ -2936,27 +1822,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8, supports-color@^8.0.0: +supports-color@^8: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -2971,15 +1843,30 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== +tinybench@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== +tinyexec@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.0.tgz#ed60cfce19c17799d4a241e06b31b0ec2bee69e6" + integrity sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg== + +tinypool@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-1.0.1.tgz#c64233c4fac4304e109a64340178760116dbe1fe" + integrity sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA== + +tinyrainbow@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz#5c57d2fc0fb3d1afd78465c33ca885d04f02abb5" + integrity sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ== + +tinyspy@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-3.0.2.tgz#86dd3cf3d737b15adcf17d7887c84a75201df20a" + integrity sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q== to-regex-range@^5.0.1: version "5.0.1" @@ -3058,11 +1945,6 @@ tsup@^8.0.2: sucrase "^3.20.3" tree-kill "^1.2.2" -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -3093,14 +1975,6 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -update-browserslist-db@^1.0.16: - version "1.1.0" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" - integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== - dependencies: - escalade "^3.1.2" - picocolors "^1.0.1" - util@^0.10.3: version "0.10.4" resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" @@ -3113,14 +1987,51 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" +vite-node@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-2.1.1.tgz#7d46f623c04dfed6df34e7127711508a3386fa1c" + integrity sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA== + dependencies: + cac "^6.7.14" + debug "^4.3.6" + pathe "^1.1.2" + vite "^5.0.0" + +vite@^5.0.0: + version "5.4.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.8.tgz#af548ce1c211b2785478d3ba3e8da51e39a287e8" + integrity sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ== + dependencies: + esbuild "^0.21.3" + postcss "^8.4.43" + rollup "^4.20.0" + optionalDependencies: + fsevents "~2.3.3" + +vitest@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-2.1.1.tgz#24a6f6f5d894509f10685b82de008c507faacbb1" + integrity sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA== + dependencies: + "@vitest/expect" "2.1.1" + "@vitest/mocker" "2.1.1" + "@vitest/pretty-format" "^2.1.1" + "@vitest/runner" "2.1.1" + "@vitest/snapshot" "2.1.1" + "@vitest/spy" "2.1.1" + "@vitest/utils" "2.1.1" + chai "^5.1.1" + debug "^4.3.6" + magic-string "^0.30.11" + pathe "^1.1.2" + std-env "^3.7.0" + tinybench "^2.9.0" + tinyexec "^0.3.0" + tinypool "^1.0.0" + tinyrainbow "^1.2.0" + vite "^5.0.0" + vite-node "2.1.1" + why-is-node-running "^2.3.0" vscode-oniguruma@^1.7.0: version "1.7.0" @@ -3132,13 +2043,6 @@ vscode-textmate@^8.0.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -3160,6 +2064,14 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +why-is-node-running@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" + integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + widest-line@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" @@ -3199,58 +2111,17 @@ wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -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@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yaml@^2.3.4, yaml@^2.4.5: version "2.4.5" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.5.tgz#60630b206dd6d84df97003d33fc1ddf6296cca5e" integrity sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg== -yargs-parser@^21.0.1, yargs-parser@^21.1.1: +yargs-parser@^21.0.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.3.1: - 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" - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From af5a39cbc1e41824764b507f2397664d547163b7 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 16:02:15 +0200 Subject: [PATCH 03/30] feat: install deps with the init command --- package.json | 3 +- src/commands/init.ts | 125 ++++++++++++++++++++++++++++++------- src/utils/pjson.ts | 12 +++- test/cli-utils.ts | 4 +- test/commands/init.test.ts | 24 +++++-- yarn.lock | 12 ++++ 6 files changed, 146 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index a3c344f..5bf2ce3 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,8 @@ "glob": "^10.4.1", "path": "^0.12.7", "publicodes": "^1.3.3", - "yaml": "^2.4.5" + "yaml": "^2.4.5", + "yocto-spinner": "^0.1.0" }, "devDependencies": { "@oclif/test": "^4.0.9", diff --git a/src/commands/init.ts b/src/commands/init.ts index c3282ac..cf2ddb4 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -1,49 +1,83 @@ -import { Args, Command, Flags, ux } from '@oclif/core' -import { exec } from 'node:child_process' -import * as p from '@clack/prompts' -import chalk from 'chalk' import fs from 'fs' import path from 'path' +import { execSync } from 'node:child_process' +import { Command } from '@oclif/core' +import * as p from '@clack/prompts' +import chalk from 'chalk' +import yoctospinner from 'yocto-spinner' + import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' export default class Init extends Command { static override args = {} - static override description = 'initialize a new project' + static override summary = 'Initialize a new project' - static override examples = ['<%= command.id %>'] + static override description = ` +If no package.json file is found in the current directory, this command will +create one and install the necessary dependencies with the specified package +manager. Otherwise, it will update the existing package.json file. +` + + static override examples = [ + { command: '<%= command.id %>', description: 'initialize a new project' }, + { + command: '<%= command.id %> -p yarn', + description: 'initialize a new project with Yarn', + }, + ] static override flags = {} public async run(): Promise { p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) - const pjson = getPackageJson() + const pkgJSON = getPackageJson() - if (pjson) { + if (pkgJSON) { p.log.info(`Updating existing ${chalk.bold('package.json')} file`) - updatePackageJson(pjson) + this.updatePackageJson(pkgJSON) } else { p.log.step(`Creating a new ${chalk.bold('package.json')} file`) const pjson = await askPackageJsonInfo() - updatePackageJson(pjson) + this.updatePackageJson(pjson) } + const pkgManager = findPackageManager() ?? (await askPackageManager()) + installDeps(pkgManager) + p.outro('🚀 publicodes is ready to use!') } -} -function updatePackageJson(pjson: PackageJson): void { - const packageJsonPath = path.join(process.cwd(), 'package.json') - const fullPjson = { ...basePackageJson, ...pjson } - try { - fs.writeFileSync(packageJsonPath, JSON.stringify(fullPjson, null, 2)) - p.log.success(`${chalk.bold('package.json')} file written`) - } catch (error) { - p.cancel( - `An error occurred while writing the ${chalk.magenta('package.json')} file`, - ) - process.exit(1) + private updatePackageJson(pkgJSON: PackageJson): void { + const packageJsonPath = path.join(process.cwd(), 'package.json') + + pkgJSON.type = basePackageJson.type + pkgJSON.main = basePackageJson.main + pkgJSON.types = basePackageJson.types + pkgJSON.license = pkgJSON.license ?? basePackageJson.license + pkgJSON.version = pkgJSON.version ?? basePackageJson.version + pkgJSON.description = pkgJSON.description ?? basePackageJson.description + pkgJSON.author = pkgJSON.author ?? basePackageJson.author + pkgJSON.files = basePackageJson.files!.concat(pkgJSON.files ?? []) + pkgJSON.peerDependencies = { + ...pkgJSON.peerDependencies, + ...basePackageJson.peerDependencies, + } + pkgJSON.devDependencies = { + ...pkgJSON.devDependencies, + '@publicodes/tools': `^${this.config.pjson.version}`, + } + + try { + fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJSON, null, 2)) + p.log.success(`${chalk.bold('package.json')} file written`) + } catch (error) { + p.cancel( + `An error occurred while writing the ${chalk.magenta('package.json')} file`, + ) + process.exit(1) + } } } @@ -81,3 +115,50 @@ function askPackageJsonInfo(): Promise { }, ) } + +type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' + +function findPackageManager(): PackageManager | undefined { + if (fs.existsSync('yarn.lock')) { + return 'yarn' + } + if (fs.existsSync('pnpm-lock.yaml')) { + return 'pnpm' + } + if (fs.existsSync('bun.lock')) { + return 'bun' + } + if (fs.existsSync('package-lock.json')) { + return 'npm' + } +} + +function askPackageManager(): Promise { + const checkIfInstalled = (cmd: string): boolean => { + try { + execSync(`${cmd} -v`, { stdio: 'ignore' }) + return true + } catch (error) { + return false + } + } + return p.select({ + message: 'Choose a package manager', + options: ['npm', 'yarn', 'pnpm', 'bun'] + .filter((pm) => checkIfInstalled(pm)) + .map((pm) => ({ value: pm, label: pm })), + }) as Promise +} + +function installDeps(pkgManager: PackageManager): void { + const s = p.spinner() + s.start(`Installing dependencies with ${pkgManager}`) + try { + execSync(`${pkgManager} install -y`, { stdio: 'ignore' }) + s.stop('Dependencies installed with success', 0) + } catch (error) { + p.log.error(error.message) + p.cancel('An error occurred while installing dependencies') + process.exit(1) + } +} diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index 9aadd86..6045e89 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -20,6 +20,12 @@ export type PackageJson = { peerDependencies?: { [key: string]: string } + dependencies?: { + [key: string]: string + } + devDependencies?: { + [key: string]: string + } } export const basePackageJson: PackageJson = { @@ -28,10 +34,10 @@ export const basePackageJson: PackageJson = { description: '', author: '', type: 'module', - main: 'dist/index.js', - types: 'dist/index.d.ts', + main: 'build/index.js', + types: 'build/index.d.ts', license: 'MIT', - files: ['dist'], + files: ['build'], peerDependencies: { // TODO: how to get the latest version of publicodes? publicodes: '^1.5.1', diff --git a/test/cli-utils.ts b/test/cli-utils.ts index 6befb80..8ae6e14 100644 --- a/test/cli-utils.ts +++ b/test/cli-utils.ts @@ -73,7 +73,7 @@ const TMP_DIR = fs.realpathSync(os.tmpdir()) export async function runInDir( dir: 'tmp' | string, - fn: () => Promise, + fn: (cwd: string) => Promise, ): Promise { const baseCwd = process.cwd() const ctd = @@ -88,7 +88,7 @@ export async function runInDir( process.chdir(ctd) try { - await fn() + await fn(ctd) } finally { process.chdir(baseCwd) if (dir === 'tmp' && fs.existsSync(ctd)) { diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 4d24c76..4754524 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -1,31 +1,43 @@ import { execSync } from 'child_process' import { CLIExecutor, runInDir } from '../cli-utils' import fs from 'fs' +import { PackageJson } from '../../src/utils/pjson' +import path from 'path' describe('publicodes init', () => { it('should update existing package.json', async () => { const cli = new CLIExecutor() - runInDir('tmp', async () => { + runInDir('tmp', async (cwd) => { execSync('yarn init -y') + const { stdout } = await cli.execCommand('init') expect(stdout).toContain('existing package.json file') expect(stdout).toContain('package.json file written') expect(stdout).toContain('🚀 publicodes is ready to use!') + const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) - expect(packageJson).toMatchObject({ + expect(packageJson).toMatchObject({ + name: path.basename(cwd), type: 'module', - main: 'dist/index.js', - types: 'dist/index.d.ts', - files: ['dist'], + main: 'build/index.js', + types: 'build/index.d.ts', + files: ['build'], peerDependencies: { publicodes: '^1.5.1', }, devDependencies: { - '@publicodes/tools': '^1.5.1', + '@publicodes/tools': packageJson.devDependencies['@publicodes/tools'], }, + version: '1.0.0', + description: '', + author: '', + license: 'MIT', }) + + expect(fs.existsSync('node_modules')).toBe(true) + expect(fs.existsSync('yarn.lock')).toBe(true) }) }) }) diff --git a/yarn.lock b/yarn.lock index af81b9c..61596f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2125,3 +2125,15 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-spinner@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-spinner/-/yocto-spinner-0.1.0.tgz#a6579796928a179acbe7a0ffd697e2df7d7a8a4c" + integrity sha512-sBra0N4uhNn5UibnOz/HJxB1a0tzZ5zXbqnDe+tfRR3BGy+BmOrzrnQCZRJI7C++JiSZaPygPeNon4QCUmMQ4g== + dependencies: + yoctocolors "^2.1.1" + +yoctocolors@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/yoctocolors/-/yoctocolors-2.1.1.tgz#e0167474e9fbb9e8b3ecca738deaa61dd12e56fc" + integrity sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ== From 66e5b6eff8a5b31413bd991ff2aad001ba0aa8b4 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 17:40:31 +0200 Subject: [PATCH 04/30] feat(commands/init): add the --pkg-manager flag --- package.json | 3 +-- src/commands/init.ts | 28 ++++++++++++++++++----- test/commands-data/yarn-init/package.json | 16 ------------- test/commands/base.test.ts | 3 +-- test/commands/init.test.ts | 3 ++- yarn.lock | 23 +++++++++---------- 6 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 test/commands-data/yarn-init/package.json diff --git a/package.json b/package.json index 5bf2ce3..a3c344f 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,7 @@ "glob": "^10.4.1", "path": "^0.12.7", "publicodes": "^1.3.3", - "yaml": "^2.4.5", - "yocto-spinner": "^0.1.0" + "yaml": "^2.4.5" }, "devDependencies": { "@oclif/test": "^4.0.9", diff --git a/src/commands/init.ts b/src/commands/init.ts index cf2ddb4..f1c26d2 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -1,12 +1,14 @@ import fs from 'fs' import path from 'path' import { execSync } from 'node:child_process' -import { Command } from '@oclif/core' +import { Command, Flags } from '@oclif/core' import * as p from '@clack/prompts' import chalk from 'chalk' -import yoctospinner from 'yocto-spinner' import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' +import { OptionFlag } from '@oclif/core/lib/interfaces' + +type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' export default class Init extends Command { static override args = {} @@ -27,11 +29,24 @@ manager. Otherwise, it will update the existing package.json file. }, ] - static override flags = {} + static override flags = { + 'pkg-manager': Flags.string({ + char: 'p', + summary: 'The package manager to use', + description: ` +The package manager that will be used to install dependencies. If not provided, +the command will try to detect the package manager based on the lock files +present in the project directory, otherwise it will prompt the user to choose +one. +`, + options: ['npm', 'yarn', 'pnpm', 'bun'], + }) as OptionFlag, + } public async run(): Promise { p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) + const { flags } = await this.parse(Init) const pkgJSON = getPackageJson() if (pkgJSON) { @@ -43,7 +58,10 @@ manager. Otherwise, it will update the existing package.json file. this.updatePackageJson(pjson) } - const pkgManager = findPackageManager() ?? (await askPackageManager()) + const pkgManager: PackageManager = + flags['pkg-manager'] ?? + findPackageManager() ?? + (await askPackageManager()) installDeps(pkgManager) p.outro('🚀 publicodes is ready to use!') @@ -116,8 +134,6 @@ function askPackageJsonInfo(): Promise { ) } -type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' - function findPackageManager(): PackageManager | undefined { if (fs.existsSync('yarn.lock')) { return 'yarn' diff --git a/test/commands-data/yarn-init/package.json b/test/commands-data/yarn-init/package.json deleted file mode 100644 index c28622d..0000000 --- a/test/commands-data/yarn-init/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "yarn-init", - "version": "1.0.0", - "description": "", - "author": "", - "type": "module", - "main": "index.js", - "types": "dist/index.d.ts", - "license": "MIT", - "files": [ - "dist" - ], - "peerDependencies": { - "publicodes": "^1.5.1" - } -} \ No newline at end of file diff --git a/test/commands/base.test.ts b/test/commands/base.test.ts index 394f498..32578f8 100644 --- a/test/commands/base.test.ts +++ b/test/commands/base.test.ts @@ -6,8 +6,7 @@ describe('publicodes --help', () => { runInDir('tmp', async () => { const { stdout } = await cli.execCommand('--help') - - expect(stdout).toContain('init initialize a new project') + expect(stdout).toContain('init Initialize a new project') }) }) }) diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 4754524..cd3f39e 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -3,6 +3,7 @@ import { CLIExecutor, runInDir } from '../cli-utils' import fs from 'fs' import { PackageJson } from '../../src/utils/pjson' import path from 'path' +import {} from '@oclif/test' describe('publicodes init', () => { it('should update existing package.json', async () => { @@ -11,7 +12,7 @@ describe('publicodes init', () => { runInDir('tmp', async (cwd) => { execSync('yarn init -y') - const { stdout } = await cli.execCommand('init') + const { stdout } = await cli.execCommand('init -p yarn') expect(stdout).toContain('existing package.json file') expect(stdout).toContain('package.json file written') diff --git a/yarn.lock b/yarn.lock index 61596f9..2c9d851 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,6 +312,17 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@publicodes/tools@^1.2.5": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-1.2.5.tgz#ab3177a027d530718057600f78512473a392d8e7" + integrity sha512-Cv2nhqd8ucKhFNi6g9aiUqV+PghAdZXk0ECmzXUQjr7AWYVoQZo+/b6rnGcR5uuwg3HOoYqRY8sUenvz80I2sg== + dependencies: + "@types/node" "^18.11.18" + glob "^10.4.1" + path "^0.12.7" + publicodes "^1.3.3" + yaml "^2.4.5" + "@rollup/rollup-android-arm-eabi@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" @@ -2125,15 +2136,3 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-spinner@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-spinner/-/yocto-spinner-0.1.0.tgz#a6579796928a179acbe7a0ffd697e2df7d7a8a4c" - integrity sha512-sBra0N4uhNn5UibnOz/HJxB1a0tzZ5zXbqnDe+tfRR3BGy+BmOrzrnQCZRJI7C++JiSZaPygPeNon4QCUmMQ4g== - dependencies: - yoctocolors "^2.1.1" - -yoctocolors@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/yoctocolors/-/yoctocolors-2.1.1.tgz#e0167474e9fbb9e8b3ecca738deaa61dd12e56fc" - integrity sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ== From 16081c3a6a40dbbdbd86b49b0950ebda70b025c2 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 18:13:28 +0200 Subject: [PATCH 05/30] ci: use bun to run tests files --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 366ce02..724199b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ jobs: - uses: actions/setup-node@v3 with: cache: yarn + - uses: oven-sh/setup-bun@v2 + - run: yarn install --immutable - name: Build package From 8b035f0be494e2c9c490b2a3691d9d1692dcac9e Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 19:11:02 +0200 Subject: [PATCH 06/30] fix(command/init): fix spinning in prod --- src/commands/init.ts | 45 ++++++++++++++++++++++++++++++++------------ src/utils/pjson.ts | 9 ++++++++- yarn.lock | 11 ----------- 3 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index f1c26d2..9c7c6f3 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -7,6 +7,7 @@ import chalk from 'chalk' import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' import { OptionFlag } from '@oclif/core/lib/interfaces' +import { spawn } from 'child_process' type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' @@ -62,7 +63,9 @@ one. flags['pkg-manager'] ?? findPackageManager() ?? (await askPackageManager()) - installDeps(pkgManager) + await installDeps(pkgManager) + + generateBaseFiles() p.outro('🚀 publicodes is ready to use!') } @@ -86,6 +89,13 @@ one. ...pkgJSON.devDependencies, '@publicodes/tools': `^${this.config.pjson.version}`, } + pkgJSON.scripts = { + ...pkgJSON.scripts, + ...basePackageJson.scripts, + } + if (pkgJSON.name.startsWith('@')) { + pkgJSON.publishConfig = { access: 'public' } + } try { fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJSON, null, 2)) @@ -114,8 +124,8 @@ function askPackageJsonInfo(): Promise { version: () => p.text({ message: 'Version', - defaultValue: '1.0.0', - placeholder: '1.0.0', + defaultValue: '0.1.0', + placeholder: '0.1.0', }), author: () => p.text({ message: 'Author', defaultValue: '' }), license: () => @@ -166,15 +176,26 @@ function askPackageManager(): Promise { }) as Promise } -function installDeps(pkgManager: PackageManager): void { +async function installDeps(pkgManager: PackageManager): Promise { const s = p.spinner() + s.start(`Installing dependencies with ${pkgManager}`) - try { - execSync(`${pkgManager} install -y`, { stdio: 'ignore' }) - s.stop('Dependencies installed with success', 0) - } catch (error) { - p.log.error(error.message) - p.cancel('An error occurred while installing dependencies') - process.exit(1) - } + return new Promise((resolve) => { + const program = spawn(pkgManager, ['install', '-y'], { stdio: 'ignore' }) + + program.on('error', (error) => { + s.stop('An error occurred while installing dependencies') + p.log.error(error.message) + process.exit(1) + }) + + program.on('close', () => { + s.stop('Dependencies installed') + resolve() + }) + }) +} + +function generateBaseFiles() { + p.log.step('Generating files') } diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index 6045e89..dcff394 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -8,6 +8,7 @@ export type PackageJson = { type?: string types?: string files?: string[] + // TODO: infer from the git config repository?: { url: string type: string @@ -26,11 +27,14 @@ export type PackageJson = { devDependencies?: { [key: string]: string } + publishConfig?: { + access: string + } } export const basePackageJson: PackageJson = { name: '', - version: '1.0.0', + version: '0.1.0', description: '', author: '', type: 'module', @@ -42,6 +46,9 @@ export const basePackageJson: PackageJson = { // TODO: how to get the latest version of publicodes? publicodes: '^1.5.1', }, + scripts: { + build: 'publicodes build', + }, } export function getPackageJson(): PackageJson | undefined { diff --git a/yarn.lock b/yarn.lock index 2c9d851..af81b9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,17 +312,6 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@publicodes/tools@^1.2.5": - version "1.2.5" - resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-1.2.5.tgz#ab3177a027d530718057600f78512473a392d8e7" - integrity sha512-Cv2nhqd8ucKhFNi6g9aiUqV+PghAdZXk0ECmzXUQjr7AWYVoQZo+/b6rnGcR5uuwg3HOoYqRY8sUenvz80I2sg== - dependencies: - "@types/node" "^18.11.18" - glob "^10.4.1" - path "^0.12.7" - publicodes "^1.3.3" - yaml "^2.4.5" - "@rollup/rollup-android-arm-eabi@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" From b215bbe88d255253497a6848333b12a932a44629 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Tue, 1 Oct 2024 20:13:12 +0200 Subject: [PATCH 07/30] feat(command/init): generate README and src/base.publicodes --- src/commands/init.ts | 120 ++++++++++++++++++++++++++++++++++--- src/utils/pjson.ts | 2 +- test/commands/init.test.ts | 7 ++- 3 files changed, 117 insertions(+), 12 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index 9c7c6f3..a59a129 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -4,6 +4,7 @@ import { execSync } from 'node:child_process' import { Command, Flags } from '@oclif/core' import * as p from '@clack/prompts' import chalk from 'chalk' +import { setTimeout } from 'timers/promises' import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' import { OptionFlag } from '@oclif/core/lib/interfaces' @@ -48,15 +49,15 @@ one. p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) const { flags } = await this.parse(Init) - const pkgJSON = getPackageJson() + let pkgJSON = getPackageJson() if (pkgJSON) { p.log.info(`Updating existing ${chalk.bold('package.json')} file`) this.updatePackageJson(pkgJSON) } else { p.log.step(`Creating a new ${chalk.bold('package.json')} file`) - const pjson = await askPackageJsonInfo() - this.updatePackageJson(pjson) + pkgJSON = await askPackageJsonInfo() + this.updatePackageJson(pkgJSON) } const pkgManager: PackageManager = @@ -65,9 +66,18 @@ one. (await askPackageManager()) await installDeps(pkgManager) - generateBaseFiles() + await generateBaseFiles(pkgJSON, pkgManager) + + p.note( + `${chalk.bold('You can now:')} +- write your Publicodes rules in ${chalk.bold.yellow('.src/')} +- compile them using: ${chalk.bold.yellow(`${pkgManager} run compile`)}`, + 'Publicodes is ready to use 🚀', + ) - p.outro('🚀 publicodes is ready to use!') + p.outro( + `New to Publicodes? Learn more at ${chalk.underline.cyan('https://publi.codes/docs')}`, + ) } private updatePackageJson(pkgJSON: PackageJson): void { @@ -99,10 +109,10 @@ one. try { fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJSON, null, 2)) - p.log.success(`${chalk.bold('package.json')} file written`) + p.log.step(`${chalk.bold('package.json')} file written`) } catch (error) { p.cancel( - `An error occurred while writing the ${chalk.magenta('package.json')} file`, + `An error occurred while writing the ${chalk.bold('package.json')} file`, ) process.exit(1) } @@ -196,6 +206,98 @@ async function installDeps(pkgManager: PackageManager): Promise { }) } -function generateBaseFiles() { - p.log.step('Generating files') +async function generateBaseFiles( + pjson: PackageJson, + pkgManager: PackageManager, +): Promise { + const s = p.spinner() + + s.start('Generating files') + return new Promise(async (resolve) => { + try { + // Generate README.md + if (!fs.existsSync('README.md')) { + fs.writeFileSync('README.md', getReadmeContent(pjson, pkgManager)) + } + + // Generate src directory with a base.publicodes file as an example + if (!fs.existsSync('src')) { + fs.mkdirSync('src') + } + if (!fs.existsSync('src/base.publicodes')) { + fs.writeFileSync('src/base.publicodes', BASE_PUBLICODES) + } + } catch (error) { + s.stop('An error occurred while generating files') + p.log.error(error.message) + process.exit(1) + } finally { + // Wait for the spinner to display the message + await setTimeout(1) + s.stop('Files generated') + resolve() + } + }) } + +function getReadmeContent( + pjson: PackageJson, + pkgManager: PackageManager, +): string { + return `# ${pjson.name} + + ${pjson.description} + + ## Installation + + \`\`\`sh + npm install ${pjson.name} publicodes + \`\`\` + + ## Usage + + \`\`\`typescript + import { Engine } from 'publicodes' + import rules from '${pjson.name}' + + const engine = new Engine(rules) + + console.log(engine.evaluate('salaire net').nodeValue) + // 1957.5 + + engine.setSituation({ 'salaire brut': 4000 }) + console.log(engine.evaluate('salaire net').nodeValue) + // 3120 + \`\`\` + + ## Development + + \`\`\`sh + // Install the dependencies + ${pkgManager} install + + // Compile the Publicodes rules + ${pkgManager} run compile + + // Run the documentation server + ${pkgManager} run doc + \`\`\` +` +} + +const BASE_PUBLICODES = `# Règles d'exemples automatiquement générées + # Supprimez ce fichier ou ajoutez vos propres règles + + salaire net: salaire brut - cotisations salariales + + salaire brut: + titre: Salaire brut mensuel + par défaut: 2500 €/mois + + cotisations salariales: + produit: + - salaire brut + - taux + avec: + taux: 21.7% + ` diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index dcff394..cb5e93b 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -47,7 +47,7 @@ export const basePackageJson: PackageJson = { publicodes: '^1.5.1', }, scripts: { - build: 'publicodes build', + compile: 'publicodes compile', }, } diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index cd3f39e..de1e17b 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -14,9 +14,10 @@ describe('publicodes init', () => { const { stdout } = await cli.execCommand('init -p yarn') - expect(stdout).toContain('existing package.json file') + expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') - expect(stdout).toContain('🚀 publicodes is ready to use!') + expect(stdout).toContain('Files generated') + expect(stdout).toContain('New to Publicodes?') const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) expect(packageJson).toMatchObject({ @@ -39,6 +40,8 @@ describe('publicodes init', () => { expect(fs.existsSync('node_modules')).toBe(true) expect(fs.existsSync('yarn.lock')).toBe(true) + expect(fs.existsSync('README.md')).toBe(true) + expect(fs.existsSync('src/base.publicodes')).toBe(true) }) }) }) From 9529f572cec8a068ac897cd3590a679c9c82f073 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 10:54:44 +0200 Subject: [PATCH 08/30] feat(command/init): ask to install deps --- src/commands/init.ts | 28 +++++++++++++-- test/commands/init.test.ts | 74 +++++++++++++++++++++++++++----------- 2 files changed, 79 insertions(+), 23 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index a59a129..bc29c1e 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -35,14 +35,25 @@ manager. Otherwise, it will update the existing package.json file. 'pkg-manager': Flags.string({ char: 'p', summary: 'The package manager to use', - description: ` -The package manager that will be used to install dependencies. If not provided, + description: `The package manager that will be used to install dependencies. If not provided, the command will try to detect the package manager based on the lock files present in the project directory, otherwise it will prompt the user to choose one. `, options: ['npm', 'yarn', 'pnpm', 'bun'], }) as OptionFlag, + 'no-install': Flags.boolean({ + char: 'n', + summary: 'Do not install dependencies', + description: `By default, the commmand will try to install the dependencies using the +specified package manager (or the detected one). Use this flag to skip the +installation.`, + }), + install: Flags.boolean({ + char: 'i', + summary: 'Install dependencies', + hidden: true, + }), } public async run(): Promise { @@ -64,7 +75,18 @@ one. flags['pkg-manager'] ?? findPackageManager() ?? (await askPackageManager()) - await installDeps(pkgManager) + + const shouldInstall = + flags.install || + (flags['no-install'] === undefined + ? await p.confirm({ + message: 'Do you want to install the dependencies?', + }) + : !flags['no-install']) + + if (shouldInstall) { + await installDeps(pkgManager) + } await generateBaseFiles(pkgJSON, pkgManager) diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index de1e17b..998530a 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -5,38 +5,25 @@ import { PackageJson } from '../../src/utils/pjson' import path from 'path' import {} from '@oclif/test' +const cli = new CLIExecutor() + describe('publicodes init', () => { it('should update existing package.json', async () => { - const cli = new CLIExecutor() - runInDir('tmp', async (cwd) => { execSync('yarn init -y') - const { stdout } = await cli.execCommand('init -p yarn') + const { stdout } = await cli.execCommand('init -p yarn --install') expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') + expect(stdout).toContain('Dependencies installed') expect(stdout).toContain('Files generated') expect(stdout).toContain('New to Publicodes?') const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) - expect(packageJson).toMatchObject({ - name: path.basename(cwd), - type: 'module', - main: 'build/index.js', - types: 'build/index.d.ts', - files: ['build'], - peerDependencies: { - publicodes: '^1.5.1', - }, - devDependencies: { - '@publicodes/tools': packageJson.devDependencies['@publicodes/tools'], - }, - version: '1.0.0', - description: '', - author: '', - license: 'MIT', - }) + expect(packageJson).toMatchObject( + getExpectedBasePackageJson(cwd, packageJson), + ) expect(fs.existsSync('node_modules')).toBe(true) expect(fs.existsSync('yarn.lock')).toBe(true) @@ -44,4 +31,51 @@ describe('publicodes init', () => { expect(fs.existsSync('src/base.publicodes')).toBe(true) }) }) + + it('should update existing package.json but no install', async () => { + runInDir('tmp', async (cwd) => { + execSync('yarn init -y') + + const { stdout } = await cli.execCommand('init -p yarn --no-install') + + expect(stdout).toContain('Updating existing package.json file') + expect(stdout).toContain('package.json file written') + expect(stdout).toContain('Files generated') + expect(stdout).toContain('New to Publicodes?') + + const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) + expect(packageJson).toMatchObject( + getExpectedBasePackageJson(cwd, packageJson), + ) + + expect(!fs.existsSync('node_modules')).toBe(true) + expect(!fs.existsSync('yarn.lock')).toBe(true) + expect(fs.existsSync('README.md')).toBe(true) + expect(fs.existsSync('src/base.publicodes')).toBe(true) + }) + }) }) + +function getExpectedBasePackageJson( + cwd: string, + packageJson: PackageJson, +): PackageJson { + return { + name: path.basename(cwd), + type: 'module', + main: 'build/index.js', + types: 'build/index.d.ts', + files: ['build'], + peerDependencies: { + publicodes: '^1.5.1', + }, + devDependencies: { + '@publicodes/tools': + packageJson.devDependencies?.['@publicodes/tools'] ?? '', + }, + version: '1.0.0', + description: '', + author: '', + license: 'MIT', + } +} From fb5e4c891b10509e9551d16633acb0b1c2593e26 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 16:22:00 +0200 Subject: [PATCH 09/30] refactor(command): better error handling --- package.json | 2 +- src/commands/init.ts | 89 ++++++++++++++++++++++---------------- src/utils/cli.ts | 59 +++++++++++++++++++++++++ test/commands/init.test.ts | 1 - typedoc.json | 1 + yarn.lock | 8 ++-- 6 files changed, 117 insertions(+), 43 deletions(-) create mode 100644 src/utils/cli.ts diff --git a/package.json b/package.json index a3c344f..7567335 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "chalk": "^5.3.0", "glob": "^10.4.1", "path": "^0.12.7", - "publicodes": "^1.3.3", + "publicodes": "^1.5.1", "yaml": "^2.4.5" }, "devDependencies": { diff --git a/src/commands/init.ts b/src/commands/init.ts index bc29c1e..f4f06f4 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -4,8 +4,13 @@ import { execSync } from 'node:child_process' import { Command, Flags } from '@oclif/core' import * as p from '@clack/prompts' import chalk from 'chalk' -import { setTimeout } from 'timers/promises' +import { + exitWithError, + runAsyncWithSpinner, + runWithSpinner, + Spinner, +} from '../utils/cli' import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' import { OptionFlag } from '@oclif/core/lib/interfaces' import { spawn } from 'child_process' @@ -15,7 +20,7 @@ type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' export default class Init extends Command { static override args = {} - static override summary = 'Initialize a new project' + static override summary = 'Initialize a new project.' static override description = ` If no package.json file is found in the current directory, this command will @@ -24,17 +29,20 @@ manager. Otherwise, it will update the existing package.json file. ` static override examples = [ - { command: '<%= command.id %>', description: 'initialize a new project' }, { - command: '<%= command.id %> -p yarn', - description: 'initialize a new project with Yarn', + command: '<%= config.bin %> <%= command.id %>', + description: 'Initialize a new project.', + }, + { + command: '<%= config.bin %> <%= command.id %> -p yarn', + description: 'Initialize a new project with Yarn.', }, ] static override flags = { 'pkg-manager': Flags.string({ char: 'p', - summary: 'The package manager to use', + summary: 'The package manager to use.', description: `The package manager that will be used to install dependencies. If not provided, the command will try to detect the package manager based on the lock files present in the project directory, otherwise it will prompt the user to choose @@ -44,14 +52,14 @@ one. }) as OptionFlag, 'no-install': Flags.boolean({ char: 'n', - summary: 'Do not install dependencies', + summary: 'Skip the installation of dependencies.', description: `By default, the commmand will try to install the dependencies using the specified package manager (or the detected one). Use this flag to skip the installation.`, }), install: Flags.boolean({ char: 'i', - summary: 'Install dependencies', + summary: 'Install dependencies.', hidden: true, }), } @@ -209,33 +217,43 @@ function askPackageManager(): Promise { } async function installDeps(pkgManager: PackageManager): Promise { - const s = p.spinner() - - s.start(`Installing dependencies with ${pkgManager}`) - return new Promise((resolve) => { - const program = spawn(pkgManager, ['install', '-y'], { stdio: 'ignore' }) - - program.on('error', (error) => { - s.stop('An error occurred while installing dependencies') - p.log.error(error.message) - process.exit(1) - }) - - program.on('close', () => { - s.stop('Dependencies installed') - resolve() - }) - }) + return runAsyncWithSpinner( + 'Installing dependencies', + 'Dependencies installed', + (spinner: Spinner) => { + return new Promise((resolve) => { + const program = spawn(pkgManager, ['install', '-y'], { + stdio: 'ignore', + }) + + program.on('error', (error) => { + exitWithError( + 'An error occurred while installing dependencies', + spinner, + error.message, + ) + }) + + program.on('close', (code) => { + if (code !== 0) { + exitWithError( + `An error occurred while installing dependencies (exec: ${pkgManager} install -y)`, + spinner, + `Process exited with code ${code}`, + ) + } + resolve() + }) + }) + }, + ) } async function generateBaseFiles( pjson: PackageJson, pkgManager: PackageManager, ): Promise { - const s = p.spinner() - - s.start('Generating files') - return new Promise(async (resolve) => { + return runWithSpinner('Generating files', 'Files generated', (spinner) => { try { // Generate README.md if (!fs.existsSync('README.md')) { @@ -250,14 +268,11 @@ async function generateBaseFiles( fs.writeFileSync('src/base.publicodes', BASE_PUBLICODES) } } catch (error) { - s.stop('An error occurred while generating files') - p.log.error(error.message) - process.exit(1) - } finally { - // Wait for the spinner to display the message - await setTimeout(1) - s.stop('Files generated') - resolve() + exitWithError( + 'An error occurred while generating files', + spinner, + error.message, + ) } }) } diff --git a/src/utils/cli.ts b/src/utils/cli.ts new file mode 100644 index 0000000..4eeea6a --- /dev/null +++ b/src/utils/cli.ts @@ -0,0 +1,59 @@ +import * as p from '@clack/prompts' +import chalk from 'chalk' +import { setTimeout } from 'timers/promises' + +export type Spinner = { + start: (msg?: string) => void + stop: (msg?: string, code?: number) => void + message: (msg?: string) => void +} + +export function exitWithError( + ctx: string, + spinner: Spinner, + msg: string, + code = 1, +): never { + spinner.stop(ctx, code) + p.log.message(chalk.dim(msg)) + p.outro('Exiting due to an error.') + process.exit(code) +} + +/** + * Run an synchronous function in a promise with a spinner from + * `@clack/prompts` + */ +export function runWithSpinner( + startMsg: string, + stopMsg: string, + fn: (spinner: Spinner) => T, +): Promise { + return runAsyncWithSpinner(startMsg, stopMsg, (s) => { + return new Promise(async (resolve, reject) => { + try { + const res = fn(s) + await setTimeout(1) + resolve(res) + } catch (error) { + reject(error) + } + }) + }) +} + +/** + * Run an asynchronous function in a promise with a spinner from + * `@clack/prompts` + */ +export async function runAsyncWithSpinner( + startMsg: string, + stopMsg: string, + fn: (spinner: Spinner) => Promise, +): Promise { + const s = p.spinner() + s.start(startMsg) + const res = await fn(s) + s.stop(stopMsg) + return res +} diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 998530a..1bc9a47 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -3,7 +3,6 @@ import { CLIExecutor, runInDir } from '../cli-utils' import fs from 'fs' import { PackageJson } from '../../src/utils/pjson' import path from 'path' -import {} from '@oclif/test' const cli = new CLIExecutor() diff --git a/typedoc.json b/typedoc.json index 7c589c7..f9c7fc8 100644 --- a/typedoc.json +++ b/typedoc.json @@ -7,6 +7,7 @@ "./src/compilation/", "./src/migration/" ], + "skipErrorChecking": true, "navigationLinks": { "GitHub": "https://github.com/publicodes/tools" }, diff --git a/yarn.lock b/yarn.lock index af81b9c..31004e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1562,10 +1562,10 @@ process@^0.11.1: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -publicodes@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.3.3.tgz#8e9491b282a408e918458dfedabc4512aac05cb1" - integrity sha512-bRGB4M2HfgfwSI0ysHptn6pq3iYqos1/z2x7DghzMkK5uaoSMgvaeuIwjiX2SI1kjTh11zdFdwYB8Swyr8oZdA== +publicodes@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.5.1.tgz#549de8fe9cd46ca94b5a984c95e5972126a6273d" + integrity sha512-VzTGL+iQUTRoBErP/5LRjq2jeFMPyd0kNcp1FPL9ackiZ0uE2SQHbKr+K6cT0OjKE0gJgPVF8lEDDZAALuLAng== punycode@^2.1.0: version "2.3.1" From 598590146db4f46fa8c07668624ff6e10a02ac06 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 18:52:21 +0200 Subject: [PATCH 10/30] refactor: typing nitpicks --- src/commons.ts | 11 ++++++--- src/compilation/getModelFromSource.ts | 34 ++++++++++++++++++++------- src/compilation/resolveImports.ts | 8 ++++--- src/serializeParsedRules.ts | 2 +- 4 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/commons.ts b/src/commons.ts index f5d6d2b..7ab0740 100644 --- a/src/commons.ts +++ b/src/commons.ts @@ -6,6 +6,7 @@ import { reduceAST, ASTNode, Evaluation, + PublicodesExpression, } from 'publicodes' import yaml from 'yaml' @@ -66,7 +67,11 @@ export type ImportMacro = { /** * Represents a non-parsed NGC rule. */ -export type RawRule = Omit | ImportMacro +export type RawRule = + | Omit + | ImportMacro + | PublicodesExpression + | null /** * Represents a non-parsed NGC model. @@ -225,8 +230,8 @@ export function substituteInParsedExpr( export function getDoubleDefError( filePath: string, name: string, - firstDef: object, - secondDef: object, + firstDef: RawRule, + secondDef: RawRule, ): Error { return new Error( `[${basename(filePath)}] La règle '${name}' est déjà définie diff --git a/src/compilation/getModelFromSource.ts b/src/compilation/getModelFromSource.ts index 43c6c56..8d6f72a 100644 --- a/src/compilation/getModelFromSource.ts +++ b/src/compilation/getModelFromSource.ts @@ -1,12 +1,20 @@ import { readFileSync, statSync } from 'fs' import { sync } from 'glob' +import { Logger } from 'publicodes' import yaml from 'yaml' import { getDoubleDefError, RawRules, RuleName } from '../commons' import { resolveImports } from './resolveImports' +/** + * Options for the `getModelFromSource` function. + */ export type GetModelFromSourceOptions = { + /** Pattern to match the source files to be ignored in the model. */ ignore?: string | string[] + /** Whether to display verbose logs. (default: `false`) */ verbose?: boolean + /** Logger object. (default: `console`) */ + logger?: Logger } function throwErrorIfDuplicatedRules( @@ -25,7 +33,7 @@ function throwErrorIfDuplicatedRules( * Aggregates all rules from the rules folder into a single json object (the model) * with the resolved dependencies. * - * @param sourcePath - Path to the source files, can be a glob pattern. + * @param sourcePaths - Path to the source files, can be a glob pattern or a directory. * @param ignore - Pattern to match the source files to be ignored in the model. * @param opts - Options. * @@ -37,26 +45,34 @@ function throwErrorIfDuplicatedRules( * @throws {Error} If there is a conflict between an imported rule and a base rule. */ export function getModelFromSource( - sourcePath: string, + sourcePaths: string | string[], opts?: GetModelFromSourceOptions, ): RawRules { - try { - if (statSync(sourcePath).isDirectory()) { - sourcePath = sourcePath + '/**/*.publicodes' - } - } catch (e) {} - const { jsonModel, namespaces } = sync(sourcePath, { + const normalizedSourcePathsOrGlobs = ( + Array.isArray(sourcePaths) ? sourcePaths : [sourcePaths] + ).map((pathOrGlob) => { + try { + if (statSync(pathOrGlob).isDirectory()) { + return pathOrGlob + '/**/*.publicodes' + } + } catch (e) {} + return pathOrGlob + }) + const logger = opts?.logger ?? console + + const { jsonModel, namespaces } = sync(normalizedSourcePathsOrGlobs, { ignore: opts?.ignore, }).reduce( ({ jsonModel, namespaces }, filePath: string) => { const rules: RawRules = yaml.parse(readFileSync(filePath, 'utf-8')) if (rules == null) { - console.warn(`⚠️ ${filePath} is empty, skipping...`) + logger.warn(`⚠️ ${filePath} is empty, skipping...`) return { jsonModel, namespaces } } const { completeRules, neededNamespaces } = resolveImports( filePath, rules, + logger, opts?.verbose, ) // PERF: could be smarter? diff --git a/src/compilation/resolveImports.ts b/src/compilation/resolveImports.ts index e1e1fbb..cd7391e 100644 --- a/src/compilation/resolveImports.ts +++ b/src/compilation/resolveImports.ts @@ -1,4 +1,4 @@ -import Engine, { Rule, RuleNode, utils } from 'publicodes' +import Engine, { Logger, Rule, RuleNode, utils } from 'publicodes' import { RuleName, getAllRefsInNode, @@ -39,6 +39,7 @@ const enginesCache = {} function getEngine( filePath: string, { depuis }: ImportMacro, + logger: Logger, verbose: boolean, ): Engine { const packageName = depuis?.nom @@ -76,7 +77,7 @@ importer!: logger: { log: (_) => {}, warn: (_) => {}, - error: (s) => console.error(s), + error: (s) => logger.error(s), }, }) @@ -227,13 +228,14 @@ function getNamespace({ dans, depuis: { nom } }: ImportMacro): string { export function resolveImports( filePath: string, rules: RawRules, + logger: Logger, verbose = false, ): { completeRules: RawRules; neededNamespaces: Set } { let neededNamespaces = new Set() const resolvedRules = Object.entries(rules).reduce((acc, [name, value]) => { if (name === IMPORT_KEYWORD) { const importMacro = value as ImportMacro - const engine = getEngine(filePath, importMacro, verbose) + const engine = getEngine(filePath, importMacro, logger, verbose) const rulesToImport: RuleToImport[] = importMacro['les règles']?.map(getRuleToImportInfos) const namespace = getNamespace(importMacro) diff --git a/src/serializeParsedRules.ts b/src/serializeParsedRules.ts index 5942acd..459e877 100644 --- a/src/serializeParsedRules.ts +++ b/src/serializeParsedRules.ts @@ -3,7 +3,7 @@ import { RawRule, RuleName } from './commons' type SerializedRule = RawRule | number | string | null -function serializedRuleToRawRule(serializedRule: SerializedRule): RawRule { +function serializedRuleToRawRule(serializedRule: SerializedRule): object { if (serializedRule !== null && typeof serializedRule === 'object') { return serializedRule } From 32acb8e5e76cc2bee8b6e3aafed707438ce5c63b Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 18:53:30 +0200 Subject: [PATCH 11/30] refactor(command): better exitWithError API --- src/commands/init.ts | 108 +++++++++++++++++++++---------------------- src/utils/cli.ts | 21 ++++++--- 2 files changed, 69 insertions(+), 60 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index f4f06f4..62bb813 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -102,7 +102,7 @@ installation.`, `${chalk.bold('You can now:')} - write your Publicodes rules in ${chalk.bold.yellow('.src/')} - compile them using: ${chalk.bold.yellow(`${pkgManager} run compile`)}`, - 'Publicodes is ready to use 🚀', + chalk.bold('Publicodes is ready to use 🚀'), ) p.outro( @@ -141,10 +141,10 @@ installation.`, fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJSON, null, 2)) p.log.step(`${chalk.bold('package.json')} file written`) } catch (error) { - p.cancel( - `An error occurred while writing the ${chalk.bold('package.json')} file`, - ) - process.exit(1) + exitWithError({ + ctx: `An error occurred while writing the ${chalk.bold('package.json')} file`, + msg: error.message, + }) } } } @@ -227,20 +227,20 @@ async function installDeps(pkgManager: PackageManager): Promise { }) program.on('error', (error) => { - exitWithError( - 'An error occurred while installing dependencies', + exitWithError({ + ctx: 'An error occurred while installing dependencies', + msg: error.message, spinner, - error.message, - ) + }) }) program.on('close', (code) => { if (code !== 0) { - exitWithError( - `An error occurred while installing dependencies (exec: ${pkgManager} install -y)`, + exitWithError({ + ctx: `An error occurred while installing dependencies (exec: ${pkgManager} install -y)`, + msg: `Process exited with code ${code}`, spinner, - `Process exited with code ${code}`, - ) + }) } resolve() }) @@ -268,11 +268,11 @@ async function generateBaseFiles( fs.writeFileSync('src/base.publicodes', BASE_PUBLICODES) } } catch (error) { - exitWithError( - 'An error occurred while generating files', + exitWithError({ + ctx: 'An error occurred while generating files', + msg: error.message, spinner, - error.message, - ) + }) } }) } @@ -283,58 +283,58 @@ function getReadmeContent( ): string { return `# ${pjson.name} - ${pjson.description} +${pjson.description} - ## Installation +## Installation - \`\`\`sh - npm install ${pjson.name} publicodes - \`\`\` +\`\`\`sh +npm install ${pjson.name} publicodes +\`\`\` - ## Usage +## Usage - \`\`\`typescript - import { Engine } from 'publicodes' - import rules from '${pjson.name}' +\`\`\`typescript +import { Engine } from 'publicodes' +import rules from '${pjson.name}' - const engine = new Engine(rules) +const engine = new Engine(rules) - console.log(engine.evaluate('salaire net').nodeValue) - // 1957.5 +console.log(engine.evaluate('salaire net').nodeValue) +// 1957.5 - engine.setSituation({ 'salaire brut': 4000 }) - console.log(engine.evaluate('salaire net').nodeValue) - // 3120 - \`\`\` +engine.setSituation({ 'salaire brut': 4000 }) +console.log(engine.evaluate('salaire net').nodeValue) +// 3120 +\`\`\` - ## Development +## Development - \`\`\`sh - // Install the dependencies - ${pkgManager} install +\`\`\`sh +// Install the dependencies +${pkgManager} install - // Compile the Publicodes rules - ${pkgManager} run compile +// Compile the Publicodes rules +${pkgManager} run compile - // Run the documentation server - ${pkgManager} run doc - \`\`\` +// Run the documentation server +${pkgManager} run doc +\`\`\` ` } const BASE_PUBLICODES = `# Règles d'exemples automatiquement générées - # Supprimez ce fichier ou ajoutez vos propres règles +# Supprimez ce fichier ou ajoutez vos propres règles - salaire net: salaire brut - cotisations salariales +salaire net: salaire brut - cotisations salariales - salaire brut: - titre: Salaire brut mensuel - par défaut: 2500 €/mois +salaire brut: + titre: Salaire brut mensuel + par défaut: 2500 €/mois - cotisations salariales: - produit: - - salaire brut - - taux - avec: - taux: 21.7% - ` +cotisations salariales: + produit: + - salaire brut + - taux + avec: + taux: 21.7% +` diff --git a/src/utils/cli.ts b/src/utils/cli.ts index 4eeea6a..cd531b9 100644 --- a/src/utils/cli.ts +++ b/src/utils/cli.ts @@ -8,13 +8,22 @@ export type Spinner = { message: (msg?: string) => void } -export function exitWithError( - ctx: string, - spinner: Spinner, - msg: string, +export function exitWithError({ + ctx, + msg, code = 1, -): never { - spinner.stop(ctx, code) + spinner, +}: { + ctx: string + msg: string + code?: number + spinner?: Spinner +}): never { + if (spinner) { + spinner.stop(ctx, code) + } else { + p.log.error(ctx) + } p.log.message(chalk.dim(msg)) p.outro('Exiting due to an error.') process.exit(code) From bf5e6411735587d2e5dd1ec1866a3ba2426989c5 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 18:54:47 +0200 Subject: [PATCH 12/30] feat(compilation): add resolveRuleTypes Allows to get the type of each parsed rules. Should probably be moved to publicodes/core at some point. --- src/compilation/ruleTypes.ts | 78 ++++++++++++++++++++++++++++++ test/compilation/ruleTypes.test.ts | 70 +++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 src/compilation/ruleTypes.ts create mode 100644 test/compilation/ruleTypes.test.ts diff --git a/src/compilation/ruleTypes.ts b/src/compilation/ruleTypes.ts new file mode 100644 index 0000000..8db480e --- /dev/null +++ b/src/compilation/ruleTypes.ts @@ -0,0 +1,78 @@ +import Engine, { ASTNode, reduceAST, RuleNode } from 'publicodes' + +export type RuleType = + | { + type: 'number' | 'date' | 'boolean' | 'string' + isNullable: boolean + } + | { + type: 'enum' + options: string[] + isNullable: boolean + } + +/** + * Resolve the type for each rule in the parsed rules. + * + * @param parsedRules The parsed rules that come from a Publicodes engine. + * @returns A record with the rule name as key and the type as value. + */ +export function resolveRuleTypes( + engine: Engine, +): Record { + const parsedRules = engine.getParsedRules() + const ruleTypes: Record = {} as any + + for (const ruleName in parsedRules) { + const rule = parsedRules[ruleName] + const ruleType = engine.context.nodesTypes.get(rule) + + if (ruleType?.type === undefined) { + // Empty rule are considered as boolean + // NOTE: Should we consider a different type for empty rules? + ruleTypes[ruleName] = { + type: 'boolean', + isNullable: ruleType.isNullable, + } + } else if (ruleType.type === 'string') { + // Most of the time, a string rule is an enumeration + const options = collectOptions(rule) + + if (options !== undefined) { + ruleTypes[ruleName] = { + type: 'enum', + options, + isNullable: ruleType.isNullable, + } + } else { + ruleTypes[ruleName] = { + type: 'string', + isNullable: ruleType.isNullable, + } + } + } else { + ruleTypes[ruleName] = { + type: ruleType.type, + isNullable: ruleType.isNullable, + } + } + } + + return ruleTypes +} + +/** + * Returns the list of all options of a rule if it contains a `une possibilité` + * mechanism. + */ +export function collectOptions(rule: RuleNode): string[] | undefined { + return reduceAST( + (_, node: ASTNode) => { + if (node.nodeKind === 'une possibilité') { + return node['possibilités'] + } + }, + undefined, + rule, + ) +} diff --git a/test/compilation/ruleTypes.test.ts b/test/compilation/ruleTypes.test.ts new file mode 100644 index 0000000..39f7dd1 --- /dev/null +++ b/test/compilation/ruleTypes.test.ts @@ -0,0 +1,70 @@ +import Engine from 'publicodes' +import { RawRules } from '../../src' +import { resolveRuleTypes } from '../../src/compilation/ruleTypes' + +const getTypes = (rawRules: RawRules) => { + const engine = new Engine(rawRules) + return resolveRuleTypes(engine) +} + +describe('resolveRuleType > constant rules', () => { + it('empty', () => { + const rawRules = { rule: null } + expect(getTypes(rawRules)).toEqual({ + rule: { type: 'boolean', isNullable: false }, + }) + }) + + it('number', () => { + const rawRules = { rule: 42 } + expect(getTypes(rawRules)).toEqual({ + rule: { type: 'number', isNullable: false }, + }) + }) + + it('date', () => { + const rawRules = { rule: '01/03/2022' } + expect(getTypes(rawRules)).toEqual({ + rule: { type: 'date', isNullable: false }, + }) + }) + + it('boolean', () => { + const rawRules = { vrai: 'oui', faux: 'non' } + expect(getTypes(rawRules)).toEqual({ + vrai: { type: 'boolean', isNullable: false }, + faux: { type: 'boolean', isNullable: false }, + }) + }) + + it('string', () => { + const rawRules = { rule: "'value 1'" } + expect(getTypes(rawRules)).toEqual({ + rule: { type: 'string', isNullable: false }, + }) + }) + + it('enum (une possibilité)', () => { + const rawRules = { + rule: { + 'une possibilité': ['valeur 1', 'valeur 2'], + avec: { + 'valeur 1': null, + 'valeur 2': null, + }, + }, + } + expect(getTypes(rawRules)).toEqual({ + rule: { + type: 'enum', + options: ['valeur 1', 'valeur 2'], + isNullable: false, + }, + 'rule . valeur 1': { type: 'boolean', isNullable: false }, + 'rule . valeur 2': { type: 'boolean', isNullable: false }, + }) + }) +}) + +// TODO: Add tests for the following cases: +// describe('resolveRuleType > complexe rules', () => {}) From 9566a25120ec90feabf2f1559870e20d581cd15e Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 2 Oct 2024 20:33:51 +0200 Subject: [PATCH 13/30] feat(command/compile): first version of the compile command --- src/commands/compile.ts | 239 ++++++++++++++++++++++++++++++ src/compilation/resolveImports.ts | 2 +- src/utils/cli.ts | 2 +- test/commands/base.test.ts | 3 +- test/commands/compile.test.ts | 18 +++ 5 files changed, 261 insertions(+), 3 deletions(-) create mode 100644 src/commands/compile.ts create mode 100644 test/commands/compile.test.ts diff --git a/src/commands/compile.ts b/src/commands/compile.ts new file mode 100644 index 0000000..4dcf9fa --- /dev/null +++ b/src/commands/compile.ts @@ -0,0 +1,239 @@ +import { Args, Command, Flags } from '@oclif/core' +import * as p from '@clack/prompts' +import chalk from 'chalk' +import path from 'path' +import fs from 'fs' +import { getModelFromSource, GetModelFromSourceOptions } from '../compilation' +import { RawRules } from '../commons' +import { exitWithError, runWithSpinner } from '../utils/cli' +import { resolveRuleTypes, RuleType } from '../compilation/ruleTypes' +import Engine from 'publicodes' +import { getPackageJson } from '../utils/pjson' + +export default class Compile extends Command { + static override args = { + files: Args.file({ description: 'Files to compile.' }), + } + + static override strict = false + + static override summary = 'Compile publicodes files.' + + static override description = ` +This command will compile all the specified publicodes files into standalone +JSON file importable in any JavaScript along with the TypeScript types +corresponding to the rules. + +To avoid passing arguments and flags every time, you can set their values in +the package.json file under the \`publicodes\` key. For example: + + { + // ... + "publicodes": { + "files": ["src/"], + "output": "build" + } + } +` + + static override examples = [ + { + command: '<%= config.bin %> <%= command.id %>', + description: `Compile all publicodes files in the src/ directory into the build/ directory.`, + }, + { + command: '<%= config.bin %> <%= command.id %> src/**/*.publicodes', + description: 'Compile all publicodes files in the src/ directory.', + }, + { + command: + '<%= config.bin %> <%= command.id %> src/file1.publicodes src/file2.publicodes -o ../dist', + description: + 'Compile only the specified files into the ../dist/ directory.', + }, + ] + + static override flags = { + output: Flags.string({ + char: 'o', + default: 'build', + summary: 'Specify the output directory.', + }), + } + + public async run(): Promise { + const { argv, flags } = await this.parse(Compile) + + p.intro(chalk.bgHex('#2975d1')(' publicodes compile ')) + const filesToCompile: string[] = + argv.length === 0 + ? this.config.pjson?.publicodes?.files ?? ['src/'] + : argv + + const outputDir = path.resolve( + flags.output ?? this.config.pjson?.publicodes?.output ?? 'build', + ) + + const rawRules = await parseFiles(filesToCompile, { verbose: false }) + const engine = await initEngine(rawRules) + const pkgName = getPackageJson()?.name ?? path.basename(process.cwd()) + + // Create output directory if it doesn't exist + if (!fs.existsSync(outputDir)) { + fs.mkdirSync(outputDir, { recursive: true }) + } + + await this.generateDTS(engine, outputDir) + + await generateBaseFiles(rawRules, outputDir, pkgName) + + p.outro('Compilation complete! 🎉') + } + + async generateDTS(engine: Engine, outputDir: string): Promise { + return runWithSpinner('Generating types', 'Types generated.', () => { + const ruleTypes = resolveRuleTypes(engine) + const serializedRuleTypes = Object.entries(ruleTypes) + .map(([name, type]) => ` "${name}": ${serializeType(type)}`) + .join(',\n') + + const dts = `/** THIS FILE WAS GENERATED BY ${this.config.pjson.name} (v${this.config.pjson.version}). PLEASE, DO NOT EDIT IT MANUALLY. */ + +import { Rule } from 'publicodes' + +/** + * String representing a date in the format 'DD/MM/YYYY' or 'MM/YYYY'. + */ +export type PDate = string + +/** + * Publicodes boolean type. + */ +export type PBoolean = 'oui' | 'non' + +/** + * String constant are enclosed in single quotes to differentiate them from + * references. + */ +export type PString = \`'\${string}'\` + +/** + * Corresponding Publicodes situation with types inferred for each rule. + */ +export type TypedSituation = { +${serializedRuleTypes} +} + +/** + * All rule names available in the model. + */ +export type RuleName = keyof TypedSituation + +declare let rules: Record + +export default rules +` + fs.writeFileSync(path.join(outputDir, 'index.d.ts'), dts) + }) + } +} + +async function parseFiles( + files: string[], + // TODO: manage options + options: GetModelFromSourceOptions, +): Promise { + return runWithSpinner('Resolving imports', 'Imports resolved.', (spinner) => { + try { + return getModelFromSource(files, { + ...options, + logger: { + log: p.log.info, + error: p.log.error, + warn: p.log.warn, + }, + }) + } catch (error) { + exitWithError({ + ctx: 'An error occurred while parsing files:', + msg: error.message, + spinner, + }) + } + }) +} + +async function initEngine(rawRules: RawRules): Promise { + return runWithSpinner( + 'Checking rules', + `No errors found in ${chalk.bold(Object.keys(rawRules).length)} rules.`, + (spinner) => { + try { + return new Engine(rawRules) + } catch (error) { + exitWithError({ + ctx: 'Parsing rules failed:', + msg: error.message, + spinner, + }) + } + }, + ) +} + +async function generateBaseFiles( + rawRules: RawRules, + outputDir: string, + pkgName: string, +): Promise { + return runWithSpinner('Emitting files', 'Files emitted.', async (spinner) => { + try { + // Extract package name without scope + const basePkgName = pkgName.replace(/@.*\//, '') + + // Generate JSON file + const jsonPath = path.join(outputDir, `${basePkgName}.model.json`) + fs.writeFileSync(jsonPath, JSON.stringify(rawRules)) + + generateIndexFile(outputDir, jsonPath) + } catch (error) { + exitWithError({ + ctx: 'An error occurred while generating files:', + msg: error.message, + spinner, + }) + } + }) +} + +function generateIndexFile(outputDir: string, jsonPath: string): void { + fs.writeFileSync( + path.join(outputDir, 'index.js'), + `import rules from './${path.basename(jsonPath)}' assert { type: 'json' } + +export default rules`, + ) +} + +function serializeType(type: RuleType): string { + const nullable = type.isNullable ? ' | null' : '' + switch (type.type) { + case 'string': { + return `PString${nullable}` + } + case 'number': { + return `number${nullable}` + } + case 'boolean': { + return `PBoolean${nullable}` + } + case 'date': { + return `PDate${nullable}` + } + case 'enum': { + return ( + type.options.map((option) => `"'${option}'"`).join(' | ') + nullable + ) + } + } +} diff --git a/src/compilation/resolveImports.ts b/src/compilation/resolveImports.ts index cd7391e..b07d181 100644 --- a/src/compilation/resolveImports.ts +++ b/src/compilation/resolveImports.ts @@ -82,7 +82,7 @@ importer!: }) if (verbose) { - console.debug(`📦 ${packageName} loaded`) + logger.log(`📦 ${packageName} loaded`) } enginesCache[modelPath] = engine } catch (e) { diff --git a/src/utils/cli.ts b/src/utils/cli.ts index cd531b9..bbbde18 100644 --- a/src/utils/cli.ts +++ b/src/utils/cli.ts @@ -24,7 +24,7 @@ export function exitWithError({ } else { p.log.error(ctx) } - p.log.message(chalk.dim(msg)) + p.log.message(chalk.dim(msg.trim())) p.outro('Exiting due to an error.') process.exit(code) } diff --git a/test/commands/base.test.ts b/test/commands/base.test.ts index 32578f8..5faca55 100644 --- a/test/commands/base.test.ts +++ b/test/commands/base.test.ts @@ -6,7 +6,8 @@ describe('publicodes --help', () => { runInDir('tmp', async () => { const { stdout } = await cli.execCommand('--help') - expect(stdout).toContain('init Initialize a new project') + expect(stdout).toContain('init') + expect(stdout).toContain('compile') }) }) }) diff --git a/test/commands/compile.test.ts b/test/commands/compile.test.ts new file mode 100644 index 0000000..a1cd2f4 --- /dev/null +++ b/test/commands/compile.test.ts @@ -0,0 +1,18 @@ +import { CLIExecutor, runInDir } from '../cli-utils' +import fs from 'fs' +import path from 'path' + +const cli = new CLIExecutor() + +describe('publicodes compile', () => { + it('should compile with no arguments/flags', async () => { + runInDir('tmp', async (cwd) => { + const { stdout } = await cli.execCommand('compile') + expect(stdout).toContain('Compilation complete!') + expect(fs.existsSync('build')).toBe(true) + expect(fs.existsSync('build/index.js')).toBe(true) + expect(fs.existsSync(`build/${path.basename(cwd)}.model.json`)).toBe(true) + expect(fs.existsSync(`build/index.d.ts`)).toBe(true) + }) + }) +}) From af207df443f8842f8b8872a5a2cc2db42b177d62 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 3 Oct 2024 11:13:19 +0200 Subject: [PATCH 14/30] feat(command/init): add --yes flag --- src/commands/init.ts | 34 ++++++++++++++++++---------------- test/commands/init.test.ts | 8 ++++---- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/commands/init.ts b/src/commands/init.ts index 62bb813..f66a28b 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -57,10 +57,9 @@ one. specified package manager (or the detected one). Use this flag to skip the installation.`, }), - install: Flags.boolean({ - char: 'i', - summary: 'Install dependencies.', - hidden: true, + yes: Flags.boolean({ + char: 'y', + summary: 'Skip all prompts and use the default values.', }), } @@ -69,28 +68,33 @@ installation.`, const { flags } = await this.parse(Init) let pkgJSON = getPackageJson() + const currentDir = path.basename(process.cwd()) if (pkgJSON) { p.log.info(`Updating existing ${chalk.bold('package.json')} file`) - this.updatePackageJson(pkgJSON) + } else if (flags.yes) { + p.log.step( + `Creating a new ${chalk.bold('package.json')} file with default values`, + ) + pkgJSON = basePackageJson + pkgJSON.name = currentDir } else { p.log.step(`Creating a new ${chalk.bold('package.json')} file`) - pkgJSON = await askPackageJsonInfo() - this.updatePackageJson(pkgJSON) + pkgJSON = await askPackageJsonInfo(currentDir) } + this.updatePackageJson(pkgJSON) const pkgManager: PackageManager = flags['pkg-manager'] ?? findPackageManager() ?? - (await askPackageManager()) + (flags.yes ? 'npm' : await askPackageManager()) const shouldInstall = - flags.install || - (flags['no-install'] === undefined + flags['no-install'] === undefined && !flags.yes ? await p.confirm({ message: 'Do you want to install the dependencies?', }) - : !flags['no-install']) + : !flags['no-install'] if (shouldInstall) { await installDeps(pkgManager) @@ -149,9 +153,7 @@ installation.`, } } -function askPackageJsonInfo(): Promise { - const currentDir = path.basename(process.cwd()) - +function askPackageJsonInfo(currentDir: string): Promise { return p.group( { name: () => @@ -322,8 +324,8 @@ ${pkgManager} run doc ` } -const BASE_PUBLICODES = `# Règles d'exemples automatiquement générées -# Supprimez ce fichier ou ajoutez vos propres règles +const BASE_PUBLICODES = `# Règles d'exemples automatiquement générées. +# Supprimez ce fichier ou ajoutez vos propres règles. salaire net: salaire brut - cotisations salariales diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 1bc9a47..94c6741 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -11,7 +11,7 @@ describe('publicodes init', () => { runInDir('tmp', async (cwd) => { execSync('yarn init -y') - const { stdout } = await cli.execCommand('init -p yarn --install') + const { stdout } = await cli.execCommand('init -y -p yarn') expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') @@ -35,7 +35,7 @@ describe('publicodes init', () => { runInDir('tmp', async (cwd) => { execSync('yarn init -y') - const { stdout } = await cli.execCommand('init -p yarn --no-install') + const { stdout } = await cli.execCommand('init -y --no-install -p yarn') expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') @@ -47,8 +47,8 @@ describe('publicodes init', () => { getExpectedBasePackageJson(cwd, packageJson), ) - expect(!fs.existsSync('node_modules')).toBe(true) - expect(!fs.existsSync('yarn.lock')).toBe(true) + expect(fs.existsSync('node_modules')).toBe(false) + expect(fs.existsSync('yarn.lock')).toBe(false) expect(fs.existsSync('README.md')).toBe(true) expect(fs.existsSync('src/base.publicodes')).toBe(true) }) From 92baef5270b13a3cff37ffa59267d9f8b938f713 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 3 Oct 2024 11:26:17 +0200 Subject: [PATCH 15/30] refactor(command/init): try to have a simplier run function --- src/commands/compile.ts | 4 +-- src/commands/init.ts | 55 +++++++++++++++++++++++++------------- src/utils/pjson.ts | 6 ++--- test/commands/init.test.ts | 2 -- 4 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 4dcf9fa..2baae5a 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -8,7 +8,7 @@ import { RawRules } from '../commons' import { exitWithError, runWithSpinner } from '../utils/cli' import { resolveRuleTypes, RuleType } from '../compilation/ruleTypes' import Engine from 'publicodes' -import { getPackageJson } from '../utils/pjson' +import { readPackageJson } from '../utils/pjson' export default class Compile extends Command { static override args = { @@ -76,7 +76,7 @@ the package.json file under the \`publicodes\` key. For example: const rawRules = await parseFiles(filesToCompile, { verbose: false }) const engine = await initEngine(rawRules) - const pkgName = getPackageJson()?.name ?? path.basename(process.cwd()) + const pkgName = readPackageJson()?.name ?? path.basename(process.cwd()) // Create output directory if it doesn't exist if (!fs.existsSync(outputDir)) { diff --git a/src/commands/init.ts b/src/commands/init.ts index f66a28b..90013dc 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -11,7 +11,7 @@ import { runWithSpinner, Spinner, } from '../utils/cli' -import { basePackageJson, getPackageJson, PackageJson } from '../utils/pjson' +import { basePackageJson, PackageJson, readPackageJson } from '../utils/pjson' import { OptionFlag } from '@oclif/core/lib/interfaces' import { spawn } from 'child_process' @@ -67,27 +67,13 @@ installation.`, p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) const { flags } = await this.parse(Init) - let pkgJSON = getPackageJson() const currentDir = path.basename(process.cwd()) + const pkgJSON = await getPackageJson(currentDir, flags.yes) - if (pkgJSON) { - p.log.info(`Updating existing ${chalk.bold('package.json')} file`) - } else if (flags.yes) { - p.log.step( - `Creating a new ${chalk.bold('package.json')} file with default values`, - ) - pkgJSON = basePackageJson - pkgJSON.name = currentDir - } else { - p.log.step(`Creating a new ${chalk.bold('package.json')} file`) - pkgJSON = await askPackageJsonInfo(currentDir) - } this.updatePackageJson(pkgJSON) - const pkgManager: PackageManager = - flags['pkg-manager'] ?? - findPackageManager() ?? - (flags.yes ? 'npm' : await askPackageManager()) + const pkgManager = await getPackageManager(flags['pkg-manager'], flags.yes) + // const extraTools = await getExtraTools(flags.yes) const shouldInstall = flags['no-install'] === undefined && !flags.yes @@ -131,6 +117,7 @@ installation.`, } pkgJSON.devDependencies = { ...pkgJSON.devDependencies, + // NOTE: to test with the packaged version '@publicodes/tools': `^${this.config.pjson.version}`, } pkgJSON.scripts = { @@ -153,6 +140,38 @@ installation.`, } } +async function getPackageJson( + currentDir: string, + useDefault: boolean, +): Promise { + const localPkgJson = readPackageJson() + + if (localPkgJson) { + return localPkgJson + } + + if (useDefault) { + return { ...basePackageJson, name: currentDir } + } + + return await askPackageJsonInfo(currentDir) +} + +async function getPackageManager( + flagedPkgManager: PackageManager | undefined, + useDefault: boolean, +): Promise { + if (flagedPkgManager) { + return flagedPkgManager + } + const currentPkgManager = findPackageManager() + if (currentPkgManager) { + return currentPkgManager + } + + return useDefault ? 'npm' : await askPackageManager() +} + function askPackageJsonInfo(currentDir: string): Promise { return p.group( { diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index cb5e93b..d2cf1e3 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -51,10 +51,10 @@ export const basePackageJson: PackageJson = { }, } -export function getPackageJson(): PackageJson | undefined { +export function readPackageJson(): PackageJson | undefined { try { - return JSON.parse(fs.readFileSync('package.json', 'utf8')) - } catch (error) { + return JSON.parse(fs.readFileSync('package.json', 'utf-8')) + } catch (e) { return undefined } } diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 94c6741..e2af78d 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -13,7 +13,6 @@ describe('publicodes init', () => { const { stdout } = await cli.execCommand('init -y -p yarn') - expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') expect(stdout).toContain('Dependencies installed') expect(stdout).toContain('Files generated') @@ -37,7 +36,6 @@ describe('publicodes init', () => { const { stdout } = await cli.execCommand('init -y --no-install -p yarn') - expect(stdout).toContain('Updating existing package.json file') expect(stdout).toContain('package.json file written') expect(stdout).toContain('Files generated') expect(stdout).toContain('New to Publicodes?') From bb364dffd6c96488fea69ba81776db97a6c24235 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 3 Oct 2024 19:00:26 +0200 Subject: [PATCH 16/30] feat(command/init): setup test with vitest --- package.json | 3 +- src/commands/init.ts | 173 ++++++++++++++++++++++++++++--------- test/commands/init.test.ts | 7 +- yarn.lock | 103 +++++++--------------- 4 files changed, 169 insertions(+), 117 deletions(-) diff --git a/package.json b/package.json index 7567335..dafeebe 100644 --- a/package.json +++ b/package.json @@ -71,10 +71,9 @@ }, "devDependencies": { "@oclif/test": "^4.0.9", - "@types/jest": "^29.2.5", + "@types/jest": "^29.5.13", "docdash": "^2.0.1", "prettier": "^3.0.0", - "ts-jest": "^29.0.4", "ts-node": "^10.9.2", "tsup": "^8.0.2", "typedoc": "^0.24.8", diff --git a/src/commands/init.ts b/src/commands/init.ts index 90013dc..af7e368 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -16,6 +16,7 @@ import { OptionFlag } from '@oclif/core/lib/interfaces' import { spawn } from 'child_process' type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' +type ExtraTool = 'gh-actions' | 'test' export default class Init extends Command { static override args = {} @@ -63,17 +64,38 @@ installation.`, }), } + // TODO: refactor to have a unique project object which is built and passed + // to the methods before writing it in one go. public async run(): Promise { p.intro(chalk.bgHex('#2975d1')(' publicodes init ')) const { flags } = await this.parse(Init) const currentDir = path.basename(process.cwd()) - const pkgJSON = await getPackageJson(currentDir, flags.yes) + const pkgJSON = await this.getPackageJson(currentDir, flags.yes) + + // TODO: check for existing 'test' directory and '.github/workflows' directory + const extraTools = await getExtraTools(flags.yes) + // TODO: factorize this + if (p.isCancel(extraTools)) { + p.cancel('init cancelled') + process.exit(1) + } - this.updatePackageJson(pkgJSON) + if (extraTools.includes('gh-actions')) { + // TODO + // setupGithubActions() + } + if (extraTools.includes('test')) { + setupTests(pkgJSON) + } const pkgManager = await getPackageManager(flags['pkg-manager'], flags.yes) - // const extraTools = await getExtraTools(flags.yes) + if (p.isCancel(pkgManager)) { + p.cancel('init cancelled') + process.exit(1) + } + + await generateBaseFiles(pkgJSON, pkgManager) const shouldInstall = flags['no-install'] === undefined && !flags.yes @@ -86,8 +108,6 @@ installation.`, await installDeps(pkgManager) } - await generateBaseFiles(pkgJSON, pkgManager) - p.note( `${chalk.bold('You can now:')} - write your Publicodes rules in ${chalk.bold.yellow('.src/')} @@ -100,8 +120,18 @@ installation.`, ) } - private updatePackageJson(pkgJSON: PackageJson): void { - const packageJsonPath = path.join(process.cwd(), 'package.json') + private async getPackageJson( + currentDir: string, + useDefault: boolean, + ): Promise { + let pkgJSON = readPackageJson() + + if (!pkgJSON && useDefault) { + pkgJSON = { ...basePackageJson, name: currentDir } + } + if (!pkgJSON) { + pkgJSON = await askPackageJsonInfo(currentDir) + } pkgJSON.type = basePackageJson.type pkgJSON.main = basePackageJson.main @@ -128,33 +158,8 @@ installation.`, pkgJSON.publishConfig = { access: 'public' } } - try { - fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJSON, null, 2)) - p.log.step(`${chalk.bold('package.json')} file written`) - } catch (error) { - exitWithError({ - ctx: `An error occurred while writing the ${chalk.bold('package.json')} file`, - msg: error.message, - }) - } - } -} - -async function getPackageJson( - currentDir: string, - useDefault: boolean, -): Promise { - const localPkgJson = readPackageJson() - - if (localPkgJson) { - return localPkgJson + return pkgJSON } - - if (useDefault) { - return { ...basePackageJson, name: currentDir } - } - - return await askPackageJsonInfo(currentDir) } async function getPackageManager( @@ -237,13 +242,45 @@ function askPackageManager(): Promise { }) as Promise } +async function getExtraTools(useDefault: boolean): Promise { + if (useDefault) { + return ['gh-actions', 'test'] + } + return p.multiselect({ + message: `Select extra tools (press ${chalk.bold.italic('space')} to unselect)`, + options: [ + { + value: 'gh-actions', + label: 'GitHub Actions', + hint: 'automate build, test and publishing', + }, + { value: 'test', label: 'Unit test', hint: 'Vitest + example' }, + ], + required: false, + initialValues: ['gh-actions', 'test'], + }) as Promise +} + +function setupTests(pkgJSON: PackageJson) { + pkgJSON.devDependencies = { + ...pkgJSON.devDependencies, + vitest: '^2.1.2', + '@types/jest': '^29.5.13', + } + pkgJSON.scripts = { + ...pkgJSON.scripts, + test: 'vitest --globals', + } + return pkgJSON +} + async function installDeps(pkgManager: PackageManager): Promise { return runAsyncWithSpinner( 'Installing dependencies', 'Dependencies installed', (spinner: Spinner) => { return new Promise((resolve) => { - const program = spawn(pkgManager, ['install', '-y'], { + const program = spawn(pkgManager, ['install'], { stdio: 'ignore', }) @@ -258,7 +295,7 @@ async function installDeps(pkgManager: PackageManager): Promise { program.on('close', (code) => { if (code !== 0) { exitWithError({ - ctx: `An error occurred while installing dependencies (exec: ${pkgManager} install -y)`, + ctx: `An error occurred while installing dependencies (exec: ${pkgManager} install)`, msg: `Process exited with code ${code}`, spinner, }) @@ -276,6 +313,10 @@ async function generateBaseFiles( ): Promise { return runWithSpinner('Generating files', 'Files generated', (spinner) => { try { + // Generate package.json + const packageJsonPath = path.join(process.cwd(), 'package.json') + fs.writeFileSync(packageJsonPath, JSON.stringify(pjson, null, 2)) + // Generate README.md if (!fs.existsSync('README.md')) { fs.writeFileSync('README.md', getReadmeContent(pjson, pkgManager)) @@ -285,9 +326,28 @@ async function generateBaseFiles( if (!fs.existsSync('src')) { fs.mkdirSync('src') } - if (!fs.existsSync('src/base.publicodes')) { - fs.writeFileSync('src/base.publicodes', BASE_PUBLICODES) + if (!fs.existsSync('src/salaire.publicodes')) { + fs.writeFileSync('src/salaire.publicodes', BASE_PUBLICODES) + } + if (!fs.existsSync('.gitignore')) { + try { + execSync('git init', { stdio: 'ignore' }) + } catch (error) { + p.log.warn( + `Could not initialize a git repository (make sure ${chalk.bold.italic('git')} is installed)`, + ) + } + fs.writeFileSync( + '.gitignore', + `node_modules\n${pjson.files?.join('\n')}`, + ) + } + + if (!fs.existsSync('test')) { + fs.mkdirSync('test') } + + fs.writeFileSync('test/salaire.test.ts', BASE_TEST_FILE) } catch (error) { exitWithError({ ctx: 'An error occurred while generating files', @@ -309,7 +369,7 @@ ${pjson.description} ## Installation \`\`\`sh -npm install ${pjson.name} publicodes +${pkgManager} install ${pjson.name} publicodes \`\`\` ## Usage @@ -337,6 +397,13 @@ ${pkgManager} install // Compile the Publicodes rules ${pkgManager} run compile +${ + pjson.scripts?.test + ? `// Run the tests +${pkgManager} run test` + : '' +} + // Run the documentation server ${pkgManager} run doc \`\`\` @@ -350,7 +417,8 @@ salaire net: salaire brut - cotisations salariales salaire brut: titre: Salaire brut mensuel - par défaut: 2500 €/mois + par défaut: 2500 + unité: €/mois cotisations salariales: produit: @@ -359,3 +427,30 @@ cotisations salariales: avec: taux: 21.7% ` + +const BASE_TEST_FILE = `import Engine, { serializeEvaluation, serializeUnit } from "publicodes"; +import rules from "../build"; + +describe("Salaire net", () => { + test("salaire brut par défaut", () => { + const engine = new Engine(rules); + const result = engine.evaluate("salaire net"); + + expect(result.nodeValue).toBe(1957.5); + expect(serializeEvaluation(result)).toBe("1957.5€/mois"); + }); + + test.each([ + [1957.5, 2500], + [2740.5, 3500], + [0, 0], + ])("%f €/mois, avec salaire brut = %f €/mois", (salaireNet, salaireBrut) => { + const engine = new Engine(rules); + engine.setSituation({ "salaire brut": salaireBrut }); + const result = engine.evaluate("salaire net"); + + expect(result.nodeValue).toBe(salaireNet); + expect(serializeUnit(result.unit)).toBe("€/mois"); + }); +}); +` diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index e2af78d..04a1de0 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -13,7 +13,6 @@ describe('publicodes init', () => { const { stdout } = await cli.execCommand('init -y -p yarn') - expect(stdout).toContain('package.json file written') expect(stdout).toContain('Dependencies installed') expect(stdout).toContain('Files generated') expect(stdout).toContain('New to Publicodes?') @@ -26,7 +25,8 @@ describe('publicodes init', () => { expect(fs.existsSync('node_modules')).toBe(true) expect(fs.existsSync('yarn.lock')).toBe(true) expect(fs.existsSync('README.md')).toBe(true) - expect(fs.existsSync('src/base.publicodes')).toBe(true) + expect(fs.existsSync('src/salaire.publicodes')).toBe(true) + expect(fs.existsSync('test/salaire.test.ts')).toBe(true) }) }) @@ -36,7 +36,6 @@ describe('publicodes init', () => { const { stdout } = await cli.execCommand('init -y --no-install -p yarn') - expect(stdout).toContain('package.json file written') expect(stdout).toContain('Files generated') expect(stdout).toContain('New to Publicodes?') @@ -48,7 +47,7 @@ describe('publicodes init', () => { expect(fs.existsSync('node_modules')).toBe(false) expect(fs.existsSync('yarn.lock')).toBe(false) expect(fs.existsSync('README.md')).toBe(true) - expect(fs.existsSync('src/base.publicodes')).toBe(true) + expect(fs.existsSync('src/salaire.publicodes')).toBe(true) }) }) }) diff --git a/yarn.lock b/yarn.lock index 31004e2..a0d7916 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,24 +3,24 @@ "@babel/code-frame@^7.12.13": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7" + integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g== dependencies: - "@babel/highlight" "^7.24.7" + "@babel/highlight" "^7.25.7" picocolors "^1.0.0" -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== +"@babel/helper-validator-identifier@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5" + integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg== -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== +"@babel/highlight@^7.25.7": + version "7.25.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.7.tgz#20383b5f442aa606e7b5e3043b0b1aafe9f37de5" + integrity sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw== dependencies: - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-validator-identifier" "^7.25.7" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" @@ -526,20 +526,20 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.2.5": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== +"@types/jest@^29.5.13": + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" "@types/node@*": - version "20.14.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" - integrity sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ== + version "22.7.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc" + integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/node@^18.11.18": version "18.19.39" @@ -559,9 +559,9 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.32" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" - integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== dependencies: "@types/yargs-parser" "*" @@ -752,13 +752,6 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - bundle-require@^4.0.0: version "4.2.1" resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.2.1.tgz#4c450a5807381d20ade987bde8ac391544257919" @@ -1042,11 +1035,6 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@2.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -1272,7 +1260,7 @@ jest-message-util@^29.7.0: slash "^3.0.0" stack-utils "^2.0.3" -jest-util@^29.0.0, jest-util@^29.7.0: +jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== @@ -1294,11 +1282,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - jsonc-parser@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" @@ -1319,11 +1302,6 @@ load-tsconfig@^0.2.3: resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -1358,7 +1336,7 @@ magic-string@^0.30.11: dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" -make-error@1.x, make-error@^1.1.1: +make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -1656,11 +1634,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -semver@^7.5.3: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== - semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" @@ -1892,20 +1865,6 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-jest@^29.0.4: - version "29.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.5.tgz#d6c0471cc78bffa2cb4664a0a6741ef36cfe8f69" - integrity sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^29.0.0" - json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "^7.5.3" - yargs-parser "^21.0.1" - ts-node@^10.9.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" @@ -1975,6 +1934,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + util@^0.10.3: version "0.10.4" resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" @@ -2116,11 +2080,6 @@ yaml@^2.3.4, yaml@^2.4.5: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.5.tgz#60630b206dd6d84df97003d33fc1ddf6296cca5e" integrity sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg== -yargs-parser@^21.0.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== - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From ed49480971e7e7d18d4b0cd14f76830c1d9b31e5 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 24 Oct 2024 11:01:32 +0200 Subject: [PATCH 17/30] feat(command/compile): use publicodes object config from the package.json file --- package.json | 34 ++++++++++++------------ src/commands/compile.ts | 58 ++++++++++++++++++++++++++++++++++++----- src/commands/init.ts | 17 +++++++----- src/utils/pjson.ts | 4 +++ 4 files changed, 83 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index dafeebe..9429d3c 100644 --- a/package.json +++ b/package.json @@ -4,18 +4,13 @@ "description": "A CLI tool for Publicodes", "type": "module", "main": "dist/index.js", - "scripts": { - "build": "tsup", - "watch": "tsup --watch", - "clean": "rm -rf dist docs", - "test": "vitest --globals", - "docs": "typedoc", - "format": "prettier --write .", - "format:check": "prettier --check ." - }, - "engines": { - "node": ">=17" + "bin": { + "publicodes": "./bin/run.js" }, + "files": [ + "dist", + "bin" + ], "exports": { ".": { "import": "./dist/index.js", @@ -38,10 +33,6 @@ "types": "./dist/migration/index.d.ts" } }, - "files": [ - "dist", - "bin" - ], "repository": { "type": "git", "url": "git+ssh://git@github.com/publicodes/tools.git" @@ -56,8 +47,17 @@ ], "author": "Emile Rolley ", "license": "MIT", - "bin": { - "publicodes": "./bin/run.js" + "scripts": { + "build": "tsup", + "watch": "tsup --watch", + "clean": "rm -rf dist docs", + "test": "vitest --globals", + "docs": "typedoc", + "format": "prettier --write .", + "format:check": "prettier --check ." + }, + "engines": { + "node": ">=17" }, "dependencies": { "@clack/prompts": "^0.7.0", diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 2baae5a..f47b89c 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -56,8 +56,7 @@ the package.json file under the \`publicodes\` key. For example: static override flags = { output: Flags.string({ char: 'o', - default: 'build', - summary: 'Specify the output directory.', + summary: 'Specify the output directory. Default is "./build".', }), } @@ -67,7 +66,8 @@ the package.json file under the \`publicodes\` key. For example: p.intro(chalk.bgHex('#2975d1')(' publicodes compile ')) const filesToCompile: string[] = argv.length === 0 - ? this.config.pjson?.publicodes?.files ?? ['src/'] + ? // TODO: test with production package + this.config.pjson?.publicodes?.files ?? ['src/'] : argv const outputDir = path.resolve( @@ -93,9 +93,14 @@ the package.json file under the \`publicodes\` key. For example: async generateDTS(engine: Engine, outputDir: string): Promise { return runWithSpinner('Generating types', 'Types generated.', () => { const ruleTypes = resolveRuleTypes(engine) - const serializedRuleTypes = Object.entries(ruleTypes) + const typesEntries = Object.entries(ruleTypes) + const serializedRuleTypes = typesEntries .map(([name, type]) => ` "${name}": ${serializeType(type)}`) .join(',\n') + const serializedQuestionsRuleTypes = typesEntries + .filter(([name]) => engine.getRule(name).rawNode.question) + .map(([name, type]) => ` "${name}": ${serializeJSType(type)}`) + .join(',\n') const dts = `/** THIS FILE WAS GENERATED BY ${this.config.pjson.name} (v${this.config.pjson.version}). PLEASE, DO NOT EDIT IT MANUALLY. */ @@ -119,15 +124,33 @@ export type PString = \`'\${string}'\` /** * Corresponding Publicodes situation with types inferred for each rule. + * + * @note + * This represents the situation as needed by the 'setSituation' method of the + * {@link Engine} class with raw values (i.e. string constants are enclosed in + * "''" and boolean values are 'oui' or 'non'). */ -export type TypedSituation = { +export type Situation = Partial<{ ${serializedRuleTypes} -} +}> + +/** + * Subset of the {@link Situation} with only the rules that are questions + * (i.e. input rules). + * + * @note + * This represents the input rules expected to be provided by the user. + * Therefore the values are in their JavaScript form (i.e. string constants are + * enclosed in '' and boolean values are 'true' or 'false'). + */ +export type Questions = Partial<{ +${serializedQuestionsRuleTypes} +}> /** * All rule names available in the model. */ -export type RuleName = keyof TypedSituation +export type RuleName = keyof Situation declare let rules: Record @@ -237,3 +260,24 @@ function serializeType(type: RuleType): string { } } } + +function serializeJSType(type: RuleType): string { + const nullable = type.isNullable ? ' | null' : '' + switch (type.type) { + case 'string': { + return `string${nullable}` + } + case 'number': { + return `number${nullable}` + } + case 'boolean': { + return `boolean${nullable}` + } + case 'date': { + return `string${nullable}` + } + case 'enum': { + return type.options.map((option) => `"${option}"`).join(' | ') + nullable + } + } +} diff --git a/src/commands/init.ts b/src/commands/init.ts index af7e368..2538203 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -1,4 +1,4 @@ -import fs from 'fs' +import fs, { appendFileSync } from 'fs' import path from 'path' import { execSync } from 'node:child_process' import { Command, Flags } from '@oclif/core' @@ -141,6 +141,10 @@ installation.`, pkgJSON.description = pkgJSON.description ?? basePackageJson.description pkgJSON.author = pkgJSON.author ?? basePackageJson.author pkgJSON.files = basePackageJson.files!.concat(pkgJSON.files ?? []) + pkgJSON.scripts = { + ...pkgJSON.scripts, + ...basePackageJson.scripts, + } pkgJSON.peerDependencies = { ...pkgJSON.peerDependencies, ...basePackageJson.peerDependencies, @@ -150,10 +154,6 @@ installation.`, // NOTE: to test with the packaged version '@publicodes/tools': `^${this.config.pjson.version}`, } - pkgJSON.scripts = { - ...pkgJSON.scripts, - ...basePackageJson.scripts, - } if (pkgJSON.name.startsWith('@')) { pkgJSON.publishConfig = { access: 'public' } } @@ -269,7 +269,7 @@ function setupTests(pkgJSON: PackageJson) { } pkgJSON.scripts = { ...pkgJSON.scripts, - test: 'vitest --globals', + test: 'vitest run --globals', } return pkgJSON } @@ -343,6 +343,11 @@ async function generateBaseFiles( ) } + fs.appendFileSync( + '.gitattributes', + '*.publicodes linguist-language=YAML\n', + ) + if (!fs.existsSync('test')) { fs.mkdirSync('test') } diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index d2cf1e3..c6f3d59 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -30,6 +30,10 @@ export type PackageJson = { publishConfig?: { access: string } + publicodes?: { + files?: string[] + output?: string + } } export const basePackageJson: PackageJson = { From 853b44a47343e25c5cf4bb01c6b025cd05e820ce Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 24 Oct 2024 11:03:54 +0200 Subject: [PATCH 18/30] v1.3.0-0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9429d3c..b0b5e2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@publicodes/tools", - "version": "1.2.5", + "version": "1.3.0-0", "description": "A CLI tool for Publicodes", "type": "module", "main": "dist/index.js", From 5bce22009cc36893ca7199d52f6b46c72d2ee2c8 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Fri, 25 Oct 2024 18:13:37 +0200 Subject: [PATCH 19/30] feat(command/compile): change default output dir and add comments for the Questions type --- src/commands/compile.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index f47b89c..d6be42a 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -56,7 +56,7 @@ the package.json file under the \`publicodes\` key. For example: static override flags = { output: Flags.string({ char: 'o', - summary: 'Specify the output directory. Default is "./build".', + summary: 'Specify the output directory. Default is "./publicodes-build".', }), } @@ -71,7 +71,9 @@ the package.json file under the \`publicodes\` key. For example: : argv const outputDir = path.resolve( - flags.output ?? this.config.pjson?.publicodes?.output ?? 'build', + flags.output ?? + this.config.pjson?.publicodes?.output ?? + 'publicodes-build', ) const rawRules = await parseFiles(filesToCompile, { verbose: false }) @@ -99,7 +101,10 @@ the package.json file under the \`publicodes\` key. For example: .join(',\n') const serializedQuestionsRuleTypes = typesEntries .filter(([name]) => engine.getRule(name).rawNode.question) - .map(([name, type]) => ` "${name}": ${serializeJSType(type)}`) + .map(([name, type]) => { + const title = engine.getRule(name)?.rawNode?.titre + return `${title ? ` /** ${title} */\n` : ''} "${name}": ${serializeJSType(type)}` + }) .join(',\n') const dts = `/** THIS FILE WAS GENERATED BY ${this.config.pjson.name} (v${this.config.pjson.version}). PLEASE, DO NOT EDIT IT MANUALLY. */ From 0bdc1724253e40787d72f75fda748158c5febedc Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Fri, 25 Oct 2024 18:14:24 +0200 Subject: [PATCH 20/30] v1.3.0-1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b0b5e2e..f536ed1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@publicodes/tools", - "version": "1.3.0-0", + "version": "1.3.0-1", "description": "A CLI tool for Publicodes", "type": "module", "main": "dist/index.js", From 3a3f98696de4744a09b665b0fbb065eb7c2f8fb0 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Fri, 15 Nov 2024 10:26:43 +0100 Subject: [PATCH 21/30] nitpicks --- src/commands/compile.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index d6be42a..18c54a9 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -89,7 +89,7 @@ the package.json file under the \`publicodes\` key. For example: await generateBaseFiles(rawRules, outputDir, pkgName) - p.outro('Compilation complete! 🎉') + p.outro('Compilation done.') } async generateDTS(engine: Engine, outputDir: string): Promise { @@ -130,10 +130,10 @@ export type PString = \`'\${string}'\` /** * Corresponding Publicodes situation with types inferred for each rule. * - * @note - * This represents the situation as needed by the 'setSituation' method of the - * {@link Engine} class with raw values (i.e. string constants are enclosed in - * "''" and boolean values are 'oui' or 'non'). + * @note + * This represents the situation as needed by the 'setSituation' method of the + * {@link Engine} class with raw values (i.e. string constants are enclosed in + * "''" and boolean values are 'oui' or 'non'). */ export type Situation = Partial<{ ${serializedRuleTypes} From 7f15aa06fd6da21dee9aea0c63dec6ab1e7f1bcd Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 18 Nov 2024 17:49:12 +0100 Subject: [PATCH 22/30] feat(command/compile): add RuleValue to the genereated d.ts file It's could be used to have a typed evaluate() method --- src/commands/compile.ts | 15 +++++++++++++++ test/commands/compile.test.ts | 12 +++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 18c54a9..7e19e24 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -99,6 +99,13 @@ the package.json file under the \`publicodes\` key. For example: const serializedRuleTypes = typesEntries .map(([name, type]) => ` "${name}": ${serializeType(type)}`) .join(',\n') + const serializedRulesValue = typesEntries + .map(([name, type]) => { + const title = engine.getRule(name)?.rawNode?.titre + return `${title ? ` /** ${title} */\n` : ''} "${name}": ${serializeJSType(type)}` + }) + .join(',\n') + // TODO: could be little bit more optimized const serializedQuestionsRuleTypes = typesEntries .filter(([name]) => engine.getRule(name).rawNode.question) .map(([name, type]) => { @@ -139,6 +146,14 @@ export type Situation = Partial<{ ${serializedRuleTypes} }> +/** + * Associates for each rule name its corresponding value type (in JavaScript +* form) that will be returned by the {@link Engine.evaluate} method. + */ +export type RuleValue = Partial<{ +${serializedRulesValue} +}> + /** * Subset of the {@link Situation} with only the rules that are questions * (i.e. input rules). diff --git a/test/commands/compile.test.ts b/test/commands/compile.test.ts index a1cd2f4..db81dea 100644 --- a/test/commands/compile.test.ts +++ b/test/commands/compile.test.ts @@ -8,11 +8,13 @@ describe('publicodes compile', () => { it('should compile with no arguments/flags', async () => { runInDir('tmp', async (cwd) => { const { stdout } = await cli.execCommand('compile') - expect(stdout).toContain('Compilation complete!') - expect(fs.existsSync('build')).toBe(true) - expect(fs.existsSync('build/index.js')).toBe(true) - expect(fs.existsSync(`build/${path.basename(cwd)}.model.json`)).toBe(true) - expect(fs.existsSync(`build/index.d.ts`)).toBe(true) + expect(stdout).toContain('Compilation done.') + expect(fs.existsSync('publicodes-build')).toBe(true) + expect(fs.existsSync('publicodes-build/index.js')).toBe(true) + expect( + fs.existsSync(`publicodes-build/${path.basename(cwd)}.model.json`), + ).toBe(true) + expect(fs.existsSync(`publicodes-build/index.d.ts`)).toBe(true) }) }) }) From af220eb91957fa1d215b93af3e6882bd194157b6 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 18 Nov 2024 17:50:18 +0100 Subject: [PATCH 23/30] refactor(command/compile)!: serialized parsed rules instead of raw rules This is useful to resolves "avec" mechansims. --- src/commands/compile.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 7e19e24..59a6a71 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -5,6 +5,7 @@ import path from 'path' import fs from 'fs' import { getModelFromSource, GetModelFromSourceOptions } from '../compilation' import { RawRules } from '../commons' +import { serializeParsedRules } from '../serializeParsedRules' import { exitWithError, runWithSpinner } from '../utils/cli' import { resolveRuleTypes, RuleType } from '../compilation/ruleTypes' import Engine from 'publicodes' @@ -87,7 +88,11 @@ the package.json file under the \`publicodes\` key. For example: await this.generateDTS(engine, outputDir) - await generateBaseFiles(rawRules, outputDir, pkgName) + await generateBaseFiles( + serializeParsedRules(engine.getParsedRules()), + outputDir, + pkgName, + ) p.outro('Compilation done.') } From e8ff6e91b08c0e983267c4e80c52a96f51dc92d4 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Thu, 21 Nov 2024 11:05:53 +0100 Subject: [PATCH 24/30] v1.3.0-2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f536ed1..363c584 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@publicodes/tools", - "version": "1.3.0-1", + "version": "1.3.0-2", "description": "A CLI tool for Publicodes", "type": "module", "main": "dist/index.js", From 2e0f32576c7b9b90ff88d2717969da0666ac9293 Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Wed, 15 Jan 2025 16:20:02 +0100 Subject: [PATCH 25/30] pkg: bump publicodes version --- package.json | 3 +- src/commands/compile.ts | 10 ++++++ src/commons.ts | 3 +- src/migration/migrateSituation.ts | 6 ++-- src/optims/constantFolding.ts | 20 ++++-------- src/serializeParsedRules.ts | 10 ++++-- yarn.lock | 54 ++++++++++++++++++++++++++++--- 7 files changed, 80 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 363c584..0f57b19 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "chalk": "^5.3.0", "glob": "^10.4.1", "path": "^0.12.7", - "publicodes": "^1.5.1", + "publicodes": "^1.6.1", "yaml": "^2.4.5" }, "devDependencies": { @@ -106,5 +106,4 @@ }, "publishConfig": { "access": "public" - } } diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 59a6a71..4931f59 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -55,6 +55,12 @@ the package.json file under the \`publicodes\` key. For example: ] static override flags = { + ignore: Flags.string({ + char: 'i', + summary: 'Ignore files matching the specified glob pattern.', + multiple: true, + }), + output: Flags.string({ char: 'o', summary: 'Specify the output directory. Default is "./publicodes-build".', @@ -71,6 +77,10 @@ the package.json file under the \`publicodes\` key. For example: this.config.pjson?.publicodes?.files ?? ['src/'] : argv + // TODO: refactor config management + const ignoredFiles: string[] = + this.config.pjson?.publicodes?.ignore ?? flags.ignore ?? [] + const outputDir = path.resolve( flags.output ?? this.config.pjson?.publicodes?.output ?? diff --git a/src/commons.ts b/src/commons.ts index 7ab0740..5ddcb02 100644 --- a/src/commons.ts +++ b/src/commons.ts @@ -5,7 +5,6 @@ import { ExprAST, reduceAST, ASTNode, - Evaluation, PublicodesExpression, } from 'publicodes' import yaml from 'yaml' @@ -253,7 +252,7 @@ ${yaml.stringify(secondDef, { indent: 2 })}`, * * @returns The value without quotes if it is a string, null otherwise. */ -export function getValueWithoutQuotes(value: Evaluation) { +export function getValueWithoutQuotes(value: PublicodesExpression) { if ( typeof value !== 'string' || !value.startsWith("'") || diff --git a/src/migration/migrateSituation.ts b/src/migration/migrateSituation.ts index d2ac94d..f4e76a0 100644 --- a/src/migration/migrateSituation.ts +++ b/src/migration/migrateSituation.ts @@ -1,4 +1,4 @@ -import { Evaluation, Situation } from 'publicodes' +import { Evaluation, PublicodesExpression, Situation } from 'publicodes' import { getValueWithoutQuotes, RuleName } from '../commons' /** @@ -93,7 +93,7 @@ export function migrateSituation( */ function handleSpecialCases( rule: RuleName, - oldValue: Evaluation, + oldValue: PublicodesExpression, situation: Situation, ): void { // Special case, number store as a string, we have to convert it to a number @@ -127,7 +127,7 @@ function handleSpecialCases( function updateKey( rule: RuleName, - oldValue: Evaluation, + oldValue: PublicodesExpression, situation: Situation, ruleToMigrate: RuleName | undefined, ): void { diff --git a/src/optims/constantFolding.ts b/src/optims/constantFolding.ts index 2db6a2f..aed5927 100644 --- a/src/optims/constantFolding.ts +++ b/src/optims/constantFolding.ts @@ -6,6 +6,7 @@ import Engine, { Unit, EvaluatedNode, utils, + Evaluation, } from 'publicodes' import type { RuleNode, ASTNode } from 'publicodes' import { RuleName } from '../commons' @@ -271,10 +272,10 @@ function updateRefCounting( function replaceRuleWithEvaluatedNodeValue( rule: RuleNode, - nodeValue: number | boolean | string | Record, + nodeValue: Evaluation, unit: Unit | undefined, -): ASTNode { - const constantNode: ASTNode = { +): EvaluatedNode<'constant'> { + const constantNode: EvaluatedNode<'constant'> = { nodeValue, type: typeof nodeValue === 'number' @@ -287,19 +288,12 @@ function replaceRuleWithEvaluatedNodeValue( nodeKind: 'constant', missingVariables: {}, + unit, rawNode: { valeur: nodeValue, }, isNullable: false, } - const explanationThen: ASTNode = - unit !== undefined - ? { - nodeKind: 'unité', - unit, - explanation: constantNode, - } - : constantNode if (rule.explanation.valeur.nodeKind === 'contexte') { // We remove the contexte as it's now considered as a constant. @@ -316,14 +310,14 @@ function replaceRuleWithEvaluatedNodeValue( * - alors: * - sinon: . $SITUATION */ - node.explanation.alors = explanationThen + node.explanation.alors = constantNode return node } }), rule, ) - return explanationThen + return constantNode } function isNullable(node: ASTNode): boolean { diff --git a/src/serializeParsedRules.ts b/src/serializeParsedRules.ts index 459e877..0863636 100644 --- a/src/serializeParsedRules.ts +++ b/src/serializeParsedRules.ts @@ -24,8 +24,14 @@ function serializeValue(node: ASTNode, needParens = false): SerializedRule { return node.nodeValue ? 'oui' : 'non' case 'string': return `'${node.nodeValue}'` - case 'number': - return Number(node.nodeValue) + case 'number': { + // @ts-ignore + if (node.unit) { + // @ts-ignore + return `${node.nodeValue} ${serializeUnit(node.unit)}` + } + return node.nodeValue as number + } default: { if (node.nodeValue === null) { return null diff --git a/yarn.lock b/yarn.lock index a0d7916..2426745 100644 --- a/yarn.lock +++ b/yarn.lock @@ -858,6 +858,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +commander@^2.19.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" @@ -918,6 +923,11 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +discontinuous-range@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" + integrity sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ== + docdash@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/docdash/-/docdash-2.0.2.tgz#e86dafb260b5dee4fbf1f7b34c8752634aa22f78" @@ -1395,6 +1405,11 @@ minimatch@^9.0.0, minimatch@^9.0.4, minimatch@^9.0.5: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +moo@^0.5.0, moo@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.2.tgz#f9fe82473bc7c184b0d32e2215d3f6e67278733c" + integrity sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -1419,6 +1434,16 @@ nanoid@^3.3.7: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +nearley@^2.20.1: + version "2.20.1" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" + integrity sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ== + dependencies: + commander "^2.19.0" + moo "^0.5.0" + railroad-diagrams "^1.0.0" + randexp "0.4.6" + 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" @@ -1540,10 +1565,13 @@ process@^0.11.1: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -publicodes@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.5.1.tgz#549de8fe9cd46ca94b5a984c95e5972126a6273d" - integrity sha512-VzTGL+iQUTRoBErP/5LRjq2jeFMPyd0kNcp1FPL9ackiZ0uE2SQHbKr+K6cT0OjKE0gJgPVF8lEDDZAALuLAng== +publicodes@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.6.1.tgz#362ebe75de54ade3a81643b730c5a76dea3445b2" + integrity sha512-oCi9SMIUYgQzIL/9Txz+agl2/V0pJc6+q+0XxfcHv4evkCojdJ6VsubgiL/MLxiE0B7e1BLTUobkTPYHvgOMnw== + dependencies: + moo "^0.5.2" + nearley "^2.20.1" punycode@^2.1.0: version "2.3.1" @@ -1555,6 +1583,19 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +railroad-diagrams@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" + integrity sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A== + +randexp@0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" + integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== + dependencies: + discontinuous-range "1.0.0" + ret "~0.1.10" + react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -1572,6 +1613,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" From 2ad8c4feeee5f038f5e14df9de59240b4aee4e29 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 27 Jan 2025 09:44:42 +0100 Subject: [PATCH 26/30] fix: fix package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0f57b19..22e7a91 100644 --- a/package.json +++ b/package.json @@ -106,4 +106,5 @@ }, "publishConfig": { "access": "public" + } } From e0cb330b9981c8ff683830351c560f78e4d0a92c Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 27 Jan 2025 11:28:12 +0100 Subject: [PATCH 27/30] fix: use publicodes-build/ instead of build/ --- src/commands/compile.ts | 10 +++++----- src/commands/init.ts | 4 +++- src/commons.ts | 4 ++++ src/utils/pjson.ts | 7 ++++--- test/commands/init.test.ts | 6 +++--- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 4931f59..829f9f1 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -4,7 +4,7 @@ import chalk from 'chalk' import path from 'path' import fs from 'fs' import { getModelFromSource, GetModelFromSourceOptions } from '../compilation' -import { RawRules } from '../commons' +import { DEFAULT_BUILD_DIR, RawRules } from '../commons' import { serializeParsedRules } from '../serializeParsedRules' import { exitWithError, runWithSpinner } from '../utils/cli' import { resolveRuleTypes, RuleType } from '../compilation/ruleTypes' @@ -32,7 +32,7 @@ the package.json file under the \`publicodes\` key. For example: // ... "publicodes": { "files": ["src/"], - "output": "build" + "output": "${DEFAULT_BUILD_DIR}", } } ` @@ -40,7 +40,7 @@ the package.json file under the \`publicodes\` key. For example: static override examples = [ { command: '<%= config.bin %> <%= command.id %>', - description: `Compile all publicodes files in the src/ directory into the build/ directory.`, + description: `Compile all publicodes files in the src/ directory into the ${DEFAULT_BUILD_DIR}/ directory.`, }, { command: '<%= config.bin %> <%= command.id %> src/**/*.publicodes', @@ -63,7 +63,7 @@ the package.json file under the \`publicodes\` key. For example: output: Flags.string({ char: 'o', - summary: 'Specify the output directory. Default is "./publicodes-build".', + summary: `Specify the output directory. Default is "./${DEFAULT_BUILD_DIR}".`, }), } @@ -84,7 +84,7 @@ the package.json file under the \`publicodes\` key. For example: const outputDir = path.resolve( flags.output ?? this.config.pjson?.publicodes?.output ?? - 'publicodes-build', + DEFAULT_BUILD_DIR, ) const rawRules = await parseFiles(filesToCompile, { verbose: false }) diff --git a/src/commands/init.ts b/src/commands/init.ts index 2538203..bd50ce1 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -14,6 +14,7 @@ import { import { basePackageJson, PackageJson, readPackageJson } from '../utils/pjson' import { OptionFlag } from '@oclif/core/lib/interfaces' import { spawn } from 'child_process' +import { DEFAULT_BUILD_DIR } from '../commons' type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' type ExtraTool = 'gh-actions' | 'test' @@ -434,7 +435,8 @@ cotisations salariales: ` const BASE_TEST_FILE = `import Engine, { serializeEvaluation, serializeUnit } from "publicodes"; -import rules from "../build"; +import { describe, expect, test } from "vitest"; +import rules from "../${DEFAULT_BUILD_DIR}/index.js"; describe("Salaire net", () => { test("salaire brut par défaut", () => { diff --git a/src/commons.ts b/src/commons.ts index 5ddcb02..8a35e00 100644 --- a/src/commons.ts +++ b/src/commons.ts @@ -263,3 +263,7 @@ export function getValueWithoutQuotes(value: PublicodesExpression) { } return value.slice(1, -1) } + +/** Used by the CLI */ + +export const DEFAULT_BUILD_DIR = 'publicodes-build' diff --git a/src/utils/pjson.ts b/src/utils/pjson.ts index c6f3d59..d046e4d 100644 --- a/src/utils/pjson.ts +++ b/src/utils/pjson.ts @@ -1,4 +1,5 @@ import fs from 'fs' +import { DEFAULT_BUILD_DIR } from '../commons' export type PackageJson = { name: string @@ -42,10 +43,10 @@ export const basePackageJson: PackageJson = { description: '', author: '', type: 'module', - main: 'build/index.js', - types: 'build/index.d.ts', + main: `${DEFAULT_BUILD_DIR}/index.js`, + types: `${DEFAULT_BUILD_DIR}/index.d.ts`, license: 'MIT', - files: ['build'], + files: [DEFAULT_BUILD_DIR], peerDependencies: { // TODO: how to get the latest version of publicodes? publicodes: '^1.5.1', diff --git a/test/commands/init.test.ts b/test/commands/init.test.ts index 04a1de0..cd542c7 100644 --- a/test/commands/init.test.ts +++ b/test/commands/init.test.ts @@ -59,9 +59,9 @@ function getExpectedBasePackageJson( return { name: path.basename(cwd), type: 'module', - main: 'build/index.js', - types: 'build/index.d.ts', - files: ['build'], + main: 'publicodes-build/index.js', + types: 'publicodes-build/index.d.ts', + files: ['publicodes-build'], peerDependencies: { publicodes: '^1.5.1', }, From 5f3b9695ece8dfddd20d8d6b350f67455c89dd9c Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 27 Jan 2025 15:18:57 +0100 Subject: [PATCH 28/30] fix(compilation): use the default build dir to find imported models --- src/compilation/resolveImports.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/compilation/resolveImports.ts b/src/compilation/resolveImports.ts index b07d181..ee92acb 100644 --- a/src/compilation/resolveImports.ts +++ b/src/compilation/resolveImports.ts @@ -7,21 +7,30 @@ import { RuleImportWithOverridenAttrs, IMPORT_KEYWORD, getDoubleDefError, + DEFAULT_BUILD_DIR, } from '../commons' -import { readFileSync } from 'fs' +import { existsSync, readFileSync } from 'fs' import { dirname, join, basename } from 'path' /** * @param {string} packageName - The package name. * * @returns {string} The path to the package model in the node_modules folder. + * + * @note It tries to find the model in the `publicodes-build` folder first otherwise it looks for the model at the root of the package. */ -const packageModelPath = (packageName: string): string => { +function getPackageModelPath(packageName: string): string { if (packageName.startsWith('@')) { const [scope, name] = packageName.split('/') - return `./node_modules/${scope}/${name}/${name}.model.json` + const publicodesBuildPath = `./node_modules/${scope}/${name}/${DEFAULT_BUILD_DIR}/${name}.model.json` + return existsSync(publicodesBuildPath) + ? publicodesBuildPath + : `./node_modules/${scope}/${name}/${name}.model.json` } - return `./node_modules/${packageName}/${packageName}.model.json` + const publicodesBuildPath = `./node_modules/${packageName}/${DEFAULT_BUILD_DIR}/${packageName}.model.json` + return existsSync(publicodesBuildPath) + ? publicodesBuildPath + : `./node_modules/${packageName}/${packageName}.model.json` } // Stores engines initialized with the rules from package @@ -68,7 +77,7 @@ importer!: const modelPath = depuis.source !== undefined ? join(fileDirPath, depuis.source) - : packageModelPath(packageName) + : getPackageModelPath(packageName) if (!enginesCache[modelPath]) { try { From 86bbf764d998c8b8e48b1141df88ffe24cffe91c Mon Sep 17 00:00:00 2001 From: Emile Rolley Date: Mon, 27 Jan 2025 15:20:52 +0100 Subject: [PATCH 29/30] ci: setup pgk.pr.new --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 724199b..b0b1ab0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,3 +22,6 @@ jobs: - name: Check file formatting run: yarn format:check + + - name: pkg.pr.new + run: npx pkg-pr-new publish From a9b6cedc7a542b759a2281dc41370fb5876c8aa4 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 27 Jan 2025 17:46:57 +0100 Subject: [PATCH 30/30] feat: add a 'publicodes dev' command --- package.json | 20 +- quick-doc/README.md | 0 quick-doc/index.html | 15 + quick-doc/src/app.css | 63 ++ quick-doc/src/components/App.tsx | 73 +++ quick-doc/src/components/Error.tsx | 76 +++ quick-doc/src/components/Header.tsx | 46 ++ quick-doc/src/components/QuickSearch.tsx | 0 quick-doc/src/components/RulesIndex.tsx | 17 + quick-doc/src/engine.ts | 49 ++ quick-doc/src/index.tsx | 9 + quick-doc/src/sitemap.tsx | 6 + quick-doc/src/situations.ts | 15 + quick-doc/tsconfig.json | 24 + src/commands/compile.ts | 2 +- src/commands/dev.ts | 107 ++++ src/compilation/getModelFromSource.ts | 25 +- src/create-dev-server.ts | 216 +++++++ tsconfig.json | 2 +- yarn.lock | 765 +++++++++++++++++++++-- 20 files changed, 1478 insertions(+), 52 deletions(-) create mode 100644 quick-doc/README.md create mode 100644 quick-doc/index.html create mode 100644 quick-doc/src/app.css create mode 100644 quick-doc/src/components/App.tsx create mode 100644 quick-doc/src/components/Error.tsx create mode 100644 quick-doc/src/components/Header.tsx create mode 100644 quick-doc/src/components/QuickSearch.tsx create mode 100644 quick-doc/src/components/RulesIndex.tsx create mode 100644 quick-doc/src/engine.ts create mode 100644 quick-doc/src/index.tsx create mode 100644 quick-doc/src/sitemap.tsx create mode 100644 quick-doc/src/situations.ts create mode 100644 quick-doc/tsconfig.json create mode 100644 src/commands/dev.ts create mode 100644 src/create-dev-server.ts diff --git a/package.json b/package.json index 22e7a91..483fa8c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ }, "files": [ "dist", - "bin" + "bin", + "quick-doc" ], "exports": { ".": { @@ -62,18 +63,28 @@ "dependencies": { "@clack/prompts": "^0.7.0", "@oclif/core": "^4.0.23", + "@publicodes/react-ui": "^1.5.4", + "@tailwindcss/typography": "^0.5.16", + "@tailwindcss/vite": "^4.0.0", "@types/node": "^18.11.18", "chalk": "^5.3.0", + "chokidar": "^4.0.3", "glob": "^10.4.1", "path": "^0.12.7", "publicodes": "^1.6.1", - "yaml": "^2.4.5" + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-router-dom": "^7.1.3", + "tailwindcss": "^4.0.0", + "vite": "^6.0.11", + "yaml": "^2.7.0" }, "devDependencies": { "@oclif/test": "^4.0.9", "@types/jest": "^29.5.13", + "@types/react": "^19.0.8", "docdash": "^2.0.1", - "prettier": "^3.0.0", + "prettier": "^3.4.2", "ts-node": "^10.9.2", "tsup": "^8.0.2", "typedoc": "^0.24.8", @@ -106,5 +117,6 @@ }, "publishConfig": { "access": "public" - } + }, + "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" } diff --git a/quick-doc/README.md b/quick-doc/README.md new file mode 100644 index 0000000..e69de29 diff --git a/quick-doc/index.html b/quick-doc/index.html new file mode 100644 index 0000000..740e63e --- /dev/null +++ b/quick-doc/index.html @@ -0,0 +1,15 @@ + + + + + + ⚡️ QuickDoc - Publicodes + + + +
+ + + + + diff --git a/quick-doc/src/app.css b/quick-doc/src/app.css new file mode 100644 index 0000000..6461264 --- /dev/null +++ b/quick-doc/src/app.css @@ -0,0 +1,63 @@ +@import 'tailwindcss'; + +@layer base { + h1 { + @apply text-4xl font-bold mt-8 mb-6 text-[#10162F]; + } + + h2 { + @apply text-3xl font-semibold mt-6 mb-5 text-[#10162F]; + } + + h3 { + @apply text-2xl font-semibold mt-5 mb-4 text-[#10162F]; + } + + p { + @apply text-base leading-relaxed mb-4 text-[#4B5563]; + } + + ul { + @apply list-disc list-inside mb-4 space-y-2; + } + + ol { + @apply list-decimal list-inside mb-4 space-y-2; + } + + li { + @apply text-[#4B5563] leading-relaxed; + } + + a { + @apply text-[#2975d1] hover:text-[#1a365d] transition-colors underline-offset-2 hover:underline; + } + + blockquote { + @apply pl-4 border-l-4 border-[#E5E7EB] italic my-4; + } + + code { + @apply bg-[#F3F4F6] px-2 py-1 rounded text-sm text-[#10162F]; + } + + pre { + @apply bg-[#F3F4F6] p-4 rounded-lg mb-4 overflow-x-auto; + } + button { + @apply bg-slate-100 px-2 py-1 rounded-md hover:bg-slate-50 transition-colors cursor-pointer disabled:opacity-50 text-sm disabled:cursor-not-allowed border border-slate-600 text-slate-800 ml-2; + } +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +.animate-fade-in { + animation: fade-in 0.15s ease-out; +} diff --git a/quick-doc/src/components/App.tsx b/quick-doc/src/components/App.tsx new file mode 100644 index 0000000..eb73403 --- /dev/null +++ b/quick-doc/src/components/App.tsx @@ -0,0 +1,73 @@ +import { RulePage } from '@publicodes/react-ui' +import { useEffect, useState } from 'react' +import { + BrowserRouter, + Link, + Navigate, + Route, + Routes, + useParams, +} from 'react-router-dom' +import { engine, onEngineUpdate } from '../engine' +import { sitemap } from '../sitemap' +import { onSituationUpdate, situations } from '../situations' +import Header from './Header' +import { Error } from './Error' + +function RulePageWrapper() { + let { '*': splat } = useParams() + return ( + + ) +} + +export default function App() { + const [, forceUpdate] = useState({}) + useEffect(() => { + // Subscribe to engine updates + return onEngineUpdate(() => forceUpdate({})) + }, []) + const [activeSituation, setActiveSituation] = useState('') + + useEffect(() => { + return onSituationUpdate(() => { + engine.setSituation(situations[activeSituation] ?? {}) + setActiveSituation(activeSituation in situations ? activeSituation : '') + forceUpdate({}) + }) + }, [activeSituation]) + + function handleSituationChange(situation: string) { + setActiveSituation(situation) + engine.setSituation(situations[situation] ?? {}) + } + + return ( + <> + +
+
+ + + } + /> + } /> + +
+ + + ) +} diff --git a/quick-doc/src/components/Error.tsx b/quick-doc/src/components/Error.tsx new file mode 100644 index 0000000..4a9887c --- /dev/null +++ b/quick-doc/src/components/Error.tsx @@ -0,0 +1,76 @@ +import React from 'react' +import { error } from '../engine' + +export function Error() { + if (error.length === 0) return null + return ( + <> +
+
+
+
+ {error.map((err, index) => { + const { type, message, ruleName } = parseError(err) + return ( + +
+ + + +

+ {type} +

+
+

+ Dans la règle + + {ruleName} + +

+ +

+ {message} +

+
+ ) + })} +
+
+
+ + ) +} + +/** + * + * @example + * ```js + * parseError(`[ Erreur syntaxique ] ➡️ Dans la règle "salaire net" ✖️ La référence "salaire brut" est introuvable. Vérifiez que l'orthographe et l'espace de nom sont corrects`) + * ``` + */ +function parseError(error: string): { + type: string + message: string + ruleName: string +} { + const type = error.match(/\[ (.+?) \]/)?.[1] ?? '' + const ruleName = error.match(/"(.+?)"/)?.[1] ?? '' + const message = error.split('✖️')[1].trim() + return { type, message, ruleName } +} diff --git a/quick-doc/src/components/Header.tsx b/quick-doc/src/components/Header.tsx new file mode 100644 index 0000000..1c04bb1 --- /dev/null +++ b/quick-doc/src/components/Header.tsx @@ -0,0 +1,46 @@ +import { Link } from 'react-router-dom' +import { situations } from '../situations' + +export default function Header({ + setSituation, + activeSituation, +}: { + setSituation: (situation: string) => void + activeSituation: string +}) { + return ( +
+
+

+ + ⚡ Quick-doc + +

+ + +
+
+ ) +} diff --git a/quick-doc/src/components/QuickSearch.tsx b/quick-doc/src/components/QuickSearch.tsx new file mode 100644 index 0000000..e69de29 diff --git a/quick-doc/src/components/RulesIndex.tsx b/quick-doc/src/components/RulesIndex.tsx new file mode 100644 index 0000000..3311b40 --- /dev/null +++ b/quick-doc/src/components/RulesIndex.tsx @@ -0,0 +1,17 @@ +import { Link } from 'react-router-dom' +import { sitemap } from '../sitemap' + +export function RulesIndex() { + return ( +
+

Index des règles

+
    + {Object.entries(sitemap).map(([path, name]) => ( +
  • + {name} +
  • + ))} +
+
+ ) +} diff --git a/quick-doc/src/engine.ts b/quick-doc/src/engine.ts new file mode 100644 index 0000000..425dd13 --- /dev/null +++ b/quick-doc/src/engine.ts @@ -0,0 +1,49 @@ +import Engine from 'publicodes' + +// Create a custom event for engine updates +const ENGINE_UPDATED = 'engine-updated' +const engineUpdate = new EventTarget() + +export let error: string[] = [] +export let log: string[] = [] +export let warning: string[] = [] + +const logger = { + log: (message: string) => log.push(message), + warn: (message: string) => warning.push(message), + error: (message: string) => error.push(message), +} + +export let engine = new Engine() +try { + engine = new Engine(__INJECTED_RULES__, { logger }) +} catch (e) { + error = [e.message] + engineUpdate.dispatchEvent(new Event(ENGINE_UPDATED)) +} + +// Helper to subscribe to engine updates +export function onEngineUpdate(callback: () => void) { + engineUpdate.addEventListener(ENGINE_UPDATED, callback) + return () => engineUpdate.removeEventListener(ENGINE_UPDATED, callback) +} +function clearLogs() { + error = [] + log = [] + warning = [] +} + +if (import.meta.hot) { + import.meta.hot.on('rules-updated', (newRules) => { + const previousEngine = engine + clearLogs() + try { + engine = new Engine(newRules, { logger }) + engine.setSituation(previousEngine.getSituation()) + } catch (e) { + error = [e.message] + } + // Dispatch event to notify subscribers + engineUpdate.dispatchEvent(new Event(ENGINE_UPDATED)) + }) +} diff --git a/quick-doc/src/index.tsx b/quick-doc/src/index.tsx new file mode 100644 index 0000000..0d9af2b --- /dev/null +++ b/quick-doc/src/index.tsx @@ -0,0 +1,9 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './components/App.js' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/quick-doc/src/sitemap.tsx b/quick-doc/src/sitemap.tsx new file mode 100644 index 0000000..31744e8 --- /dev/null +++ b/quick-doc/src/sitemap.tsx @@ -0,0 +1,6 @@ +import { getDocumentationSiteMap } from '@publicodes/react-ui' +import { engine } from './engine' +export const sitemap = getDocumentationSiteMap({ + documentationPath: '', + engine, +}) diff --git a/quick-doc/src/situations.ts b/quick-doc/src/situations.ts new file mode 100644 index 0000000..36ebbb9 --- /dev/null +++ b/quick-doc/src/situations.ts @@ -0,0 +1,15 @@ +export let situations = __INJECTED_SITUATIONS__ +const situationUpdate = new EventTarget() +const SITUATION_UPDATED = 'situations-updated' + +export function onSituationUpdate(callback: () => void) { + situationUpdate.addEventListener(SITUATION_UPDATED, callback) + return () => situationUpdate.removeEventListener(SITUATION_UPDATED, callback) +} + +if (import.meta.hot) { + import.meta.hot.on('situations-updated', (newSituations) => { + situations = newSituations + situationUpdate.dispatchEvent(new Event(SITUATION_UPDATED)) + }) +} diff --git a/quick-doc/tsconfig.json b/quick-doc/tsconfig.json new file mode 100644 index 0000000..6d545f5 --- /dev/null +++ b/quick-doc/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/src/commands/compile.ts b/src/commands/compile.ts index 4931f59..7ec430d 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -74,7 +74,7 @@ the package.json file under the \`publicodes\` key. For example: const filesToCompile: string[] = argv.length === 0 ? // TODO: test with production package - this.config.pjson?.publicodes?.files ?? ['src/'] + (this.config.pjson?.publicodes?.files ?? ['src/']) : argv // TODO: refactor config management diff --git a/src/commands/dev.ts b/src/commands/dev.ts new file mode 100644 index 0000000..5084b8e --- /dev/null +++ b/src/commands/dev.ts @@ -0,0 +1,107 @@ +import * as p from '@clack/prompts' +import { Args, Command, Flags } from '@oclif/core' +import chalk from 'chalk' +import createDevServer from '../create-dev-server' + +export default class Compile extends Command { + static override args = { + files: Args.file({ description: 'Files to compile.' }), + } + + static override strict = false + + static override summary = 'Launch publicodes documentation dev server' + + static override description = ` +This command will start a local server to serve the publicodes auto-generated documentation of the model. + +It will open a browser window with the documentation. The server will automatically reload the page when the documentation is updated. +` + + static override examples = [ + { + command: '<%= config.bin %> <%= command.id %>', + description: `Compile all publicodes files in the src/ directory into the build/ directory.`, + }, + { + command: '<%= config.bin %> <%= command.id %> src/**/*.publicodes', + description: 'Compile all publicodes files in the src/ directory.', + }, + { + command: + '<%= config.bin %> <%= command.id %> src/file1.publicodes src/file2.publicodes -o ../dist', + description: + 'Compile only the specified files into the ../dist/ directory.', + }, + ] + + static override flags = { + host: Flags.string({ + char: 'h', + summary: + 'Specify which IP addresses the server should listen on. Set this to 0.0.0.0 or true to listen on all addresses, including LAN and public addresses.', + }), + + port: Flags.string({ + char: 'p', + summary: + 'Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on.', + }), + + open: Flags.boolean({ + char: 'o', + summary: + 'Open the browser window automatically. If you want to open the server in a specific browser you like, you can set the env process.env.BROWSER (e.g. firefox).', + }), + + test: Flags.string({ + char: 't', + multiple: true, + }), + } + + public async run(): Promise { + const { argv, flags } = await this.parse(Compile) + + p.intro(chalk.bgHex('#2975d1')(' publicodes dev ')) + const filesToCompile: string[] = + argv.length === 0 + ? // TODO: test with production package + (this.config.pjson?.publicodes?.files ?? ['src/']) + : argv + + const testFiles: string[] = !flags.test?.length + ? // TODO: test with production package + (this.config.pjson?.publicodes?.test ?? ['test/']) + : flags.test + + // quickDoc is in the current package (@publicodes/tools) under the folder /quick-doc + + const quickDocPath = import.meta.url + .replace('file://', '') + .replace('dist/commands/dev.js', 'quick-doc') + + console.log(quickDocPath, import.meta.url) + + const server = await createDevServer( + filesToCompile, + testFiles, + quickDocPath, + flags as any, + ) + // Handle process termination + let isShuttingDown = false + const cleanup = async () => { + if (isShuttingDown) return + isShuttingDown = true + p.outro(chalk.bgHex('#2975d1')(' shutting down publicodes dev server ')) + await server.close() + process.exit(0) + } + + process.on('SIGINT', cleanup) + process.on('SIGTERM', cleanup) + + await server + } +} diff --git a/src/compilation/getModelFromSource.ts b/src/compilation/getModelFromSource.ts index 8d6f72a..3067098 100644 --- a/src/compilation/getModelFromSource.ts +++ b/src/compilation/getModelFromSource.ts @@ -48,19 +48,9 @@ export function getModelFromSource( sourcePaths: string | string[], opts?: GetModelFromSourceOptions, ): RawRules { - const normalizedSourcePathsOrGlobs = ( - Array.isArray(sourcePaths) ? sourcePaths : [sourcePaths] - ).map((pathOrGlob) => { - try { - if (statSync(pathOrGlob).isDirectory()) { - return pathOrGlob + '/**/*.publicodes' - } - } catch (e) {} - return pathOrGlob - }) const logger = opts?.logger ?? console - const { jsonModel, namespaces } = sync(normalizedSourcePathsOrGlobs, { + const { jsonModel, namespaces } = sync(normalizeSourcePaths(sourcePaths), { ignore: opts?.ignore, }).reduce( ({ jsonModel, namespaces }, filePath: string) => { @@ -92,3 +82,16 @@ export function getModelFromSource( return jsonModel } + +export function normalizeSourcePaths(sourcePaths: string | string[]): string[] { + return (Array.isArray(sourcePaths) ? sourcePaths : [sourcePaths]).map( + (pathOrGlob) => { + try { + if (statSync(pathOrGlob).isDirectory()) { + return pathOrGlob + '/**/*.publicodes' + } + } catch (e) {} + return pathOrGlob + }, + ) +} diff --git a/src/create-dev-server.ts b/src/create-dev-server.ts new file mode 100644 index 0000000..d4b4e63 --- /dev/null +++ b/src/create-dev-server.ts @@ -0,0 +1,216 @@ +// src/quick-doc/dev-server.ts +import { createServer } from 'vite' +import { watch } from 'chokidar' +import { getModelFromSource, normalizeSourcePaths } from './compilation' +import type { RawRules } from './commons' +import * as p from '@clack/prompts' +import chalk from 'chalk' +import { runAsyncWithSpinner } from './utils/cli' +import tailwindcss from '@tailwindcss/vite' +import { Situation } from 'publicodes' +import { parse } from 'yaml' +import { readFile } from 'fs/promises' +import { sync } from 'glob' + +type Options = { + host?: string + port?: number + open?: boolean +} + +type TestSituation = Record> + +/** + * Extracts situations from a list of publicodes files. + * @param files - An array of file paths to process + * @returns A Promise that resolves to an array of DocSituation objects + * @throws {Error} If file reading or parsing fails + */ +async function extractSituations(files: string[]): Promise { + const situations: TestSituation = {} + + const paths = sync(normalizeSourcePaths(files)) + for (const filePath of paths) { + const content = parse(await readFile(filePath, 'utf-8')) + + // For each rule in the file + for (const [ruleName, rule] of Object.entries(content)) { + if (typeof rule === 'object' && rule !== null && 'contexte' in rule) { + situations[ruleName] = rule.contexte as Situation + } + } + } + + return situations +} + +export default async function createDevServer( + modelFiles: string[], + situationFiles: string[], + quickDocPath: string, + options: Options = {}, +) { + let currentRules: RawRules = {} + let currentSituations: TestSituation = {} + // Create server with spinner + const vite = await runAsyncWithSpinner( + 'Starting Publicodes doc server...', + 'Server ready', + async (spinner) => { + const server = await createServer({ + plugins: [ + { + name: 'publicodes-hot-reload', + configureServer(server) { + server.ws.on('connection', () => { + p.log.info('Client connected to hot reload') + }) + }, + transform(code, id) { + if (id.endsWith('engine.ts')) { + return { + code: code.replace( + '__INJECTED_RULES__', + JSON.stringify(currentRules), + ), + map: null, + } + } + if (id.endsWith('situations.ts')) { + return { + code: code.replace( + '__INJECTED_SITUATIONS__', + JSON.stringify(currentSituations), + ), + map: null, + } + } + }, + }, + tailwindcss(), + ], + root: quickDocPath, + server: { + host: options.host, + port: options.port, + }, + }) + return server + }, + ) + + // Setup file watcher with pretty logs + const modelWatcher = watch(modelFiles, { + persistent: true, + ignoreInitial: false, + }) + + let compilationCount = 0 + + modelWatcher.on('all', async (event, path) => { + if (event === 'add' || event === 'change') { + const timestamp = new Date().toLocaleTimeString() + compilationCount++ + + try { + if (compilationCount > 1) { + p.log.info( + `${chalk.dim(timestamp)} ${chalk.green('⚡')} ${chalk.blue('publicodes')} ${ + event === 'add' ? 'detected new file' : 'recompiling' + } ${chalk.dim(path)}`, + ) + } + const startTime = performance.now() + const newRules = await getModelFromSource(modelFiles, { + logger: { + log: p.log.info, + error: p.log.error, + warn: p.log.warn, + }, + }) + const endTime = performance.now() + + currentRules = newRules + + // Notify clients + vite.ws.send({ + type: 'custom', + event: 'rules-updated', + data: newRules, + }) + + p.log.success( + `${chalk.dim(timestamp)} ${chalk.green('✓')} compiled in ${chalk.bold( + `${Math.round(endTime - startTime)}ms`, + )} ${chalk.dim(`#${compilationCount}`)}`, + ) + } catch (error) { + p.log.error( + `${chalk.dim(timestamp)} ${chalk.red('✗')} compilation failed:\n${ + error instanceof Error ? error.message : String(error) + }`, + ) + } + } + }) + + const situationsWatcher = watch(situationFiles, { + persistent: true, + ignoreInitial: false, + }) + + situationsWatcher.on('all', async (event, path) => { + if (event === 'add' || event === 'change') { + const timestamp = new Date().toLocaleTimeString() + + try { + if (compilationCount > 1) { + p.log.info( + `${chalk.dim(timestamp)} ${chalk.green('⚡')} ${chalk.blue('publicodes')} ${ + event === 'add' ? 'detected new file' : 'reloading' + } ${chalk.dim(path)}`, + ) + } + + const newSituations = await extractSituations(situationFiles) + currentSituations = newSituations + + // Notify clients + vite.ws.send({ + type: 'custom', + event: 'situations-updated', + data: newSituations, + }) + if (compilationCount > 1) { + p.log.success( + `${chalk.dim(timestamp)} ${chalk.green('✓')} situation reloaded`, + ) + } + } catch (error) { + p.log.error( + `${chalk.dim(timestamp)} ${chalk.red('✗')} reload failed:\n${ + error instanceof Error ? error.message : String(error) + }`, + ) + } + } + }) + + // Start server + await vite.listen() + const protocol = 'http' + const { host, port } = vite.config.server + const serverUrl = `${protocol}://${host ?? 'localhost'}:${port}` + + p.log.success(` +${chalk.green('✓')} Publicodes doc server running at: + + ${chalk.bold('Local:')} ${chalk.cyan(serverUrl)} +`) + + if (options.open) { + vite.openBrowser() + } + + return vite +} diff --git a/tsconfig.json b/tsconfig.json index 3735280..875b69d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,7 @@ "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true }, - "include": ["src/**/*"], + "include": ["src/**/*", "quick-doc"], "exclude": ["./node_modules/", "./dist/", "./jest.config.js", "./test/"], "ts-node": { "esm": true diff --git a/yarn.lock b/yarn.lock index 2426745..7d1a3a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,121 +49,263 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@emotion/is-prop-valid@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz#d4175076679c6a26faa92b03bb786f9e52612337" + integrity sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw== + dependencies: + "@emotion/memoize" "^0.8.1" + +"@emotion/memoize@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" + integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== + +"@emotion/unitless@0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.1.tgz#182b5a4704ef8ad91bde93f7a860a88fd92c79a3" + integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ== + "@esbuild/aix-ppc64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== +"@esbuild/aix-ppc64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz#38848d3e25afe842a7943643cbcd387cc6e13461" + integrity sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA== + "@esbuild/android-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== +"@esbuild/android-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz#f592957ae8b5643129fa889c79e69cd8669bb894" + integrity sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg== + "@esbuild/android-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== +"@esbuild/android-arm@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.24.2.tgz#72d8a2063aa630308af486a7e5cbcd1e134335b3" + integrity sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q== + "@esbuild/android-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== +"@esbuild/android-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.24.2.tgz#9a7713504d5f04792f33be9c197a882b2d88febb" + integrity sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw== + "@esbuild/darwin-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== +"@esbuild/darwin-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz#02ae04ad8ebffd6e2ea096181b3366816b2b5936" + integrity sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA== + "@esbuild/darwin-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== +"@esbuild/darwin-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz#9ec312bc29c60e1b6cecadc82bd504d8adaa19e9" + integrity sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA== + "@esbuild/freebsd-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== +"@esbuild/freebsd-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz#5e82f44cb4906d6aebf24497d6a068cfc152fa00" + integrity sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg== + "@esbuild/freebsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== +"@esbuild/freebsd-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz#3fb1ce92f276168b75074b4e51aa0d8141ecce7f" + integrity sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q== + "@esbuild/linux-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== +"@esbuild/linux-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz#856b632d79eb80aec0864381efd29de8fd0b1f43" + integrity sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg== + "@esbuild/linux-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== +"@esbuild/linux-arm@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz#c846b4694dc5a75d1444f52257ccc5659021b736" + integrity sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA== + "@esbuild/linux-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== +"@esbuild/linux-ia32@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz#f8a16615a78826ccbb6566fab9a9606cfd4a37d5" + integrity sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw== + "@esbuild/linux-loong64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== +"@esbuild/linux-loong64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz#1c451538c765bf14913512c76ed8a351e18b09fc" + integrity sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ== + "@esbuild/linux-mips64el@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== +"@esbuild/linux-mips64el@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz#0846edeefbc3d8d50645c51869cc64401d9239cb" + integrity sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw== + "@esbuild/linux-ppc64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== +"@esbuild/linux-ppc64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz#8e3fc54505671d193337a36dfd4c1a23b8a41412" + integrity sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw== + "@esbuild/linux-riscv64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== +"@esbuild/linux-riscv64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz#6a1e92096d5e68f7bb10a0d64bb5b6d1daf9a694" + integrity sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q== + "@esbuild/linux-s390x@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== +"@esbuild/linux-s390x@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz#ab18e56e66f7a3c49cb97d337cd0a6fea28a8577" + integrity sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw== + "@esbuild/linux-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== +"@esbuild/linux-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz#8140c9b40da634d380b0b29c837a0b4267aff38f" + integrity sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q== + +"@esbuild/netbsd-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz#65f19161432bafb3981f5f20a7ff45abb2e708e6" + integrity sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw== + "@esbuild/netbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== +"@esbuild/netbsd-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz#7a3a97d77abfd11765a72f1c6f9b18f5396bcc40" + integrity sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw== + +"@esbuild/openbsd-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz#58b00238dd8f123bfff68d3acc53a6ee369af89f" + integrity sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A== + "@esbuild/openbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== +"@esbuild/openbsd-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz#0ac843fda0feb85a93e288842936c21a00a8a205" + integrity sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA== + "@esbuild/sunos-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== +"@esbuild/sunos-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz#8b7aa895e07828d36c422a4404cc2ecf27fb15c6" + integrity sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig== + "@esbuild/win32-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== +"@esbuild/win32-arm64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz#c023afb647cabf0c3ed13f0eddfc4f1d61c66a85" + integrity sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ== + "@esbuild/win32-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== +"@esbuild/win32-ia32@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz#96c356132d2dda990098c8b8b951209c3cd743c2" + integrity sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA== + "@esbuild/win32-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== +"@esbuild/win32-x64@0.24.2": + version "0.24.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz#34aa0b52d0fbb1a654b596acfa595f0c7b77a77b" + integrity sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -312,6 +454,14 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@publicodes/react-ui@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@publicodes/react-ui/-/react-ui-1.5.4.tgz#6ca2fb899ce06827bb5218d2dcbcc48c4fbe9fe7" + integrity sha512-xheoSay9/i9tzHga0NEYUIAZPaK1HETxJCP6n8g3De1wdEURensbH+TgEYbuKoYroKFJ/HhSGAu/C58I3R8D7A== + dependencies: + fuse.js "^7.0.0" + styled-components "^6.1.1" + "@rollup/rollup-android-arm-eabi@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz#bbd0e616b2078cd2d68afc9824d1fadb2f2ffd27" @@ -322,6 +472,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.23.0.tgz#17c381804b84fecee9dd8588e93d9b2a4544ea42" integrity sha512-8OR+Ok3SGEMsAZispLx8jruuXw0HVF16k+ub2eNXKHDmdxL4cf9NlNpAzhlOhNyXzKDEJuFeq0nZm+XlNb1IFw== +"@rollup/rollup-android-arm-eabi@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.32.0.tgz#42a8e897c7b656adb4edebda3a8b83a57526452f" + integrity sha512-G2fUQQANtBPsNwiVFg4zKiPQyjVKZCUdQUol53R8E71J7AsheRMV/Yv/nB8giOcOVqP7//eB5xPqieBYZe9bGg== + "@rollup/rollup-android-arm64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz#97255ef6384c5f73f4800c0de91f5f6518e21203" @@ -332,6 +487,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.23.0.tgz#0594aab393e7b13c4cd7f21bb72d953c128cdae4" integrity sha512-rEFtX1nP8gqmLmPZsXRMoLVNB5JBwOzIAk/XAcEPuKrPa2nPJ+DuGGpfQUR0XjRm8KjHfTZLpWbKXkA5BoFL3w== +"@rollup/rollup-android-arm64@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.32.0.tgz#846a73eef25b18ff94bac1e52acab6a7c7ac22fa" + integrity sha512-qhFwQ+ljoymC+j5lXRv8DlaJYY/+8vyvYmVx074zrLsu5ZGWYsJNLjPPVJJjhZQpyAKUGPydOq9hRLLNvh1s3A== + "@rollup/rollup-darwin-arm64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz#b6dd74e117510dfe94541646067b0545b42ff096" @@ -342,6 +502,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.23.0.tgz#1bc123d4e69920d026f0ffc791bc3c4e04a33b60" integrity sha512-ZbqlMkJRMMPeapfaU4drYHns7Q5MIxjM/QeOO62qQZGPh9XWziap+NF9fsqPHT0KzEL6HaPspC7sOwpgyA3J9g== +"@rollup/rollup-darwin-arm64@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.32.0.tgz#014ed37f1f7809fdf3442a6b689d3a074a844058" + integrity sha512-44n/X3lAlWsEY6vF8CzgCx+LQaoqWGN7TzUfbJDiTIOjJm4+L2Yq+r5a8ytQRGyPqgJDs3Rgyo8eVL7n9iW6AQ== + "@rollup/rollup-darwin-x64@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz#e07d76de1cec987673e7f3d48ccb8e106d42c05c" @@ -352,6 +517,21 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.23.0.tgz#272b6787d8a356ac8460738c03b0281af75ed73e" integrity sha512-PfmgQp78xx5rBCgn2oYPQ1rQTtOaQCna0kRaBlc5w7RlA3TDGGo7m3XaptgitUZ54US9915i7KeVPHoy3/W8tA== +"@rollup/rollup-darwin-x64@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.32.0.tgz#dde6ed3e56d0b34477fa56c4a199abe5d4b9846b" + integrity sha512-F9ct0+ZX5Np6+ZDztxiGCIvlCaW87HBdHcozUfsHnj1WCUTBUubAoanhHUfnUHZABlElyRikI0mgcw/qdEm2VQ== + +"@rollup/rollup-freebsd-arm64@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.32.0.tgz#8ad634f462a6b7e338257cf64c7baff99618a08e" + integrity sha512-JpsGxLBB2EFXBsTLHfkZDsXSpSmKD3VxXCgBQtlPcuAqB8TlqtLcbeMhxXQkCDv1avgwNjF8uEIbq5p+Cee0PA== + +"@rollup/rollup-freebsd-x64@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.32.0.tgz#9d4d1dbbafcb0354d52ba6515a43c7511dba8052" + integrity sha512-wegiyBT6rawdpvnD9lmbOpx5Sph+yVZKHbhnSP9MqUEDX08G4UzMU+D87jrazGE7lRSyTRs6NEYHtzfkJ3FjjQ== + "@rollup/rollup-linux-arm-gnueabihf@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz#9f1a6d218b560c9d75185af4b8bb42f9f24736b8" @@ -362,6 +542,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.23.0.tgz#c35a35414d11c028db1e11b158b3947d1fa3abb0" integrity sha512-WAeZfAAPus56eQgBioezXRRzArAjWJGjNo/M+BHZygUcs9EePIuGI1Wfc6U/Ki+tMW17FFGvhCfYnfcKPh18SA== +"@rollup/rollup-linux-arm-gnueabihf@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.32.0.tgz#3bd5fcbab92a66e032faef1078915d1dbf27de7a" + integrity sha512-3pA7xecItbgOs1A5H58dDvOUEboG5UfpTq3WzAdF54acBbUM+olDJAPkgj1GRJ4ZqE12DZ9/hNS2QZk166v92A== + "@rollup/rollup-linux-arm-musleabihf@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz#53618b92e6ffb642c7b620e6e528446511330549" @@ -372,6 +557,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.23.0.tgz#f490e10393558d37c8bc71e71fcab919f2a5bec6" integrity sha512-v7PGcp1O5XKZxKX8phTXtmJDVpE20Ub1eF6w9iMmI3qrrPak6yR9/5eeq7ziLMrMTjppkkskXyxnmm00HdtXjA== +"@rollup/rollup-linux-arm-musleabihf@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.32.0.tgz#a77838b9779931ce4fa01326b585eee130f51e60" + integrity sha512-Y7XUZEVISGyge51QbYyYAEHwpGgmRrAxQXO3siyYo2kmaj72USSG8LtlQQgAtlGfxYiOwu+2BdbPjzEpcOpRmQ== + "@rollup/rollup-linux-arm64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz#99a7ba5e719d4f053761a698f7b52291cefba577" @@ -382,6 +572,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.23.0.tgz#1b685e1c219494e39f7441cd6b15fe4779ceda77" integrity sha512-nAbWsDZ9UkU6xQiXEyXBNHAKbzSAi95H3gTStJq9UGiS1v+YVXwRHcQOQEF/3CHuhX5BVhShKoeOf6Q/1M+Zhg== +"@rollup/rollup-linux-arm64-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.32.0.tgz#ec1b1901b82d57a20184adb61c725dd8991a0bf0" + integrity sha512-r7/OTF5MqeBrZo5omPXcTnjvv1GsrdH8a8RerARvDFiDwFpDVDnJyByYM/nX+mvks8XXsgPUxkwe/ltaX2VH7w== + "@rollup/rollup-linux-arm64-musl@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz#f53db99a45d9bc00ce94db8a35efa7c3c144a58c" @@ -392,6 +587,16 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.23.0.tgz#a6cf6cdb340abde851b055e6d8785308ef4ace1a" integrity sha512-5QT/Di5FbGNPaVw8hHO1wETunwkPuZBIu6W+5GNArlKHD9fkMHy7vS8zGHJk38oObXfWdsuLMogD4sBySLJ54g== +"@rollup/rollup-linux-arm64-musl@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.32.0.tgz#7aa23b45bf489b7204b5a542e857e134742141de" + integrity sha512-HJbifC9vex9NqnlodV2BHVFNuzKL5OnsV2dvTw6e1dpZKkNjPG6WUq+nhEYV6Hv2Bv++BXkwcyoGlXnPrjAKXw== + +"@rollup/rollup-linux-loongarch64-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.32.0.tgz#7bf0ebd8c5ad08719c3b4786be561d67f95654a7" + integrity sha512-VAEzZTD63YglFlWwRj3taofmkV1V3xhebDXffon7msNz4b14xKsz7utO6F8F4cqt8K/ktTl9rm88yryvDpsfOw== + "@rollup/rollup-linux-powerpc64le-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz#cbb0837408fe081ce3435cf3730e090febafc9bf" @@ -402,6 +607,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.23.0.tgz#2ce0518e709a8a4c0ae563ae0dd4526bc8b14df8" integrity sha512-Sefl6vPyn5axzCsO13r1sHLcmPuiSOrKIImnq34CBurntcJ+lkQgAaTt/9JkgGmaZJ+OkaHmAJl4Bfd0DmdtOQ== +"@rollup/rollup-linux-powerpc64le-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.32.0.tgz#e687dfcaf08124aafaaebecef0cc3986675cb9b6" + integrity sha512-Sts5DST1jXAc9YH/iik1C9QRsLcCoOScf3dfbY5i4kH9RJpKxiTBXqm7qU5O6zTXBTEZry69bGszr3SMgYmMcQ== + "@rollup/rollup-linux-riscv64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz#8ed09c1d1262ada4c38d791a28ae0fea28b80cc9" @@ -412,6 +622,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.23.0.tgz#008bbfc76beae9651b989a36a0308fbb90ce9fcd" integrity sha512-o4QI2KU/QbP7ZExMse6ULotdV3oJUYMrdx3rBZCgUF3ur3gJPfe8Fuasn6tia16c5kZBBw0aTmaUygad6VB/hQ== +"@rollup/rollup-linux-riscv64-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.32.0.tgz#19fce2594f9ce73d1cb0748baf8cd90a7bedc237" + integrity sha512-qhlXeV9AqxIyY9/R1h1hBD6eMvQCO34ZmdYvry/K+/MBs6d1nRFLm6BOiITLVI+nFAAB9kUB6sdJRKyVHXnqZw== + "@rollup/rollup-linux-s390x-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz#938138d3c8e0c96f022252a28441dcfb17afd7ec" @@ -422,6 +637,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.23.0.tgz#dac114e4eda8d6c5d6b46abd7f1638c6e5846f75" integrity sha512-+bxqx+V/D4FGrpXzPGKp/SEZIZ8cIW3K7wOtcJAoCrmXvzRtmdUhYNbgd+RztLzfDEfA2WtKj5F4tcbNPuqgeg== +"@rollup/rollup-linux-s390x-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.32.0.tgz#fd99b335bb65c59beb7d15ae82be0aafa9883c19" + integrity sha512-8ZGN7ExnV0qjXa155Rsfi6H8M4iBBwNLBM9lcVS+4NcSzOFaNqmt7djlox8pN1lWrRPMRRQ8NeDlozIGx3Omsw== + "@rollup/rollup-linux-x64-gnu@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz#1a7481137a54740bee1ded4ae5752450f155d942" @@ -432,6 +652,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.23.0.tgz#5d813f8fa79830e13ebeb69433cc786c5522da87" integrity sha512-I/eXsdVoCKtSgK9OwyQKPAfricWKUMNCwJKtatRYMmDo5N859tbO3UsBw5kT3dU1n6ZcM1JDzPRSGhAUkxfLxw== +"@rollup/rollup-linux-x64-gnu@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.32.0.tgz#4e8c697bbaa2e2d7212bd42086746c8275721166" + integrity sha512-VDzNHtLLI5s7xd/VubyS10mq6TxvZBp+4NRWoW+Hi3tgV05RtVm4qK99+dClwTN1McA6PHwob6DEJ6PlXbY83A== + "@rollup/rollup-linux-x64-musl@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz#f1186afc601ac4f4fc25fac4ca15ecbee3a1874d" @@ -442,6 +667,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.23.0.tgz#cca8bf6f96467494c4cb8bba996752d3c7b20714" integrity sha512-4ZoDZy5ShLbbe1KPSafbFh1vbl0asTVfkABC7eWqIs01+66ncM82YJxV2VtV3YVJTqq2P8HMx3DCoRSWB/N3rw== +"@rollup/rollup-linux-x64-musl@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.32.0.tgz#0d2f74bd9cfe0553f20f056760a95b293e849ab2" + integrity sha512-qcb9qYDlkxz9DxJo7SDhWxTWV1gFuwznjbTiov289pASxlfGbaOD54mgbs9+z94VwrXtKTu+2RqwlSTbiOqxGg== + "@rollup/rollup-win32-arm64-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz#ed6603e93636a96203c6915be4117245c1bd2daf" @@ -452,6 +682,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.23.0.tgz#9e09307dd0656a63db9ef86a6004679f56d9ddcf" integrity sha512-+5Ky8dhft4STaOEbZu3/NU4QIyYssKO+r1cD3FzuusA0vO5gso15on7qGzKdNXnc1gOrsgCqZjRw1w+zL4y4hQ== +"@rollup/rollup-win32-arm64-msvc@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.32.0.tgz#6534a09fcdd43103645155cedb5bfa65fbf2c23f" + integrity sha512-pFDdotFDMXW2AXVbfdUEfidPAk/OtwE/Hd4eYMTNVVaCQ6Yl8et0meDaKNL63L44Haxv4UExpv9ydSf3aSayDg== + "@rollup/rollup-win32-ia32-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz#14e0b404b1c25ebe6157a15edb9c46959ba74c54" @@ -462,6 +697,11 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.23.0.tgz#ebd6a789dd59c1a4e94ab055de0c37ab4ae43618" integrity sha512-0SPJk4cPZQhq9qA1UhIRumSE3+JJIBBjtlGl5PNC///BoaByckNZd53rOYD0glpTkYFBQSt7AkMeLVPfx65+BQ== +"@rollup/rollup-win32-ia32-msvc@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.32.0.tgz#8222ccfecffd63a6b0ddbe417d8d959e4f2b11b3" + integrity sha512-/TG7WfrCAjeRNDvI4+0AAMoHxea/USWhAzf9PVDFHbcqrQ7hMMKp4jZIy4VEjk72AAfN5k4TiSMRXRKf/0akSw== + "@rollup/rollup-win32-x64-msvc@4.18.0": version "4.18.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz#5d694d345ce36b6ecf657349e03eb87297e68da4" @@ -472,11 +712,117 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.23.0.tgz#54e3562ebd264ef5839f8091618310c40d43d8a9" integrity sha512-lqCK5GQC8fNo0+JvTSxcG7YB1UKYp8yrNLhsArlvPWN+16ovSZgoehlVHg6X0sSWPUkpjRBR5TuR12ZugowZ4g== +"@rollup/rollup-win32-x64-msvc@4.32.0": + version "4.32.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.32.0.tgz#1a40b4792c08094b6479c48c90fe7f4b10ec2f54" + integrity sha512-5hqO5S3PTEO2E5VjCePxv40gIgyS2KvO7E7/vvC/NbIW4SIRamkMr1hqj+5Y67fbBWv/bQLB6KelBQmXlyCjWA== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@tailwindcss/node@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/node/-/node-4.0.0.tgz#0c8ab0b72733a165b1774c018b3053129537a96f" + integrity sha512-tfG2uBvo6j6kDIPmntxwXggCOZAt7SkpAXJ6pTIYirNdk5FBqh/CZZ9BZPpgcl/tNFLs6zc4yghM76sqiELG9g== + dependencies: + enhanced-resolve "^5.18.0" + jiti "^2.4.2" + tailwindcss "4.0.0" + +"@tailwindcss/oxide-android-arm64@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.0.tgz#7c1acf233f3cb905433a39995b6cb51817fd3865" + integrity sha512-EAhjU0+FIdyGPR+7MbBWubLLPtmOu+p7c2egTTFBRk/n//zYjNvVK0WhcBK5Y7oUB5mo4EjA2mCbY7dcEMWSRw== + +"@tailwindcss/oxide-darwin-arm64@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.0.tgz#166b50c6462b5ec2347487a00c7b1267844d32ed" + integrity sha512-hdz4xnSWS11cIp+7ye+3dGHqs0X33z+BXXTtgPOguDWVa+TdXUzwxonklSzf5wlJFuot3dv5eWzhlNai0oYYQg== + +"@tailwindcss/oxide-darwin-x64@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.0.tgz#7def146c27d6047655640381a69e2f57ce82e00d" + integrity sha512-+dOUUaXTkPKKhtUI9QtVaYg+MpmLh2CN0dHohiYXaBirEyPMkjaT0zbRgzQlNnQWjCVVXPQluIEb0OMEjSTH+Q== + +"@tailwindcss/oxide-freebsd-x64@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.0.tgz#358a92835cdfebb34da471052c7005a99f7fab33" + integrity sha512-CJhGDhxnrmu4SwyC62fA+wP24MhA/TZlIhRHqg1kRuIHoGoVR2uSSm1qxTxU37tSSZj8Up0q6jsBJCAP4k7rgQ== + +"@tailwindcss/oxide-linux-arm-gnueabihf@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.0.tgz#e3599582f6571d315ebdf43c437acc4649f80c80" + integrity sha512-Wy7Av0xzXfY2ujZBcYy4+7GQm25/J1iHvlQU2CfwdDCuPWfIjYzR6kggz+uVdSJyKV2s64znchBxRE8kV4uXSA== + +"@tailwindcss/oxide-linux-arm64-gnu@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.0.tgz#0d08af1861935cc2c5878a0e736357221bee1288" + integrity sha512-srwBo2l6pvM0swBntc1ucuhGsfFOLkqPRFQ3dWARRTfSkL1U9nAsob2MKc/n47Eva/W9pZZgMOuf7rDw8pK1Ew== + +"@tailwindcss/oxide-linux-arm64-musl@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.0.tgz#114e4f224494604de6d239e38e34152ef504be20" + integrity sha512-abhusswkduYWuezkBmgo0K0/erGq3M4Se5xP0fhc/0dKs0X/rJUYYCFWntHb3IGh3aVzdQ0SXJs93P76DbUqtw== + +"@tailwindcss/oxide-linux-x64-gnu@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.0.tgz#3aae3a768235916f21e02c28fcef6c74ebda0bc0" + integrity sha512-hGtRYIUEx377/HlU49+jvVKKwU1MDSKYSMMs0JFO2Wp7LGxk5+0j5+RBk9NFnmp/lbp32yPTgIOO5m1BmDq36A== + +"@tailwindcss/oxide-linux-x64-musl@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.0.tgz#f8fb0f713e6899c1df54b435c9de5e99570dc5b0" + integrity sha512-7xgQgSAThs0I14VAgmxpJnK6XFSZBxHMGoDXkLyYkEnu+8WRQMbCP93dkCUn2PIv+Q+JulRgc00PJ09uORSLXQ== + +"@tailwindcss/oxide-win32-arm64-msvc@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.0.tgz#c10510769387fbe4aef27e336c89f9933772584a" + integrity sha512-qEcgTIPcWY5ZE7f6VxQ/JPrSFMcehzVIlZj7sGE3mVd5YWreAT+Fl1vSP8q2pjnWXn0avZG3Iw7a2hJQAm+fTQ== + +"@tailwindcss/oxide-win32-x64-msvc@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.0.tgz#039e401ddeb76409aeb8494560f057c818fff6a9" + integrity sha512-bqT0AY8RXb8GMDy28JtngvqaOSB2YixbLPLvUo6I6lkvvUwA6Eqh2Tj60e2Lh7O/k083f8tYiB0WEK4wmTI7Jg== + +"@tailwindcss/oxide@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/oxide/-/oxide-4.0.0.tgz#849cb5c9b6116e17c712e54e193f97a9e99011d7" + integrity sha512-W3FjpJgy4VV1JiL7iBYDf2n/WkeDg1Il+0Q7eWnqPyvkPPCo/Mbwc5BiaT7dfBNV6tQKAhVE34rU5xl8pSl50w== + optionalDependencies: + "@tailwindcss/oxide-android-arm64" "4.0.0" + "@tailwindcss/oxide-darwin-arm64" "4.0.0" + "@tailwindcss/oxide-darwin-x64" "4.0.0" + "@tailwindcss/oxide-freebsd-x64" "4.0.0" + "@tailwindcss/oxide-linux-arm-gnueabihf" "4.0.0" + "@tailwindcss/oxide-linux-arm64-gnu" "4.0.0" + "@tailwindcss/oxide-linux-arm64-musl" "4.0.0" + "@tailwindcss/oxide-linux-x64-gnu" "4.0.0" + "@tailwindcss/oxide-linux-x64-musl" "4.0.0" + "@tailwindcss/oxide-win32-arm64-msvc" "4.0.0" + "@tailwindcss/oxide-win32-x64-msvc" "4.0.0" + +"@tailwindcss/typography@^0.5.16": + version "0.5.16" + resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.16.tgz#a926c8f44d5c439b2915e231cad80058850047c6" + integrity sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA== + dependencies: + lodash.castarray "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.merge "^4.6.2" + postcss-selector-parser "6.0.10" + +"@tailwindcss/vite@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/vite/-/vite-4.0.0.tgz#40360987491d148a0dbd2d9e257dd7150b70e08c" + integrity sha512-4uukMiU9gHui8KMPMdWic5SP1O/tmQ1NFSRNrQWmcop5evAVl/LZ6/LuWL3quEiecp2RBcRWwqJrG+mFXlRlew== + dependencies: + "@tailwindcss/node" "^4.0.0" + "@tailwindcss/oxide" "^4.0.0" + lightningcss "^1.29.1" + tailwindcss "4.0.0" + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -497,6 +843,11 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/cookie@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" + integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== + "@types/estree@1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -548,11 +899,23 @@ dependencies: undici-types "~5.26.4" +"@types/react@^19.0.8": + version "19.0.8" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.8.tgz#7098e6159f2a61e4f4cef2c1223c044a9bec590e" + integrity sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw== + dependencies: + csstype "^3.0.2" + "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== +"@types/stylis@4.2.5": + version "4.2.5" + resolved "https://registry.yarnpkg.com/@types/stylis/-/stylis-4.2.5.tgz#1daa6456f40959d06157698a653a9ab0a70281df" + integrity sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw== + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -764,6 +1127,11 @@ cac@^6.7.12, cac@^6.7.14: resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== +camelize@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.1.tgz#89b7e16884056331a35d6b5ad064332c91daa6c3" + integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== + chai@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/chai/-/chai-5.1.1.tgz#f035d9792a22b481ead1c65908d14bb62ec1c82c" @@ -817,6 +1185,13 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30" + integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== + dependencies: + readdirp "^4.0.1" + ci-info@^3.2.0: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" @@ -873,6 +1248,11 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +cookie@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610" + integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA== + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -887,6 +1267,30 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + integrity sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg== + +css-to-react-native@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.2.0.tgz#cdd8099f71024e149e4f6fe17a7d46ecd55f1e32" + integrity sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^4.0.2" + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +csstype@3.1.3, csstype@^3.0.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + debug@^4.3.1: version "4.3.5" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" @@ -906,6 +1310,11 @@ deep-eql@^5.0.1: resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-5.0.2.tgz#4b756d8d770a9257300825d52a2c2cff99c3a341" integrity sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q== +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + diff-sequences@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" @@ -957,6 +1366,14 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== +enhanced-resolve@^5.18.0: + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + esbuild@^0.21.3, esbuild@^0.21.4: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" @@ -986,6 +1403,37 @@ esbuild@^0.21.3, esbuild@^0.21.4: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" +esbuild@^0.24.2: + version "0.24.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.24.2.tgz#b5b55bee7de017bff5fb8a4e3e44f2ebe2c3567d" + integrity sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA== + optionalDependencies: + "@esbuild/aix-ppc64" "0.24.2" + "@esbuild/android-arm" "0.24.2" + "@esbuild/android-arm64" "0.24.2" + "@esbuild/android-x64" "0.24.2" + "@esbuild/darwin-arm64" "0.24.2" + "@esbuild/darwin-x64" "0.24.2" + "@esbuild/freebsd-arm64" "0.24.2" + "@esbuild/freebsd-x64" "0.24.2" + "@esbuild/linux-arm" "0.24.2" + "@esbuild/linux-arm64" "0.24.2" + "@esbuild/linux-ia32" "0.24.2" + "@esbuild/linux-loong64" "0.24.2" + "@esbuild/linux-mips64el" "0.24.2" + "@esbuild/linux-ppc64" "0.24.2" + "@esbuild/linux-riscv64" "0.24.2" + "@esbuild/linux-s390x" "0.24.2" + "@esbuild/linux-x64" "0.24.2" + "@esbuild/netbsd-arm64" "0.24.2" + "@esbuild/netbsd-x64" "0.24.2" + "@esbuild/openbsd-arm64" "0.24.2" + "@esbuild/openbsd-x64" "0.24.2" + "@esbuild/sunos-x64" "0.24.2" + "@esbuild/win32-arm64" "0.24.2" + "@esbuild/win32-ia32" "0.24.2" + "@esbuild/win32-x64" "0.24.2" + escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -1079,6 +1527,11 @@ fsevents@~2.3.2, fsevents@~2.3.3: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== +fuse.js@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-7.0.0.tgz#6573c9fcd4c8268e403b4fc7d7131ffcf99a9eb2" + integrity sha512-14F4hBIxqKvD4Zz/XjDc3y94mNZN6pRv3U13Udo0lNLCWRBUsrMv2xwcF/y/Z5sV6+FQW+/ow68cHpm4sunt8Q== + get-func-name@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" @@ -1125,7 +1578,7 @@ globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.2.9: +graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -1282,6 +1735,11 @@ jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" +jiti@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.2.tgz#d19b7732ebb6116b06e2038da74a55366faef560" + integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A== + joycon@^3.0.1: version "3.1.1" resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" @@ -1297,6 +1755,74 @@ jsonc-parser@^3.2.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== +lightningcss-darwin-arm64@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.1.tgz#dce17349c7b9f968f396ec240503de14e7b4870b" + integrity sha512-HtR5XJ5A0lvCqYAoSv2QdZZyoHNttBpa5EP9aNuzBQeKGfbyH5+UipLWvVzpP4Uml5ej4BYs5I9Lco9u1fECqw== + +lightningcss-darwin-x64@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.1.tgz#e79c984180c57d00ee114210ceced83473d72dfc" + integrity sha512-k33G9IzKUpHy/J/3+9MCO4e+PzaFblsgBjSGlpAaFikeBFm8B/CkO3cKU9oI4g+fjS2KlkLM/Bza9K/aw8wsNA== + +lightningcss-freebsd-x64@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.1.tgz#4b3aec9620684a60c45266d50fd843869320f42f" + integrity sha512-0SUW22fv/8kln2LnIdOCmSuXnxgxVC276W5KLTwoehiO0hxkacBxjHOL5EtHD8BAXg2BvuhsJPmVMasvby3LiQ== + +lightningcss-linux-arm-gnueabihf@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.1.tgz#b80e9c4dd75652bec451ffd4d5779492a01791ff" + integrity sha512-sD32pFvlR0kDlqsOZmYqH/68SqUMPNj+0pucGxToXZi4XZgZmqeX/NkxNKCPsswAXU3UeYgDSpGhu05eAufjDg== + +lightningcss-linux-arm64-gnu@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.1.tgz#7825eb119ddf580a4a4f011c6f384a3f9c992060" + integrity sha512-0+vClRIZ6mmJl/dxGuRsE197o1HDEeeRk6nzycSy2GofC2JsY4ifCRnvUWf/CUBQmlrvMzt6SMQNMSEu22csWQ== + +lightningcss-linux-arm64-musl@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.1.tgz#389efccf80088dce2bb00e28bd7d1cfe36a71669" + integrity sha512-UKMFrG4rL/uHNgelBsDwJcBqVpzNJbzsKkbI3Ja5fg00sgQnHw/VrzUTEc4jhZ+AN2BvQYz/tkHu4vt1kLuJyw== + +lightningcss-linux-x64-gnu@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.1.tgz#98fc5df5e39ac8ddc51e51f785849eb21131f789" + integrity sha512-u1S+xdODy/eEtjADqirA774y3jLcm8RPtYztwReEXoZKdzgsHYPl0s5V52Tst+GKzqjebkULT86XMSxejzfISw== + +lightningcss-linux-x64-musl@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.1.tgz#fb4f80895ba7dfa8048ee32e9716a1684fefd6b2" + integrity sha512-L0Tx0DtaNUTzXv0lbGCLB/c/qEADanHbu4QdcNOXLIe1i8i22rZRpbT3gpWYsCh9aSL9zFujY/WmEXIatWvXbw== + +lightningcss-win32-arm64-msvc@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.1.tgz#fd4409fd1505d89d0ff66511c36df5a1379eb7cd" + integrity sha512-QoOVnkIEFfbW4xPi+dpdft/zAKmgLgsRHfJalEPYuJDOWf7cLQzYg0DEh8/sn737FaeMJxHZRc1oBreiwZCjog== + +lightningcss-win32-x64-msvc@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.1.tgz#54dcd52884f6cbf205a53d49239559603f194927" + integrity sha512-NygcbThNBe4JElP+olyTI/doBNGJvLs3bFCRPdvuCcxZCcCZ71B858IHpdm7L1btZex0FvCmM17FK98Y9MRy1Q== + +lightningcss@^1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.29.1.tgz#1d4d62332fc5ba4b6c28e04a8c5638c76019702b" + integrity sha512-FmGoeD4S05ewj+AkhTY+D+myDvXI6eL27FjHIjoyUkO/uw7WZD1fBVs0QxeYWa7E17CUHJaYX/RUGISCtcrG4Q== + dependencies: + detect-libc "^1.0.3" + optionalDependencies: + lightningcss-darwin-arm64 "1.29.1" + lightningcss-darwin-x64 "1.29.1" + lightningcss-freebsd-x64 "1.29.1" + lightningcss-linux-arm-gnueabihf "1.29.1" + lightningcss-linux-arm64-gnu "1.29.1" + lightningcss-linux-arm64-musl "1.29.1" + lightningcss-linux-x64-gnu "1.29.1" + lightningcss-linux-x64-musl "1.29.1" + lightningcss-win32-arm64-msvc "1.29.1" + lightningcss-win32-x64-msvc "1.29.1" + lilconfig@^3.0.0, lilconfig@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb" @@ -1312,6 +1838,21 @@ load-tsconfig@^0.2.3: resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== +lodash.castarray@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115" + integrity sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -1434,6 +1975,11 @@ nanoid@^3.3.7: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +nanoid@^3.3.8: + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== + nearley@^2.20.1: version "2.20.1" resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" @@ -1519,6 +2065,11 @@ picocolors@^1.1.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -1537,6 +2088,28 @@ postcss-load-config@^4.0.1: lilconfig "^3.0.0" yaml "^2.3.4" +postcss-selector-parser@6.0.10: + version "6.0.10" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-value-parser@^4.0.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + +postcss@8.4.38: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + postcss@^8.4.43: version "8.4.47" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" @@ -1546,10 +2119,19 @@ postcss@^8.4.43: picocolors "^1.1.0" source-map-js "^1.2.1" -prettier@^3.0.0: - version "3.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" - integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== +postcss@^8.4.49: + version "8.5.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.1.tgz#e2272a1f8a807fafa413218245630b5db10a3214" + integrity sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ== + dependencies: + nanoid "^3.3.8" + picocolors "^1.1.1" + source-map-js "^1.2.1" + +prettier@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -1596,11 +2178,45 @@ randexp@0.4.6: discontinuous-range "1.0.0" ret "~0.1.10" +react-dom@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57" + integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ== + dependencies: + scheduler "^0.25.0" + react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== +react-router-dom@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.1.3.tgz#2788f7c670aa50275e16bb033b9b04b01a45b6dc" + integrity sha512-qQGTE+77hleBzv9SIUIkGRvuFBQGagW+TQKy53UTZAO/3+YFNBYvRsNIZ1GT17yHbc63FylMOdS+m3oUriF1GA== + dependencies: + react-router "7.1.3" + +react-router@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.1.3.tgz#6c15c28838b799cb3058943e8e8015dbd6c16c7b" + integrity sha512-EezYymLY6Guk/zLQ2vRA8WvdUhWFEj5fcE3RfWihhxXBW7+cd1LsIiA3lmx+KCmneAGQuyBv820o44L2+TtkSA== + dependencies: + "@types/cookie" "^0.6.0" + cookie "^1.0.1" + set-cookie-parser "^2.6.0" + turbo-stream "2.4.0" + +react@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" + integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ== + +readdirp@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.1.1.tgz#bd115327129672dc47f87408f05df9bd9ca3ef55" + integrity sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -1673,6 +2289,34 @@ rollup@^4.20.0: "@rollup/rollup-win32-x64-msvc" "4.23.0" fsevents "~2.3.2" +rollup@^4.23.0: + version "4.32.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.32.0.tgz#c405bf6fca494d1999d9088f7736d7f03e5cac5a" + integrity sha512-JmrhfQR31Q4AuNBjjAX4s+a/Pu/Q8Q9iwjWBsjRH1q52SPFE2NqRMK6fUZKKnvKO6id+h7JIRf0oYsph53eATg== + dependencies: + "@types/estree" "1.0.6" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.32.0" + "@rollup/rollup-android-arm64" "4.32.0" + "@rollup/rollup-darwin-arm64" "4.32.0" + "@rollup/rollup-darwin-x64" "4.32.0" + "@rollup/rollup-freebsd-arm64" "4.32.0" + "@rollup/rollup-freebsd-x64" "4.32.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.32.0" + "@rollup/rollup-linux-arm-musleabihf" "4.32.0" + "@rollup/rollup-linux-arm64-gnu" "4.32.0" + "@rollup/rollup-linux-arm64-musl" "4.32.0" + "@rollup/rollup-linux-loongarch64-gnu" "4.32.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.32.0" + "@rollup/rollup-linux-riscv64-gnu" "4.32.0" + "@rollup/rollup-linux-s390x-gnu" "4.32.0" + "@rollup/rollup-linux-x64-gnu" "4.32.0" + "@rollup/rollup-linux-x64-musl" "4.32.0" + "@rollup/rollup-win32-arm64-msvc" "4.32.0" + "@rollup/rollup-win32-ia32-msvc" "4.32.0" + "@rollup/rollup-win32-x64-msvc" "4.32.0" + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -1680,11 +2324,26 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +scheduler@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015" + integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA== + semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +set-cookie-parser@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943" + integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ== + +shallowequal@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -1732,7 +2391,7 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-js@^1.2.1: +source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -1761,16 +2420,7 @@ std-env@^3.7.0: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== -"string-width-cjs@npm:string-width@^4.2.0": - 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@^4.0.0, string-width@^4.1.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.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== @@ -1788,14 +2438,7 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -"strip-ansi-cjs@npm: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@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.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== @@ -1814,6 +2457,26 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +styled-components@^6.1.1: + version "6.1.14" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-6.1.14.tgz#addd3b645f400f8aad84c992afec58804ad1d217" + integrity sha512-KtfwhU5jw7UoxdM0g6XU9VZQFV4do+KrM8idiVCH5h4v49W+3p3yMe0icYwJgZQZepa5DbH04Qv8P0/RdcLcgg== + dependencies: + "@emotion/is-prop-valid" "1.2.2" + "@emotion/unitless" "0.8.1" + "@types/stylis" "4.2.5" + css-to-react-native "3.2.0" + csstype "3.1.3" + postcss "8.4.38" + shallowequal "1.1.0" + stylis "4.3.2" + tslib "2.6.2" + +stylis@4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.3.2.tgz#8f76b70777dd53eb669c6f58c997bf0a9972e444" + integrity sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg== + sucrase@^3.20.3: version "3.35.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" @@ -1848,6 +2511,16 @@ supports-color@^8: dependencies: has-flag "^4.0.0" +tailwindcss@4.0.0, tailwindcss@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-4.0.0.tgz#1f275ed16eb4127cb70bf5e9f53fb8eb7b72be3c" + integrity sha512-ULRPI3A+e39T7pSaf1xoi58AqqJxVCLg8F/uM5A3FadUbnyDTgltVnXJvdkTjwCOGA6NazqHVcwPJC5h2vRYVQ== + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -1930,6 +2603,11 @@ ts-node@^10.9.2: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tslib@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsup@^8.0.2: version "8.1.0" resolved "https://registry.yarnpkg.com/tsup/-/tsup-8.1.0.tgz#354ce9def1721f5029564382ea2a42dc67fbb489" @@ -1950,6 +2628,11 @@ tsup@^8.0.2: sucrase "^3.20.3" tree-kill "^1.2.2" +turbo-stream@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/turbo-stream/-/turbo-stream-2.4.0.tgz#1e4fca6725e90fa14ac4adb782f2d3759a5695f0" + integrity sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -1985,6 +2668,11 @@ undici-types@~6.19.2: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +util-deprecate@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + util@^0.10.3: version "0.10.4" resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" @@ -2018,6 +2706,17 @@ vite@^5.0.0: optionalDependencies: fsevents "~2.3.3" +vite@^6.0.11: + version "6.0.11" + resolved "https://registry.yarnpkg.com/vite/-/vite-6.0.11.tgz#224497e93e940b34c3357c9ebf2ec20803091ed8" + integrity sha512-4VL9mQPKoHy4+FE0NnRE/kbY51TOfaknxAjt3fJbGJxhIpBZiqVzlZDEesWWsuREXHwNdAoOFZ9MkPEVXczHwg== + dependencies: + esbuild "^0.24.2" + postcss "^8.4.49" + rollup "^4.23.0" + optionalDependencies: + fsevents "~2.3.3" + vitest@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/vitest/-/vitest-2.1.1.tgz#24a6f6f5d894509f10685b82de008c507faacbb1" @@ -2094,16 +2793,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm: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" - -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", 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== @@ -2121,11 +2811,16 @@ wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" -yaml@^2.3.4, yaml@^2.4.5: +yaml@^2.3.4: version "2.4.5" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.5.tgz#60630b206dd6d84df97003d33fc1ddf6296cca5e" integrity sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg== +yaml@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98" + integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"