diff --git a/.vscode/settings.json b/.vscode/settings.json index 828e76c..513ad14 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,11 @@ "source.fixAll.eslint": "explicit", "source.organizeImports": "never" }, + "eslint.options": { + "flags": [ + "unstable_ts_config" + ] + }, "eslint.rules.customizations": [ { "rule": "style/*", "severity": "off", "fixable": true }, diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index c807140..9b33241 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -3,7 +3,7 @@ import { transformerTwoslash } from '@shikijs/vitepress-twoslash' import { withPwa } from '@vite-pwa/vitepress' import { defineConfig } from 'vitepress' -import viteConfig from './vite.config' +import vite from './vite.config' // https://vitepress.dev/reference/site-config @@ -112,7 +112,7 @@ export default withPwa( footer: { message: 'Released under the MIT License.', - copyright: 'Copyright © 2024-present Stacks.js, Inc.', + copyright: 'Copyright © 2025-present Stacks.js, Inc.', }, socialLinks: [ @@ -147,6 +147,6 @@ export default withPwa( ], }, - vite: viteConfig, + vite, }), ) diff --git a/docs/config.md b/docs/config.md index 257c44e..94ae582 100644 --- a/docs/config.md +++ b/docs/config.md @@ -28,10 +28,10 @@ const options: DtsGenerationOptions = { /** * The entry points for generating the declaration files. * Supports glob patterns for flexible selection. - * @default ['**/*.ts'] + * @default ['**\/*.ts'] * @type {string[]} * @example - * entrypoints: ['**/*.ts'] + * entrypoints: ['**\/*.ts'] */ entrypoints: ['**/*.ts'], @@ -71,7 +71,7 @@ const options: DtsGenerationOptions = { // * keepComments: true // */ // keepComments: true, // coming soon -}; +} export default options ``` diff --git a/docs/sponsors.md b/docs/sponsors.md index f30e981..87ed4b9 100644 --- a/docs/sponsors.md +++ b/docs/sponsors.md @@ -35,60 +35,60 @@ You can also try to convince your employer to sponsor Stacks as a business. This ___ - **Diamond (USD$2,500/mo):** - - Prominent logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Prominent logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - Prominent logo placement in sidebar of all content pages. - - Prominent logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Prominent logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ___ - **Platinum (USD$1,000/mo):** - - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ___ - **Double Gold (USD$500/mo):** - - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ___ - **Gold (USD$250/mo):** - - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Large logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Large logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ___ - **Silver (USD$100/mo):** - - Medium logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - - Medium logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. - - Medium logo placement in the `BACKERS.md` file of>70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Medium logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Medium logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Medium logo placement in the `BACKERS.md` file of>70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ___ - **Bronze (50/mo):** - - Small logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). - - Small logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. - - Small logo placement in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Small logo placement on the front page of [stacksjs.org](https://stacksjs.org), [docs.stacksjs.org](https://docs.stacksjs.org), [tlsx.sh](https://tlsx.sh), [rpx](https://reverse-proxy.sh), [qrx](https://ts-quick-reaction.netlify.app), [dtsx](https://github.com/stacksjs/dtsx), [localtunnels](https://localtunnel.sh), [bunfig](https://bunfig.netlify.app/), [vite-plugin-local](https://vite-plugin-local.netlify.app/), [ts-collect](https://ts-collect.netlify.app/), [ts-spreadsheets](https://ts-spreadsheets.netlify.app/). + - Small logo placement in the README of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Small logo placement in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ---- +___ - **Generous Backer (USD$25/mo):** - Private Discord channel invite - Free Personal Account for Stacks Dashboard - Social media follow - - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others, above other individual backers. + - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others, above other individual backers. ---- +___ - **Sponsorware Tier (USD$10/mo):** - - Get access to all current sponsorware projects. - - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Get access to all current sponsorware projects *(i.e. the Stacks DynamoDB ORM driver)* + - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ---- +___ - **Individual Backer (USD$5/mo):** - - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. + - Name listed in the `BACKERS.md` file of >70x `stacksjs/core` repos, `stacksjs/stacks`, `tlsx`, `rpx`, `dtsx`, `qrx`, `localtunnels`, `bunfig`, `vite-plugin-local`, `ts-collect`, `ts-spreadsheets`, and few others. ## Current Sponsors @@ -126,6 +126,6 @@ ___ ___ -##### Thanks to Vue.js for the inspiration for this sponsorship page +##### Thanks to Vue.js for the inspiration of this sponsorship page *You can find their sponsorship page [here](https://vuejs.org/sponsor/).* diff --git a/package.json b/package.json index e48f58c..555575f 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/dtsx-windows-x64.exe", "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/dtsx-darwin-x64", "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/dtsx-darwin-arm64", - "lint": "bunx eslint .", - "lint:fix": "bunx eslint . --fix", + "lint": "bunx --bun eslint --flag unstable_ts_config .", + "lint:fix": "bunx --bun eslint --flag unstable_ts_config . --fix", "fresh": "bunx rimraf node_modules/ bun.lock && bun i", "changelog": "bunx changelogen --output CHANGELOG.md", "prepublishOnly": "bun --bun run build && bun run compile:all", @@ -78,7 +78,7 @@ "vitepress": "^1.5.0" }, "overrides": { - "unconfig": "0.6.0" + "unconfig": "0.3.10" }, "simple-git-hooks": { "pre-commit": "bunx lint-staged" diff --git a/src/extract.ts b/src/extract.ts index 84dea91..71cbde4 100644 --- a/src/extract.ts +++ b/src/extract.ts @@ -1078,6 +1078,7 @@ function inferConstType(value: string, state: ProcessingState): string { return value } +/* eslint-disable unused-imports/no-unused-vars */ function inferTypeFromDefaultValue(defaultValue: string): string { // Handle string literals if (/^['"`].*['"`]$/.test(defaultValue)) { @@ -1112,6 +1113,7 @@ function inferTypeFromDefaultValue(defaultValue: string): string { return 'unknown' } +/* eslint-enable unused-imports/no-unused-vars */ /** * Check if a line is a JSDoc comment @@ -2268,7 +2270,7 @@ function formatObjectType(type: string): string { return `{ ${properties} }` } - +/* eslint-disable unused-imports/no-unused-vars */ function formatObjectParams(objectType: string): string { const lines = objectType .slice(1, -1) // Remove outer braces @@ -2283,6 +2285,7 @@ function formatObjectParams(objectType: string): string { ${lines.join('\n ')} }` } +/* eslint-enable unused-imports/no-unused-vars */ function getCleanDeclaration(declaration: string): string { // Remove leading comments while preserving the structure