From d95e3c658ade4fb5e549670fa13850ae6de2a32d Mon Sep 17 00:00:00 2001 From: hunghg255 Date: Tue, 16 Jul 2024 15:36:12 +0700 Subject: [PATCH] docs: update gen changelog add to docs --- docs/.vitepress/components/Changelog.vue | 73 +++ docs/.vitepress/components/Contributors.vue | 24 + docs/.vitepress/plugins/changelog.ts | 17 + docs/.vitepress/plugins/contributors.ts | 17 + docs/.vitepress/plugins/markdownTransform.ts | 11 +- docs/.vitepress/theme/index.ts | 21 +- docs/.vitepress/theme/style.css | 6 + docs/.vitepress/theme/utils.ts | 65 ++ docs/package.json | 1 - docs/vite.config.ts | 62 +- eslint.config.mjs | 1 + package.json | 8 +- pnpm-lock.yaml | 364 +++++------ scripts/changeLog.json | 45 ++ scripts/changelog.ts | 132 ++++ scripts/contributions.json | 611 +++++++++++++++++++ scripts/funcUtils.json | 611 +++++++++++++++++++ scripts/genFuncUtils.ts | 32 + 18 files changed, 1837 insertions(+), 264 deletions(-) create mode 100644 docs/.vitepress/components/Changelog.vue create mode 100644 docs/.vitepress/components/Contributors.vue create mode 100644 docs/.vitepress/plugins/changelog.ts create mode 100644 docs/.vitepress/plugins/contributors.ts create mode 100644 docs/.vitepress/theme/utils.ts create mode 100644 scripts/changeLog.json create mode 100644 scripts/changelog.ts create mode 100644 scripts/contributions.json create mode 100644 scripts/funcUtils.json create mode 100644 scripts/genFuncUtils.ts diff --git a/docs/.vitepress/components/Changelog.vue b/docs/.vitepress/components/Changelog.vue new file mode 100644 index 0000000..5bcaba4 --- /dev/null +++ b/docs/.vitepress/components/Changelog.vue @@ -0,0 +1,73 @@ + + + diff --git a/docs/.vitepress/components/Contributors.vue b/docs/.vitepress/components/Contributors.vue new file mode 100644 index 0000000..c65083d --- /dev/null +++ b/docs/.vitepress/components/Contributors.vue @@ -0,0 +1,24 @@ + + + diff --git a/docs/.vitepress/plugins/changelog.ts b/docs/.vitepress/plugins/changelog.ts new file mode 100644 index 0000000..8a7b2e5 --- /dev/null +++ b/docs/.vitepress/plugins/changelog.ts @@ -0,0 +1,17 @@ +import type { Plugin } from 'vite' + +const ID = '/virtual-changelog' + +export function ChangeLog(data: any[]): Plugin { + return { + name: 'js-utils-changelog', + resolveId(id) { + return id === ID ? ID : null + }, + load(id) { + if (id !== ID) + return null + return `export default ${JSON.stringify(data)}` + }, + } +} diff --git a/docs/.vitepress/plugins/contributors.ts b/docs/.vitepress/plugins/contributors.ts new file mode 100644 index 0000000..ac9c3a4 --- /dev/null +++ b/docs/.vitepress/plugins/contributors.ts @@ -0,0 +1,17 @@ +import type { Plugin } from 'vite' + +const ID = '/virtual-contributors' + +export function Contributors(data: Record): Plugin { + return { + name: 'vueusjs-utils-contributors', + resolveId(id) { + return id === ID ? ID : null + }, + load(id) { + if (id !== ID) + return null + return `export default ${JSON.stringify(data)}` + }, + } +} diff --git a/docs/.vitepress/plugins/markdownTransform.ts b/docs/.vitepress/plugins/markdownTransform.ts index bd44883..a814f99 100644 --- a/docs/.vitepress/plugins/markdownTransform.ts +++ b/docs/.vitepress/plugins/markdownTransform.ts @@ -65,8 +65,17 @@ export async function getFunctionMarkdown(pkg: string, name: string) { .map(i => `[${i![0]}](${i![1]})`).join(' • ') const sourceSection = `## Source\n\n${links}\n` + const ContributorsSection = ` +## Contributors - const footer = `\n${sourceSection}` + + ` + const changelogSection = ` +## Changelog + + +` + const footer = `\n${sourceSection}\n${ContributorsSection}\n${changelogSection}\n` return footer; } diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 98d55dd..8720290 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,28 +1,21 @@ import Theme from 'vitepress/theme' -import { NolebaseGitChangelogPlugin } from '@nolebase/vitepress-plugin-git-changelog/client' import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' import type { EnhanceAppContext } from 'vitepress' -import Layout from './Layout.vue' import 'uno.css' import './style.css' -import '@nolebase/vitepress-plugin-git-changelog/client/style.css' +// import '@nolebase/vitepress-plugin-git-changelog/client/style.css' import '@shikijs/vitepress-twoslash/style.css' +import Contributors from '../components/Contributors.vue' +import Changelog from '../components/Changelog.vue' +import Layout from './Layout.vue' export default { ...Theme, Layout, enhanceApp({ app }: EnhanceAppContext) { - app.use(NolebaseGitChangelogPlugin, { - mapAuthors: [ - { - name: 'hunghg255', - username: 'hunghg255', - mapByNameAliases: ['Hung Hoang', 'Hoang Hung'], - mapByEmailAliases: ['giahunghust@gmail.com'], - }, - ], - numCommitHashLetters: 7, - }) + app.component('Contributors', Contributors) + app.component('Changelog', Changelog) + app.use(TwoslashFloatingVue) }, } diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index 164c8f7..376939d 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -185,3 +185,9 @@ .VPHomeHero .VPImage { border-radius: 16px; } + +.changeLog { + padding: 16px; + border-radius: 12px; + background: var(--vp-c-bg-soft); +} diff --git a/docs/.vitepress/theme/utils.ts b/docs/.vitepress/theme/utils.ts new file mode 100644 index 0000000..1cea3f0 --- /dev/null +++ b/docs/.vitepress/theme/utils.ts @@ -0,0 +1,65 @@ +export function renderMarkdown(markdownText = '') { + const htmlText = markdownText + .replace(/^### (.*$)/gm, '

$1

') + .replace(/^## (.*$)/gm, '

$1

') + .replace(/^# (.*$)/gm, '

$1

') + .replace(/^> (.*$)/gm, '
$1
') + .replace(/\*\*(.*)\*\*/g, '$1') + .replace(/\*(.*)\*/g, '$1') + .replace(/!\[(.*?)\]\((.*?)\)/g, '\'$1\'') + .replace(/\[(.*?)\]\((.*?)\)/g, '$1') + .replace(/`(.*?)`/g, '$1') + .replace(/\n$/gm, '
') + + return htmlText.trim() +} + +export function renderCommitMessage(msg: string) { + return renderMarkdown(msg) + .replace(/#(\d+)/g, '#$1') +} + +const mapAuthors = [ + { + nameDipslay: 'Hung Hoang', + username: 'hunghg255', + mapByNameAliases: ['Hung Hoang', 'Hoang Hung'], + mapByEmailAliases: ['giahunghust@gmail.com'], + }, +]; + +export function generateGithubAvatar(nameCommit: string, hash: string) { + const match = mapAuthors.find((author) => { + return author.mapByNameAliases.includes(nameCommit) || author.mapByEmailAliases.includes(nameCommit) || author.username === nameCommit; + }); + + if (match) { + return `https://github.com/${match.username}.png`; + } + + return `https://gravatar.com/avatar/${hash}?d=retro`; +} + +export function generateUserName(nameCommit: string) { + const match = mapAuthors.find((author) => { + return author.mapByNameAliases.includes(nameCommit) || author.mapByEmailAliases.includes(nameCommit) || author.username === nameCommit; + }); + + if (match) { + return match.nameDipslay || nameCommit; + } + + return nameCommit; +} + +export function generateGithubLink(nameCommit: string) { + const match = mapAuthors.find((author) => { + return author.mapByNameAliases.includes(nameCommit) || author.mapByEmailAliases.includes(nameCommit) || author.username === nameCommit; + }); + + if (match) { + return `https://github.com/${match.username}`; + } + + return `https://github.com/${nameCommit}`; +} diff --git a/docs/package.json b/docs/package.json index f8386cf..3f8c546 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,7 +17,6 @@ "devDependencies": { "@nolebase/vitepress-plugin-enhanced-mark": "^2.2.1", "@nolebase/vitepress-plugin-enhanced-readabilities": "^2.2.1", - "@nolebase/vitepress-plugin-git-changelog": "^2.2.2", "@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.2.1", "@shikijs/vitepress-twoslash": "^1.10.3", "@vitejs/plugin-vue-jsx": "^4.0.0", diff --git a/docs/vite.config.ts b/docs/vite.config.ts index 21e430d..2c7ba2f 100644 --- a/docs/vite.config.ts +++ b/docs/vite.config.ts @@ -1,39 +1,35 @@ import { defineConfig } from 'vite' import Unocss from 'unocss/vite' import VueJsx from '@vitejs/plugin-vue-jsx' -import { - GitChangelog, - GitChangelogMarkdownSection, -} from '@nolebase/vitepress-plugin-git-changelog/vite' -import { MarkdownTransform } from '.vitepress/plugins/markdownTransform' +import changeLog from '../scripts/changeLog.json'; +import contributions from '../scripts/contributions.json'; +import { ChangeLog } from './.vitepress/plugins/changelog' +import { Contributors } from './.vitepress/plugins/contributors' +import { MarkdownTransform } from './.vitepress/plugins/markdownTransform' -const githubRepo = 'agiletech-web-dev/js-utils-es' -const githubLink: 'https://github.com/agiletech-web-dev/js-utils-es' = `https://github.com/${githubRepo}` - -export default defineConfig({ - plugins: [ - MarkdownTransform(), - VueJsx(), - Unocss(), - GitChangelog({ - maxGitLogCount: 2000, - repoURL: () => githubLink, - }), - GitChangelogMarkdownSection(), - ], - optimizeDeps: { - include: [ - '@nolebase/vitepress-plugin-enhanced-readabilities > @nolebase/ui > @rive-app/canvas', - ], - exclude: [ - '@nolebase/vitepress-plugin-enhanced-readabilities/client', - 'vitepress', - ], - }, - ssr: { - noExternal: [ - '@nolebase/vitepress-plugin-enhanced-readabilities', - '@nolebase/vitepress-plugin-highlight-targeted-heading', +export default defineConfig(async () => { + return { + plugins: [ + MarkdownTransform(), + ChangeLog(changeLog), + Contributors(contributions), + VueJsx(), + Unocss(), ], - }, + optimizeDeps: { + include: [ + '@nolebase/vitepress-plugin-enhanced-readabilities > @nolebase/ui > @rive-app/canvas', + ], + exclude: [ + '@nolebase/vitepress-plugin-enhanced-readabilities/client', + 'vitepress', + ], + }, + ssr: { + noExternal: [ + '@nolebase/vitepress-plugin-enhanced-readabilities', + '@nolebase/vitepress-plugin-highlight-targeted-heading', + ], + }, + } }) diff --git a/eslint.config.mjs b/eslint.config.mjs index 65a8561..cc41c53 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,5 +7,6 @@ export default antfu({ 'style/member-delimiter-style': 'off', 'ts/ban-ts-comment': 'off', 'test/consistent-test-it': 'off', + 'style/eol-last': 'off', }, }); diff --git a/package.json b/package.json index b9ead87..d3da0a8 100644 --- a/package.json +++ b/package.json @@ -203,14 +203,20 @@ "docs:dev": "pnpm run -C ./docs dev", "docs:preview": "pnpm run -C ./docs preview", "docs:build": "pnpm run -C ./docs build", - "verify-commit": "verify-commit-msg" + "verify-commit": "verify-commit-msg", + "gen-changelog": "esno ./scripts/genFuncUtils.ts && esno ./scripts/changelog.ts" }, "devDependencies": { "@antfu/eslint-config": "^2.22.0", + "@types/md5": "^2.3.5", "@types/node": "^18.19.33", "bumpp": "^9.4.1", "eslint": "^9.7.0", + "esno": "^4.7.0", + "execa": "^9.3.0", "git-scm-hooks": "^0.0.7", + "globby": "^14.0.2", + "md5": "^2.3.0", "tsup": "^8.1.0", "typescript": "^5.4.5", "verify-commit-msg": "^0.0.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a2c7ef..ae35864 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@antfu/eslint-config': specifier: ^2.22.0 version: 2.22.2(@vue/compiler-sfc@3.4.31)(eslint@9.7.0)(typescript@5.5.3)(vitest@1.6.0(@types/node@18.19.39)(less@4.2.0)(terser@5.31.2)) + '@types/md5': + specifier: ^2.3.5 + version: 2.3.5 '@types/node': specifier: ^18.19.33 version: 18.19.39 @@ -20,9 +23,21 @@ importers: eslint: specifier: ^9.7.0 version: 9.7.0 + esno: + specifier: ^4.7.0 + version: 4.7.0 + execa: + specifier: ^9.3.0 + version: 9.3.0 git-scm-hooks: specifier: ^0.0.7 version: 0.0.7 + globby: + specifier: ^14.0.2 + version: 14.0.2 + md5: + specifier: ^2.3.0 + version: 2.3.0 tsup: specifier: ^8.1.0 version: 8.1.0(postcss@8.4.39)(typescript@5.5.3) @@ -73,9 +88,6 @@ importers: '@nolebase/vitepress-plugin-enhanced-readabilities': specifier: ^2.2.1 version: 2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3) - '@nolebase/vitepress-plugin-git-changelog': - specifier: ^2.2.2 - version: 2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3) '@nolebase/vitepress-plugin-highlight-targeted-heading': specifier: ^2.2.1 version: 2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3) @@ -802,9 +814,6 @@ packages: '@nolebase/vitepress-plugin-enhanced-readabilities@2.2.2': resolution: {integrity: sha512-ipitBEN14t9/FNDdmJMZZnEu7f/yKZNAEOcw3tXv08qP1rzqaPoHfx0Z1RISysCJ10V5JRxTqu402Oer8K2Atw==} - '@nolebase/vitepress-plugin-git-changelog@2.2.2': - resolution: {integrity: sha512-Zv3H5huJdfoEmwAZnkIe7DnXtIL9cPWATmi+RYNc9wBrD50i9xdaJQZ/U72ZiwUd1rRCEMLREIqPyLvLHzRdSQ==} - '@nolebase/vitepress-plugin-highlight-targeted-heading@2.2.2': resolution: {integrity: sha512-QS6YB9S16JlXs7gERzxxK9rhbLZcp2SQPlQvAcyqXiAZ+FUkaeVe/uNPMpSIu7+CQsfpu0H/ZKkbCi9AwJplHw==} @@ -956,6 +965,9 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@shikijs/core@1.10.3': resolution: {integrity: sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==} @@ -975,6 +987,10 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + '@stylistic/eslint-plugin-js@2.6.0-beta.0': resolution: {integrity: sha512-KQiNvzNzvl9AmMs1MiIBszLIy/Xy1bTExnyaVy5dSzOF9c+yT64JQfH0p0jP6XpGwoCnZsrPUNflwP30G42QBQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1032,6 +1048,9 @@ packages: '@types/markdown-it@14.1.1': resolution: {integrity: sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==} + '@types/md5@2.3.5': + resolution: {integrity: sha512-/i42wjYNgE6wf0j2bcTX6kuowmdL/6PE4IVitMpm2eYKBUuYCprdcWVK+xEF0gcV6ufMCRhtxmReGfc6hIK7Jw==} + '@types/mdast@3.0.15': resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} @@ -1485,9 +1504,6 @@ packages: resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} engines: {node: '>=14'} - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1619,6 +1635,9 @@ packages: character-reference-invalid@1.1.4: resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + charenc@0.0.2: + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} @@ -1645,14 +1664,6 @@ packages: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} - cli-cursor@4.0.0: - resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} - cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1728,6 +1739,9 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + crypt@0.0.2: + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + css-declaration-sorter@7.2.0: resolution: {integrity: sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==} engines: {node: ^14 || ^16 || >=18} @@ -1779,9 +1793,6 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - date-fns@3.6.0: - resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} - de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} @@ -1871,9 +1882,6 @@ packages: electron-to-chromium@1.4.827: resolution: {integrity: sha512-VY+J0e4SFcNfQy19MEoMdaIcZLmDCprqvBtkii1WTCTQHpRvf5N8+3kTYCgL/PcntvwQvmMJWTuDPsq+IlhWKQ==} - emoji-regex@10.3.0: - resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} - emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2102,6 +2110,10 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + esno@4.7.0: + resolution: {integrity: sha512-81owrjxIxOwqcABt20U09Wn8lpBo9K6ttqbGvQcB3VYNLJyaV1fvKkDtpZd3Rj5BX3WXiGiJCjUevKQGNICzJg==} + hasBin: true + espree@10.1.0: resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2110,11 +2122,6 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} @@ -2145,9 +2152,9 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - extend-shallow@2.0.1: - resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} - engines: {node: '>=0.10.0'} + execa@9.3.0: + resolution: {integrity: sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg==} + engines: {node: ^18.19.0 || >=20.5.0} fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2165,6 +2172,10 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -2238,10 +2249,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.2.0: - resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} - engines: {node: '>=18'} - get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -2253,6 +2260,10 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} @@ -2315,10 +2326,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - gray-matter@4.0.3: - resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} - engines: {node: '>=6.0'} - gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -2357,6 +2364,10 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + human-signals@7.0.0: + resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==} + engines: {node: '>=18.18.0'} + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -2402,6 +2413,9 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} + is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} @@ -2413,10 +2427,6 @@ packages: is-decimal@1.0.4: resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} - is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -2432,10 +2442,6 @@ packages: is-hexadecimal@1.0.4: resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} - is-interactive@2.0.0: - resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} - engines: {node: '>=12'} - is-module@1.0.0: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} @@ -2447,6 +2453,10 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} @@ -2458,9 +2468,9 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-unicode-supported@1.3.0: - resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} - engines: {node: '>=12'} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} is-unicode-supported@2.0.0: resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} @@ -2496,10 +2506,6 @@ packages: js-utils-es@1.0.7: resolution: {integrity: sha512-9zMeLfNy82KXlIJZV4ONTL42BfYby83CywV7BILlQ05ktkc3LWfxK+W/FqiPsN+pT9rT1OKE/b+z9xMCzMesWw==} - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -2549,10 +2555,6 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -2611,10 +2613,6 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - log-symbols@6.0.0: - resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} - engines: {node: '>=18'} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -2647,6 +2645,9 @@ packages: markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} + md5@2.3.0: + resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} + mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} @@ -2939,10 +2940,6 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@8.0.1: - resolution: {integrity: sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ==} - engines: {node: '>=18'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -2997,6 +2994,10 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + parse-node-version@1.0.1: resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} engines: {node: '>= 0.10'} @@ -3285,6 +3286,10 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-ms@9.0.0: + resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} + engines: {node: '>=18'} + prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -3352,10 +3357,6 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true - restore-cursor@4.0.0: - resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -3399,10 +3400,6 @@ packages: search-insights@2.15.0: resolution: {integrity: sha512-ch2sPCUDD4sbPQdknVl9ALSi9H7VyoeVbsxznYz6QV55jJ8CI3EtwpO1i84keN4+hF5IeHWIeGvc08530JkVXQ==} - section-matter@1.0.0: - resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} - engines: {node: '>=4'} - semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -3493,9 +3490,6 @@ packages: resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} engines: {node: '>=0.10.0'} - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - stable-hash@0.0.4: resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} @@ -3505,10 +3499,6 @@ packages: std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} - stdin-discarder@0.2.2: - resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} - engines: {node: '>=18'} - string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -3521,10 +3511,6 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} - string-width@7.2.0: - resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} - engines: {node: '>=18'} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -3533,10 +3519,6 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom-string@1.0.0: - resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} - engines: {node: '>=0.10.0'} - strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -3545,6 +3527,10 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -3705,6 +3691,11 @@ packages: typescript: optional: true + tsx@4.16.2: + resolution: {integrity: sha512-C1uWweJDgdtX2x600HjaFaucXTilT7tgUZHbOE4+ypskZ1OP8CRCSDkCxG6Vya9EwaFIVagWwpaVAn5wzypaqQ==} + engines: {node: '>=18.0.0'} + hasBin: true + twoslash-protocol@0.2.9: resolution: {integrity: sha512-uKQl8UboT6JU4VAtYaSI3DbNtgaNhFaTpCSMy/n3tRl5lMlMhrjiuNKdqx15xjcviconuGJ9oObkz1h9zJFrJg==} @@ -3753,9 +3744,6 @@ packages: unconfig@0.3.13: resolution: {integrity: sha512-N9Ph5NC4+sqtcOjPfHrRcHekBCadCXWTBzp2VYYbySOHW0PfD9XLCeXshTXjkPYwLrBr9AtSeU0CZmkYECJhng==} - uncrypto@0.1.3: - resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} - undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -4029,6 +4017,10 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} + yoctocolors@2.1.1: + resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} + engines: {node: '>=18'} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -4840,48 +4832,6 @@ snapshots: - typescript - universal-cookie - '@nolebase/vitepress-plugin-git-changelog@2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3)': - dependencies: - '@iconify-json/octicon': 1.1.56 - '@nolebase/ui': 2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3) - colorette: 2.0.20 - date-fns: 3.6.0 - defu: 6.1.4 - execa: 8.0.1 - globby: 14.0.2 - gray-matter: 4.0.3 - less: 4.2.0 - ora: 8.0.1 - uncrypto: 0.1.3 - vitepress: 1.3.1(@algolia/client-search@4.24.0)(@types/node@18.19.39)(less@4.2.0)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3) - transitivePeerDependencies: - - '@algolia/client-search' - - '@types/node' - - '@types/react' - - '@vue/composition-api' - - async-validator - - axios - - change-case - - drauu - - fuse.js - - idb-keyval - - jwt-decode - - lightningcss - - markdown-it-mathjax3 - - nprogress - - postcss - - qrcode - - react - - react-dom - - sass - - search-insights - - sortablejs - - stylus - - sugarss - - terser - - typescript - - universal-cookie - '@nolebase/vitepress-plugin-highlight-targeted-heading@2.2.2(@algolia/client-search@4.24.0)(@types/node@18.19.39)(postcss@8.4.39)(search-insights@2.15.0)(terser@5.31.2)(typescript@5.5.3)': dependencies: less: 4.2.0 @@ -5028,6 +4978,8 @@ snapshots: '@rtsao/scc@1.1.0': {} + '@sec-ant/readable-stream@0.4.1': {} + '@shikijs/core@1.10.3': dependencies: '@types/hast': 3.0.4 @@ -5064,6 +5016,8 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} + '@sindresorhus/merge-streams@4.0.0': {} + '@stylistic/eslint-plugin-js@2.6.0-beta.0(eslint@9.7.0)': dependencies: '@types/eslint': 8.56.10 @@ -5139,6 +5093,8 @@ snapshots: '@types/linkify-it': 5.0.0 '@types/mdurl': 2.0.0 + '@types/md5@2.3.5': {} + '@types/mdast@3.0.15': dependencies: '@types/unist': 2.0.10 @@ -5770,10 +5726,6 @@ snapshots: are-docs-informative@0.0.2: {} - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - argparse@2.0.1: {} array-union@2.1.0: {} @@ -5916,6 +5868,8 @@ snapshots: character-reference-invalid@1.1.4: {} + charenc@0.0.2: {} + check-error@1.0.3: dependencies: get-func-name: 2.0.2 @@ -5946,12 +5900,6 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - cli-cursor@4.0.0: - dependencies: - restore-cursor: 4.0.0 - - cli-spinners@2.9.2: {} - cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -6015,6 +5963,8 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crypt@0.0.2: {} + css-declaration-sorter@7.2.0(postcss@8.4.39): dependencies: postcss: 8.4.39 @@ -6091,8 +6041,6 @@ snapshots: csstype@3.1.3: {} - date-fns@3.6.0: {} - de-indent@1.0.2: {} debug@3.2.7: @@ -6163,8 +6111,6 @@ snapshots: electron-to-chromium@1.4.827: {} - emoji-regex@10.3.0: {} - emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -6520,6 +6466,10 @@ snapshots: transitivePeerDependencies: - supports-color + esno@4.7.0: + dependencies: + tsx: 4.16.2 + espree@10.1.0: dependencies: acorn: 8.12.1 @@ -6532,8 +6482,6 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 - esprima@4.0.1: {} - esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -6576,9 +6524,20 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - extend-shallow@2.0.1: + execa@9.3.0: dependencies: - is-extendable: 0.1.1 + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.3 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 7.0.0 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 5.3.0 + pretty-ms: 9.0.0 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.1 fast-deep-equal@3.1.3: {} @@ -6598,6 +6557,10 @@ snapshots: dependencies: reusify: 1.0.4 + figures@6.1.0: + dependencies: + is-unicode-supported: 2.0.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -6667,14 +6630,17 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.2.0: {} - get-func-name@2.0.2: {} get-stream@6.0.1: {} get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + get-tsconfig@4.7.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -6764,13 +6730,6 @@ snapshots: graphemer@1.4.0: {} - gray-matter@4.0.3: - dependencies: - js-yaml: 3.14.1 - kind-of: 6.0.3 - section-matter: 1.0.0 - strip-bom-string: 1.0.0 - gzip-size@6.0.0: dependencies: duplexer: 0.1.2 @@ -6795,6 +6754,8 @@ snapshots: human-signals@5.0.0: {} + human-signals@7.0.0: {} + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -6834,6 +6795,8 @@ snapshots: dependencies: binary-extensions: 2.3.0 + is-buffer@1.1.6: {} + is-builtin-module@3.2.1: dependencies: builtin-modules: 3.3.0 @@ -6844,8 +6807,6 @@ snapshots: is-decimal@1.0.4: {} - is-extendable@0.1.1: {} - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -6856,14 +6817,14 @@ snapshots: is-hexadecimal@1.0.4: {} - is-interactive@2.0.0: {} - is-module@1.0.0: {} is-number@7.0.0: {} is-path-inside@3.0.3: {} + is-plain-obj@4.1.0: {} + is-reference@1.2.1: dependencies: '@types/estree': 1.0.5 @@ -6872,7 +6833,7 @@ snapshots: is-stream@3.0.0: {} - is-unicode-supported@1.3.0: {} + is-stream@4.0.1: {} is-unicode-supported@2.0.0: {} @@ -6898,11 +6859,6 @@ snapshots: js-utils-es@1.0.7: {} - js-yaml@3.14.1: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - js-yaml@4.1.0: dependencies: argparse: 2.0.1 @@ -6942,8 +6898,6 @@ snapshots: dependencies: json-buffer: 3.0.1 - kind-of@6.0.3: {} - kleur@3.0.3: {} kolorist@1.8.0: {} @@ -7000,11 +6954,6 @@ snapshots: lodash@4.17.21: {} - log-symbols@6.0.0: - dependencies: - chalk: 5.3.0 - is-unicode-supported: 1.3.0 - longest-streak@3.1.0: {} loupe@2.3.7: @@ -7039,6 +6988,12 @@ snapshots: markdown-table@3.0.3: {} + md5@2.3.0: + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: 1.1.6 + mdast-util-find-and-replace@3.0.1: dependencies: '@types/mdast': 4.0.4 @@ -7479,18 +7434,6 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@8.0.1: - dependencies: - chalk: 5.3.0 - cli-cursor: 4.0.0 - cli-spinners: 2.9.2 - is-interactive: 2.0.0 - is-unicode-supported: 2.0.0 - log-symbols: 6.0.0 - stdin-discarder: 0.2.2 - string-width: 7.2.0 - strip-ansi: 7.1.0 - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -7550,6 +7493,8 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + parse-ms@4.0.0: {} + parse-node-version@1.0.1: {} path-browserify@1.0.1: {} @@ -7788,6 +7733,10 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.3.1 + pretty-ms@9.0.0: + dependencies: + parse-ms: 4.0.0 + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -7853,11 +7802,6 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - restore-cursor@4.0.0: - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - reusify@1.0.4: {} rfdc@1.4.1: {} @@ -7916,11 +7860,6 @@ snapshots: search-insights@2.15.0: {} - section-matter@1.0.0: - dependencies: - extend-shallow: 2.0.1 - kind-of: 6.0.3 - semver@5.7.2: {} semver@6.3.1: {} @@ -7996,16 +7935,12 @@ snapshots: speakingurl@14.0.1: {} - sprintf-js@1.0.3: {} - stable-hash@0.0.4: {} stackback@0.0.2: {} std-env@3.7.0: {} - stdin-discarder@0.2.2: {} - string-argv@0.3.2: {} string-width@4.2.3: @@ -8020,12 +7955,6 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 - string-width@7.2.0: - dependencies: - emoji-regex: 10.3.0 - get-east-asian-width: 1.2.0 - strip-ansi: 7.1.0 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -8034,12 +7963,12 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-bom-string@1.0.0: {} - strip-final-newline@2.0.0: {} strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -8195,6 +8124,13 @@ snapshots: - supports-color - ts-node + tsx@4.16.2: + dependencies: + esbuild: 0.21.5 + get-tsconfig: 4.7.5 + optionalDependencies: + fsevents: 2.3.3 + twoslash-protocol@0.2.9: {} twoslash-vue@0.2.9(typescript@5.5.3): @@ -8268,8 +8204,6 @@ snapshots: defu: 6.1.4 jiti: 1.21.6 - uncrypto@0.1.3: {} - undici-types@5.26.5: {} unicorn-magic@0.1.0: {} @@ -8632,4 +8566,6 @@ snapshots: yocto-queue@1.1.1: {} + yoctocolors@2.1.1: {} + zwitch@2.0.4: {} diff --git a/scripts/changeLog.json b/scripts/changeLog.json new file mode 100644 index 0000000..62ac050 --- /dev/null +++ b/scripts/changeLog.json @@ -0,0 +1,45 @@ +[ + { + "hash": "b46fd189054ce51423c4a64be7d18178faa97404", + "date": "Tue Jul 16 01:24:15 2024 +0700", + "message": "chore: release v1.0.7", + "refs": "tag: v1.0.7", + "body": "", + "author_name": "hunghg255", + "author_email": "giahunghust@gmail.com", + "version": "v1.0.7" + }, + { + "hash": "45d9826f1e6d21e6bea36b94cf5b1a724993f8c4", + "date": "Tue Jul 16 01:08:08 2024 +0700", + "message": "chore: release v1.0.6", + "refs": "tag: v1.0.6", + "body": "", + "author_name": "hunghg255", + "author_email": "giahunghust@gmail.com", + "version": "v1.0.6" + }, + { + "hash": "a7c518171a70ba81224735117856db639ff1cd6b", + "date": "Tue Jul 16 00:58:08 2024 +0700", + "message": "feat: add pChain", + "refs": "", + "author_name": "hunghg255", + "author_email": "giahunghust@gmail.com", + "functions": [ + "pChain" + ] + }, + { + "hash": "493feda33e3b935c6aa5d94d24068a4f7825413c", + "date": "Mon Jul 15 16:03:59 2024 +0700", + "message": "docs: update", + "refs": "", + "author_name": "hunghg255", + "author_email": "giahunghust@gmail.com", + "functions": [ + "chunk", + "snakeCase" + ] + } +] \ No newline at end of file diff --git a/scripts/changelog.ts b/scripts/changelog.ts new file mode 100644 index 0000000..e9b1377 --- /dev/null +++ b/scripts/changelog.ts @@ -0,0 +1,132 @@ +import fs from 'node:fs'; +import md5 from 'md5'; +import funcUtils from './funcUtils.json'; + +export interface CommitInfo { + functions: string[] + version?: string + hash: string + date: string + message: string + refs?: string + body?: string + author_name: string + author_email: string +} + +export interface ContributorInfo { + name: string + count: number + hash: string +} + +export function uniq(a: T) { + return Array.from(new Set(a)) +} + +async function execCommand(cmd: string, args: string[]) { + const { execa } = await import('execa') + const res = await execa(cmd, args) + return res.stdout.trim() +} + +let cache: CommitInfo[] | undefined + +export async function getChangeLog(count = 200) { + if (cache) + return cache + const r = (await execCommand('git', ['log', '-n', `${count}`, `--pretty=format:%H|%ad|%s|%D|%b|%an|%ae`])).split('\n').map((v) => { + const [hash, date, message, refs, body, author_name, author_email] = v.split('|'); + return { + hash, + date, + message, + refs, + body, + author_name, + author_email, + } + }); + + const logs = r.filter((i) => { + return i.message.includes('chore: release') + || i.message.includes('!') + || i.message.startsWith('feat') + || i.message.startsWith('fix') + || i.message.startsWith('docs') + }) as CommitInfo[] + + for (const log of logs) { + if (log.message.includes('chore: release')) { + log.version = log.message.split(' ')[2].trim() + continue + } + const raw = await execCommand('git', ['diff-tree', '--no-commit-id', '--name-only', '-r', log.hash]) + + delete log.body + const files = raw.replace(/\\/g, '/').trim().split('\n') + + log.functions = uniq( + files + .map((i) => { + return /^src\/.*(? { + const name = v.split('/').pop()!.replace('.ts', '') + return name; + }), + ) + } + + const result = logs.filter(i => i.functions?.length || i.version) + cache = result + + return result +} + +export async function getContributorsAt(path: string) { + try { + const list = (await execCommand('git', ['log', '--pretty=format:%an|%ae', '--', path])).split('\n') + .map(i => i.split('|') as [string, string]); + + const map: Record = {}; + + list + .filter(i => i[1]) + .forEach((i) => { + if (!map[i[1]]) { + map[i[1]] = { + name: i[0], + count: 0, + hash: md5(i[1]), + } + } + map[i[1]].count++ + }) + + return Object.values(map).sort((a, b) => b.count - a.count) + } + catch (e) { + console.error(e) + return [] + } +} + +export async function getFunctionContributors() { + const result = await Promise.all(funcUtils.map(async (i) => { + return [i.name, await getContributorsAt(`src/${i.package}/${i.name}`)] as const + })) + + return Object.fromEntries(result) +} + +(async () => { + const [changeLog, contributions] = await Promise.all([ + getChangeLog(100), + getFunctionContributors(), + ]); + + fs.writeFileSync('./scripts/changeLog.json', JSON.stringify(changeLog, null, 2)); + fs.writeFileSync('./scripts/contributions.json', JSON.stringify(contributions, null, 2)); +})() diff --git a/scripts/contributions.json b/scripts/contributions.json new file mode 100644 index 0000000..5fcb684 --- /dev/null +++ b/scripts/contributions.json @@ -0,0 +1,611 @@ +{ + "AbortError.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "chunk.ts": [ + { + "name": "hunghg255", + "count": 2, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "compact.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "countBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "difference.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "differenceBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "differenceWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "drop.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "dropRight.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "dropRightWhile.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "dropWhile.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "fill.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "flatten.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "flattenDeep.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "forEachRight.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "groupBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "head.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "initial.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "intersection.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "intersectionBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "intersectionWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "keyBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "last.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "maxBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "minBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "orderBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "partition.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "sample.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "sampleSize.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "shuffle.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "tail.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "take.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "takeRight.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "takeRightWhile.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "takeWhile.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "toFilled.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "union.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "unionBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "unionWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "uniq.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "uniqBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "uniqWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "unzip.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "unzipWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "without.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "xor.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "xorBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "xorWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "zip.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "zipObject.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "zipWith.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "debounce.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "negate.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "noop.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "once.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "throttle.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "clamp.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "inRange.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "lerp.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "mean.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "meanBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "random.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "randomInt.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "range.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "remap.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "round.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "sum.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "sumBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "isEqual.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "isNil.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "isNotNil.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "isNull.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "isUndefined.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "clone.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "invert.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "omit.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "omitBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "pick.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "pickBy.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "delay.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "pChain.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "camelCase.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "capitalize.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "kebabCase.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "lowerCase.ts": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "snakeCase.ts": [ + { + "name": "hunghg255", + "count": 2, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ], + "array": [ + { + "name": "hunghg255", + "count": 1, + "hash": "3732f6a5b9cdd33a2f401844e7daf029" + } + ] +} \ No newline at end of file diff --git a/scripts/funcUtils.json b/scripts/funcUtils.json new file mode 100644 index 0000000..e249eb5 --- /dev/null +++ b/scripts/funcUtils.json @@ -0,0 +1,611 @@ +[ + { + "name": "AbortError.ts", + "package": "error", + "alias": [ + "AbortError" + ] + }, + { + "name": "chunk.ts", + "package": "array", + "alias": [ + "chunk" + ] + }, + { + "name": "compact.ts", + "package": "array", + "alias": [ + "compact" + ] + }, + { + "name": "countBy.ts", + "package": "array", + "alias": [ + "countBy" + ] + }, + { + "name": "difference.ts", + "package": "array", + "alias": [ + "difference" + ] + }, + { + "name": "differenceBy.ts", + "package": "array", + "alias": [ + "differenceBy" + ] + }, + { + "name": "differenceWith.ts", + "package": "array", + "alias": [ + "differenceWith" + ] + }, + { + "name": "drop.ts", + "package": "array", + "alias": [ + "drop" + ] + }, + { + "name": "dropRight.ts", + "package": "array", + "alias": [ + "dropRight" + ] + }, + { + "name": "dropRightWhile.ts", + "package": "array", + "alias": [ + "dropRightWhile" + ] + }, + { + "name": "dropWhile.ts", + "package": "array", + "alias": [ + "dropWhile" + ] + }, + { + "name": "fill.ts", + "package": "array", + "alias": [ + "fill" + ] + }, + { + "name": "flatten.ts", + "package": "array", + "alias": [ + "flatten" + ] + }, + { + "name": "flattenDeep.ts", + "package": "array", + "alias": [ + "flattenDeep" + ] + }, + { + "name": "forEachRight.ts", + "package": "array", + "alias": [ + "forEachRight" + ] + }, + { + "name": "groupBy.ts", + "package": "array", + "alias": [ + "groupBy" + ] + }, + { + "name": "head.ts", + "package": "array", + "alias": [ + "head" + ] + }, + { + "name": "initial.ts", + "package": "array", + "alias": [ + "initial" + ] + }, + { + "name": "intersection.ts", + "package": "array", + "alias": [ + "intersection" + ] + }, + { + "name": "intersectionBy.ts", + "package": "array", + "alias": [ + "intersectionBy" + ] + }, + { + "name": "intersectionWith.ts", + "package": "array", + "alias": [ + "intersectionWith" + ] + }, + { + "name": "keyBy.ts", + "package": "array", + "alias": [ + "keyBy" + ] + }, + { + "name": "last.ts", + "package": "array", + "alias": [ + "last" + ] + }, + { + "name": "maxBy.ts", + "package": "array", + "alias": [ + "maxBy" + ] + }, + { + "name": "minBy.ts", + "package": "array", + "alias": [ + "minBy" + ] + }, + { + "name": "orderBy.ts", + "package": "array", + "alias": [ + "orderBy" + ] + }, + { + "name": "partition.ts", + "package": "array", + "alias": [ + "partition" + ] + }, + { + "name": "sample.ts", + "package": "array", + "alias": [ + "sample" + ] + }, + { + "name": "sampleSize.ts", + "package": "array", + "alias": [ + "sampleSize" + ] + }, + { + "name": "shuffle.ts", + "package": "array", + "alias": [ + "shuffle" + ] + }, + { + "name": "tail.ts", + "package": "array", + "alias": [ + "tail" + ] + }, + { + "name": "take.ts", + "package": "array", + "alias": [ + "take" + ] + }, + { + "name": "takeRight.ts", + "package": "array", + "alias": [ + "takeRight" + ] + }, + { + "name": "takeRightWhile.ts", + "package": "array", + "alias": [ + "takeRightWhile" + ] + }, + { + "name": "takeWhile.ts", + "package": "array", + "alias": [ + "takeWhile" + ] + }, + { + "name": "toFilled.ts", + "package": "array", + "alias": [ + "toFilled" + ] + }, + { + "name": "union.ts", + "package": "array", + "alias": [ + "union" + ] + }, + { + "name": "unionBy.ts", + "package": "array", + "alias": [ + "unionBy" + ] + }, + { + "name": "unionWith.ts", + "package": "array", + "alias": [ + "unionWith" + ] + }, + { + "name": "uniq.ts", + "package": "array", + "alias": [ + "uniq" + ] + }, + { + "name": "uniqBy.ts", + "package": "array", + "alias": [ + "uniqBy" + ] + }, + { + "name": "uniqWith.ts", + "package": "array", + "alias": [ + "uniqWith" + ] + }, + { + "name": "unzip.ts", + "package": "array", + "alias": [ + "unzip" + ] + }, + { + "name": "unzipWith.ts", + "package": "array", + "alias": [ + "unzipWith" + ] + }, + { + "name": "without.ts", + "package": "array", + "alias": [ + "without" + ] + }, + { + "name": "xor.ts", + "package": "array", + "alias": [ + "xor" + ] + }, + { + "name": "xorBy.ts", + "package": "array", + "alias": [ + "xorBy" + ] + }, + { + "name": "xorWith.ts", + "package": "array", + "alias": [ + "xorWith" + ] + }, + { + "name": "zip.ts", + "package": "array", + "alias": [ + "zip" + ] + }, + { + "name": "zipObject.ts", + "package": "array", + "alias": [ + "zipObject" + ] + }, + { + "name": "zipWith.ts", + "package": "array", + "alias": [ + "zipWith" + ] + }, + { + "name": "debounce.ts", + "package": "function", + "alias": [ + "debounce" + ] + }, + { + "name": "negate.ts", + "package": "function", + "alias": [ + "negate" + ] + }, + { + "name": "noop.ts", + "package": "function", + "alias": [ + "noop" + ] + }, + { + "name": "once.ts", + "package": "function", + "alias": [ + "once" + ] + }, + { + "name": "throttle.ts", + "package": "function", + "alias": [ + "throttle" + ] + }, + { + "name": "clamp.ts", + "package": "math", + "alias": [ + "clamp" + ] + }, + { + "name": "inRange.ts", + "package": "math", + "alias": [ + "inRange" + ] + }, + { + "name": "lerp.ts", + "package": "math", + "alias": [ + "lerp" + ] + }, + { + "name": "mean.ts", + "package": "math", + "alias": [ + "mean" + ] + }, + { + "name": "meanBy.ts", + "package": "math", + "alias": [ + "meanBy" + ] + }, + { + "name": "random.ts", + "package": "math", + "alias": [ + "random" + ] + }, + { + "name": "randomInt.ts", + "package": "math", + "alias": [ + "randomInt" + ] + }, + { + "name": "range.ts", + "package": "math", + "alias": [ + "range" + ] + }, + { + "name": "remap.ts", + "package": "math", + "alias": [ + "remap" + ] + }, + { + "name": "round.ts", + "package": "math", + "alias": [ + "round" + ] + }, + { + "name": "sum.ts", + "package": "math", + "alias": [ + "sum" + ] + }, + { + "name": "sumBy.ts", + "package": "math", + "alias": [ + "sumBy" + ] + }, + { + "name": "isEqual.ts", + "package": "predicate", + "alias": [ + "isEqual" + ] + }, + { + "name": "isNil.ts", + "package": "predicate", + "alias": [ + "isNil" + ] + }, + { + "name": "isNotNil.ts", + "package": "predicate", + "alias": [ + "isNotNil" + ] + }, + { + "name": "isNull.ts", + "package": "predicate", + "alias": [ + "isNull" + ] + }, + { + "name": "isUndefined.ts", + "package": "predicate", + "alias": [ + "isUndefined" + ] + }, + { + "name": "clone.ts", + "package": "object", + "alias": [ + "clone" + ] + }, + { + "name": "invert.ts", + "package": "object", + "alias": [ + "invert" + ] + }, + { + "name": "omit.ts", + "package": "object", + "alias": [ + "omit" + ] + }, + { + "name": "omitBy.ts", + "package": "object", + "alias": [ + "omitBy" + ] + }, + { + "name": "pick.ts", + "package": "object", + "alias": [ + "pick" + ] + }, + { + "name": "pickBy.ts", + "package": "object", + "alias": [ + "pickBy" + ] + }, + { + "name": "delay.ts", + "package": "promise", + "alias": [ + "delay" + ] + }, + { + "name": "pChain.ts", + "package": "promise", + "alias": [ + "pChain" + ] + }, + { + "name": "camelCase.ts", + "package": "string", + "alias": [ + "camelCase" + ] + }, + { + "name": "capitalize.ts", + "package": "string", + "alias": [ + "capitalize" + ] + }, + { + "name": "kebabCase.ts", + "package": "string", + "alias": [ + "kebabCase" + ] + }, + { + "name": "lowerCase.ts", + "package": "string", + "alias": [ + "lowerCase" + ] + }, + { + "name": "snakeCase.ts", + "package": "string", + "alias": [ + "snakeCase" + ] + }, + { + "name": "array", + "package": "compat", + "alias": [ + "array" + ] + } +] \ No newline at end of file diff --git a/scripts/genFuncUtils.ts b/scripts/genFuncUtils.ts new file mode 100644 index 0000000..3fb40cf --- /dev/null +++ b/scripts/genFuncUtils.ts @@ -0,0 +1,32 @@ +import fs from 'node:fs'; +import { globby } from 'globby'; +// export const funcUtils = [ +// { +// name: 'chunk.ts', +// package: 'array', +// alias: ['chunk'], +// }, +// { +// name: 'pChain.ts', +// package: 'promise', +// alias: ['pChain'], +// }, +// ] + +(async () => { + const files = await globby('src/**/*.ts', { + ignore: ['src/index.ts', 'src/**/*/index.ts', 'src/**/*.spec.ts', 'src/string/_internal/*.ts', 'src/compat/_internal/*.ts'], // Exclude .spec.ts files + }) + + const newFile = files.map((v: any) => { + const [, _name, i] = v.split('/'); + + return { + name: i, + package: _name, + alias: [i.replace('.ts', '')], + } + }); + + fs.writeFileSync('./scripts/funcUtils.json', JSON.stringify(newFile, null, 2)); +})()