@kasoa/vite-plus-config 0.0.18 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,10 +7,10 @@ Kasoa's shared Vite+ presets for formatting, linting, and type checking.
7
7
  Install Vite+ and the shared config:
8
8
 
9
9
  ```bash
10
- pnpm add -D @kasoa/vite-plus-config vite-plus
10
+ pnpm add -D @kasoa/vite-plus-config vite-plus typescript@^7
11
11
  ```
12
12
 
13
- **Note**: Requires Node.js >=24 and TypeScript-first projects.
13
+ **Note**: Requires Node.js >=24 and TypeScript-first projects. Use the stable `typescript` package; Vite+'s native type-checking path does not require `@typescript/native-preview` or a separate `tsgo` command.
14
14
 
15
15
  ## Usage
16
16
 
@@ -79,10 +79,10 @@ export default createConfig({
79
79
 
80
80
  ## Cloudflare Workers Tests
81
81
 
82
- For Worker projects, the package ships a Cloudflare Worker preset that combines the node preset, `cloudflare()`, and `cloudflareTest()` in a single `vite.config.ts`, using a default root `wrangler.jsonc`.
82
+ The `cloudflare-workers` preset combines the Node.js preset with `cloudflareTest()` and reads `wrangler.jsonc` from the project root by default. Vite+ provides Vitest; import test APIs from `vite-plus/test`.
83
83
 
84
84
  ```bash
85
- pnpm add -D @cloudflare/vite-plugin @cloudflare/vitest-pool-workers vitest@npm:@voidzero-dev/vite-plus-test@latest wrangler
85
+ pnpm add -D @cloudflare/vitest-pool-workers wrangler
86
86
  ```
87
87
 
88
88
  ```ts
@@ -102,44 +102,35 @@ export default createConfig({
102
102
  });
103
103
  ```
104
104
 
105
- Project-specific migrations, bindings, coverage, setup files, and `test.provide` values should stay in the consuming project.
106
-
107
- ## Recommended Workflow
108
-
109
- For Vite+-first apps and packages, prefer a simple repo-native check workflow:
105
+ Use Wrangler for backend Worker development, builds, type generation, remote development, and deployment. Use Vite+ for checks and Worker tests:
110
106
 
111
107
  ```json
112
108
  {
113
109
  "scripts": {
110
+ "dev": "wrangler dev",
111
+ "build": "wrangler deploy --dry-run",
114
112
  "check": "vp check",
115
- "check:fix": "vp check --fix"
113
+ "test": "vp test"
116
114
  }
117
115
  }
118
116
  ```
119
117
 
120
- Use `vp check` as the default static check command.
121
-
122
- It already covers:
118
+ Keep project-specific migrations, bindings, coverage, setup files, and `test.provide` values in the consuming project. Vite-owned frontend and full-stack applications should configure `@cloudflare/vite-plugin` with their project-specific plugins.
123
119
 
124
- - formatting
125
- - linting
126
- - type checking
127
-
128
- Type checking is included in that workflow. The shared lint config enables Vite+'s type-aware and type-check modes by default, so most projects using this package do not need a separate raw `tsc` step for the standard check flow.
129
-
130
- Use `vp check --fix` for autofixable formatting and linting issues.
131
-
132
- `vp check` also accepts file or path arguments:
120
+ ## Recommended Workflow
133
121
 
134
- ```bash
135
- vp check src/foo.ts src/bar.ts
122
+ ```json
123
+ {
124
+ "scripts": {
125
+ "check": "vp check",
126
+ "check:fix": "vp check --fix"
127
+ }
128
+ }
136
129
  ```
137
130
 
138
- These narrower runs are useful during focused edits. For final validation, prefer the normal whole-project `vp check` flow.
139
-
140
- Use `vp config` if you want commit hooks generated from the shared `staged` rules.
131
+ `vp check` formats, lints, and type-checks the project. Use `vp check --fix` for automatic fixes, path arguments for focused checks, and the full command for final verification.
141
132
 
142
- Use one `vite.config.ts` by default, then keep separate config files only when a project genuinely needs them.
133
+ Use `vp config` to generate commit hooks from the shared `staged` rules. Keep one `vite.config.ts` unless the project needs separate configurations.
143
134
 
144
135
  ## Configurations
145
136
 
@@ -148,7 +139,7 @@ Use one `vite.config.ts` by default, then keep separate config files only when a
148
139
  - **`node`**: `base` plus Node-oriented lint rules.
149
140
  - **`library`**: `base` plus ESM-only packaging defaults for `vp pack`.
150
141
  - **`monorepo`**: `base` plus root-only `run` defaults for workspace caching.
151
- - **`cloudflare-workers`**: `node` plus Cloudflare Worker dev and test wiring.
142
+ - **`cloudflare-workers`**: `node` plus Cloudflare Worker test wiring.
152
143
 
153
144
  ## Author
154
145
 
@@ -270,4 +270,4 @@ function createBaseConfig(overrides = {}) {
270
270
  //#endregion
271
271
  export { DEFAULT_WRANGLER_CONFIG_PATH as a, reactFmt as i, reactLint as n, createDefinedConfig as o, serverLint as r, mergeConfigFragments as s, createBaseConfig as t };
272
272
 
273
- //# sourceMappingURL=base-tA8JSy86.mjs.map
273
+ //# sourceMappingURL=base-ICoOIzvp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-tA8JSy86.mjs","names":[],"sources":["../src/shared/config.ts","../src/shared/constants.ts","../src/shared/fmt.ts","../src/shared/lint.ts","../src/base/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig, mergeConfig } from \"vite-plus\";\n\nexport type PluginInput = object | readonly object[] | false | null | undefined;\n\nexport type ConfigInput = Omit<UserConfig, \"plugins\"> & {\n /**\n * Vite plugins to merge into the config.\n *\n * This is intentionally typed structurally instead of as Vite's recursive\n * PluginOption type. Vite 8 plugin types from different Vite entrypoints can\n * trigger excessive stack-depth comparisons before the config reaches Vite.\n */\n readonly plugins?: readonly PluginInput[];\n};\n\nfunction toUserConfig(config: ConfigInput): UserConfig {\n // eslint-disable-next-line typescript/no-unsafe-type-assertion -- ConfigInput preserves UserConfig autocomplete but keeps plugin assignability shallow at our public boundary.\n return config as UserConfig;\n}\n\nexport function mergeConfigFragments(base: ConfigInput, ...overrides: ConfigInput[]): UserConfig {\n let result: UserConfig = {};\n result = mergeConfig<UserConfig, UserConfig>(result, toUserConfig(base));\n\n for (const override of overrides) {\n result = mergeConfig<UserConfig, UserConfig>(result, toUserConfig(override));\n }\n\n return result;\n}\n\nexport function createDefinedConfig(base: ConfigInput, ...overrides: ConfigInput[]): UserConfig {\n return defineConfig(mergeConfigFragments(base, ...overrides));\n}\n","export const DEFAULT_TEST_INCLUDE = [\"**/*.{test,spec}.{ts,tsx,mts,cts}\"] as const;\nexport const DEFAULT_IGNORE_PATTERNS = [\n \"node_modules/**\",\n \"dist/**\",\n \"dist-ssr/**\",\n \"**/worker-configuration.d.ts\",\n \"**/migrations/**\",\n \"**/drizzle/migrations.js\",\n \"**/drizzle/meta/*.json\",\n] as const;\n\nexport const DEFAULT_STAGED_CHECK_GLOB = \"*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\";\nexport const DEFAULT_STAGED_CHECK_COMMAND = \"vp check --fix\";\nexport const DEFAULT_WRANGLER_CONFIG_PATH = \"./wrangler.jsonc\";\n","import type { UserConfig } from \"vite-plus\";\nimport { DEFAULT_IGNORE_PATTERNS } from \"./constants.ts\";\n\ntype FmtConfig = NonNullable<UserConfig[\"fmt\"]>;\n\nexport const baseFmt: FmtConfig = {\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n sortImports: {\n internalPattern: [\"#\", \"@/\"],\n newlinesBetween: false,\n groups: [\n \"type-import\",\n [\"value-builtin\", \"value-external\"],\n \"type-internal\",\n \"value-internal\",\n [\"type-parent\", \"type-sibling\", \"type-index\"],\n [\"value-parent\", \"value-sibling\", \"value-index\"],\n \"unknown\",\n ],\n },\n};\n\nexport const reactFmt: FmtConfig = {\n sortTailwindcss: {\n attributes: [\"/.*ClassName/\"],\n functions: [\"tv\"],\n },\n};\n","import type { UserConfig } from \"vite-plus\";\nimport { DEFAULT_IGNORE_PATTERNS } from \"./constants.ts\";\n\nexport const BASE_LINT_PLUGINS = [\"typescript\", \"unicorn\", \"oxc\", \"import\", \"promise\"] as const;\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst baseLintConfig: LintConfig = {\n plugins: [...BASE_LINT_PLUGINS],\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n env: {\n serviceworker: true,\n worker: true,\n },\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n },\n rules: {\n \"capitalized-comments\": \"off\",\n \"func-style\": \"off\",\n \"id-length\": \"off\",\n \"init-declarations\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-continue\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-ternary\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n \"vars-on-top\": \"off\",\n\n complexity: [\"error\", { max: 20 }],\n curly: [\"error\", \"multi-line\", \"consistent\"],\n \"default-case-last\": \"error\",\n eqeqeq: \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": [\"error\", \"getBeforeSet\"],\n \"max-depth\": [\"error\", { max: 3 }],\n \"max-nested-callbacks\": [\"error\", { max: 3 }],\n \"max-params\": [\"error\", { max: 3 }],\n \"new-cap\": \"off\",\n \"no-alert\": \"error\",\n \"no-bitwise\": \"error\",\n \"no-console\": [\"error\", { allow: [\"info\", \"warn\", \"error\"] }],\n \"no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"no-param-reassign\": [\"error\", { props: true }],\n \"no-plusplus\": \"error\",\n \"no-undef\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-useless-return\": \"error\",\n \"prefer-template\": \"error\",\n\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/no-anonymous-default-export\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-namespace\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-cycle\": \"error\",\n\n \"promise/prefer-await-to-callbacks\": \"off\",\n\n \"typescript/ban-ts-comment\": [\"error\", { minimumDescriptionLength: 10 }],\n \"typescript/consistent-type-definitions\": \"off\",\n \"typescript/consistent-return\": \"error\",\n \"typescript/consistent-type-exports\": \"error\",\n \"typescript/consistent-type-imports\": [\n \"error\",\n { prefer: \"type-imports\", fixStyle: \"separate-type-imports\" },\n ],\n \"typescript/dot-notation\": \"error\",\n \"typescript/explicit-module-boundary-types\": \"error\",\n \"typescript/no-confusing-void-expression\": \"error\",\n \"typescript/no-dynamic-delete\": \"error\",\n \"typescript/no-explicit-any\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/no-require-imports\": \"error\",\n \"typescript/no-unnecessary-condition\": \"error\",\n \"typescript/no-unnecessary-qualifier\": \"error\",\n \"typescript/no-unnecessary-type-arguments\": \"error\",\n \"typescript/no-unnecessary-type-assertion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/non-nullable-type-assertion-style\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-find\": \"error\",\n \"typescript/prefer-nullish-coalescing\": \"error\",\n \"typescript/prefer-optional-chain\": \"error\",\n \"typescript/prefer-readonly\": \"error\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/require-await\": \"off\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/restrict-plus-operands\": \"error\",\n \"typescript/restrict-template-expressions\": \"error\",\n \"typescript/return-await\": \"error\",\n \"typescript/strict-boolean-expressions\": \"error\",\n \"typescript/strict-void-return\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/unbound-method\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n \"unicorn/filename-case\": [\"error\", { case: \"kebabCase\" }],\n },\n overrides: [\n {\n files: [\"**/*.{cjs,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"typescript/no-require-imports\": \"off\",\n },\n },\n {\n files: [\"**/*.config.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"func-names\": \"off\",\n },\n },\n {\n files: [\"**/*.d.ts\"],\n rules: {\n \"typescript/no-empty-interface\": \"off\",\n },\n },\n {\n files: [\n \"**/test/**\",\n \"**/tests/**\",\n \"**/__tests__/**\",\n \"**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\",\n ],\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n env: {\n vitest: true,\n },\n rules: {\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/max-nested-describe\": [\"error\", { max: 3 }],\n },\n },\n ],\n};\n\nexport const baseLint: LintConfig = baseLintConfig;\n\nconst reactLintConfig: LintConfig = {\n plugins: [\"react\", \"jsx-a11y\"],\n env: {\n browser: true,\n },\n rules: {\n \"jsx-a11y/alt-text\": \"error\",\n\n \"react/jsx-props-no-spreading\": \"off\",\n \"react/react-in-jsx-scope\": \"off\",\n \"react/exhaustive-deps\": \"error\",\n \"react/jsx-key\": \"error\",\n \"react/jsx-max-depth\": [\"error\", { max: 4 }],\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/no-array-index-key\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-clone-element\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-find-dom-node\": \"error\",\n \"react/no-react-children\": \"error\",\n \"react/no-string-refs\": \"error\",\n \"react/style-prop-object\": \"off\",\n \"react/no-unsafe\": \"error\",\n \"react/no-unknown-property\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n },\n};\n\nexport const reactLint: LintConfig = reactLintConfig;\n\nconst serverLintConfig: LintConfig = {\n plugins: [\"node\"],\n globals: {\n WebSocketPair: \"readonly\",\n },\n rules: {\n \"node/no-exports-assign\": \"error\",\n },\n};\n\nexport const serverLint: LintConfig = serverLintConfig;\n","import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport {\n DEFAULT_STAGED_CHECK_COMMAND,\n DEFAULT_STAGED_CHECK_GLOB,\n DEFAULT_TEST_INCLUDE,\n} from \"../shared/constants.ts\";\nimport { baseFmt } from \"../shared/fmt.ts\";\nimport { baseLint } from \"../shared/lint.ts\";\n\nconst baseConfig: UserConfig = {\n fmt: baseFmt,\n lint: baseLint,\n test: {\n include: [...DEFAULT_TEST_INCLUDE],\n },\n staged: {\n [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND,\n },\n};\n\nexport function createBaseConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(baseConfig, overrides);\n}\n\nexport { createBaseConfig as createConfig };\n"],"mappings":";;AAgBA,SAAS,aAAa,QAAiC;CAErD,OAAO;;AAGT,SAAgB,qBAAqB,MAAmB,GAAG,WAAsC;CAC/F,IAAI,SAAqB,EAAE;CAC3B,SAAS,YAAoC,QAAQ,aAAa,KAAK,CAAC;CAExE,KAAK,MAAM,YAAY,WACrB,SAAS,YAAoC,QAAQ,aAAa,SAAS,CAAC;CAG9E,OAAO;;AAGT,SAAgB,oBAAoB,MAAmB,GAAG,WAAsC;CAC9F,OAAO,aAAa,qBAAqB,MAAM,GAAG,UAAU,CAAC;;;;ACjC/D,MAAa,uBAAuB,CAAC,oCAAoC;AACzE,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,4BAA4B;AACzC,MAAa,+BAA+B;AAC5C,MAAa,+BAA+B;;;ACR5C,MAAa,UAAqB;CAChC,gBAAgB,CAA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{"version":3,"file":"base-ICoOIzvp.mjs","names":[],"sources":["../src/shared/config.ts","../src/shared/constants.ts","../src/shared/fmt.ts","../src/shared/lint.ts","../src/base/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig, mergeConfig } from \"vite-plus\";\n\nexport type PluginInput = object | readonly object[] | false | null | undefined;\n\nexport type ConfigInput = Omit<UserConfig, \"plugins\"> & {\n /**\n * Vite plugins to merge into the config.\n *\n * This is intentionally typed structurally instead of as Vite's recursive\n * PluginOption type. Vite 8 plugin types from different Vite entrypoints can\n * trigger excessive stack-depth comparisons before the config reaches Vite.\n */\n readonly plugins?: readonly PluginInput[];\n};\n\nfunction toUserConfig(config: ConfigInput): UserConfig {\n // eslint-disable-next-line typescript/no-unsafe-type-assertion -- ConfigInput preserves UserConfig autocomplete but keeps plugin assignability shallow at our public boundary.\n return config as UserConfig;\n}\n\nexport function mergeConfigFragments(base: ConfigInput, ...overrides: ConfigInput[]): UserConfig {\n let result: UserConfig = {};\n result = mergeConfig<UserConfig, UserConfig>(result, toUserConfig(base));\n\n for (const override of overrides) {\n result = mergeConfig<UserConfig, UserConfig>(result, toUserConfig(override));\n }\n\n return result;\n}\n\nexport function createDefinedConfig(base: ConfigInput, ...overrides: ConfigInput[]): UserConfig {\n return defineConfig(mergeConfigFragments(base, ...overrides));\n}\n","export const DEFAULT_TEST_INCLUDE = [\"**/*.{test,spec}.{ts,tsx,mts,cts}\"] as const;\nexport const DEFAULT_IGNORE_PATTERNS = [\n \"node_modules/**\",\n \"dist/**\",\n \"dist-ssr/**\",\n \"**/worker-configuration.d.ts\",\n \"**/migrations/**\",\n \"**/drizzle/migrations.js\",\n \"**/drizzle/meta/*.json\",\n] as const;\n\nexport const DEFAULT_STAGED_CHECK_GLOB = \"*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\";\nexport const DEFAULT_STAGED_CHECK_COMMAND = \"vp check --fix\";\nexport const DEFAULT_WRANGLER_CONFIG_PATH = \"./wrangler.jsonc\";\n","import type { UserConfig } from \"vite-plus\";\nimport { DEFAULT_IGNORE_PATTERNS } from \"./constants.ts\";\n\ntype FmtConfig = NonNullable<UserConfig[\"fmt\"]>;\n\nexport const baseFmt: FmtConfig = {\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n sortImports: {\n internalPattern: [\"#\", \"@/\"],\n newlinesBetween: false,\n groups: [\n \"type-import\",\n [\"value-builtin\", \"value-external\"],\n \"type-internal\",\n \"value-internal\",\n [\"type-parent\", \"type-sibling\", \"type-index\"],\n [\"value-parent\", \"value-sibling\", \"value-index\"],\n \"unknown\",\n ],\n },\n};\n\nexport const reactFmt: FmtConfig = {\n sortTailwindcss: {\n attributes: [\"/.*ClassName/\"],\n functions: [\"tv\"],\n },\n};\n","import type { UserConfig } from \"vite-plus\";\nimport { DEFAULT_IGNORE_PATTERNS } from \"./constants.ts\";\n\nexport const BASE_LINT_PLUGINS = [\"typescript\", \"unicorn\", \"oxc\", \"import\", \"promise\"] as const;\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst baseLintConfig: LintConfig = {\n plugins: [...BASE_LINT_PLUGINS],\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n env: {\n serviceworker: true,\n worker: true,\n },\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n },\n rules: {\n \"capitalized-comments\": \"off\",\n \"func-style\": \"off\",\n \"id-length\": \"off\",\n \"init-declarations\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-continue\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-ternary\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n \"vars-on-top\": \"off\",\n\n complexity: [\"error\", { max: 20 }],\n curly: [\"error\", \"multi-line\", \"consistent\"],\n \"default-case-last\": \"error\",\n eqeqeq: \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": [\"error\", \"getBeforeSet\"],\n \"max-depth\": [\"error\", { max: 3 }],\n \"max-nested-callbacks\": [\"error\", { max: 3 }],\n \"max-params\": [\"error\", { max: 3 }],\n \"new-cap\": \"off\",\n \"no-alert\": \"error\",\n \"no-bitwise\": \"error\",\n \"no-console\": [\"error\", { allow: [\"info\", \"warn\", \"error\"] }],\n \"no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"no-param-reassign\": [\"error\", { props: true }],\n \"no-plusplus\": \"error\",\n \"no-undef\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-useless-return\": \"error\",\n \"prefer-template\": \"error\",\n\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/no-anonymous-default-export\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-namespace\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-cycle\": \"error\",\n\n \"promise/prefer-await-to-callbacks\": \"off\",\n\n \"typescript/ban-ts-comment\": [\"error\", { minimumDescriptionLength: 10 }],\n \"typescript/consistent-type-definitions\": \"off\",\n \"typescript/consistent-return\": \"error\",\n \"typescript/consistent-type-exports\": \"error\",\n \"typescript/consistent-type-imports\": [\n \"error\",\n { prefer: \"type-imports\", fixStyle: \"separate-type-imports\" },\n ],\n \"typescript/dot-notation\": \"error\",\n \"typescript/explicit-module-boundary-types\": \"error\",\n \"typescript/no-confusing-void-expression\": \"error\",\n \"typescript/no-dynamic-delete\": \"error\",\n \"typescript/no-explicit-any\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/no-require-imports\": \"error\",\n \"typescript/no-unnecessary-condition\": \"error\",\n \"typescript/no-unnecessary-qualifier\": \"error\",\n \"typescript/no-unnecessary-type-arguments\": \"error\",\n \"typescript/no-unnecessary-type-assertion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/non-nullable-type-assertion-style\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-find\": \"error\",\n \"typescript/prefer-nullish-coalescing\": \"error\",\n \"typescript/prefer-optional-chain\": \"error\",\n \"typescript/prefer-readonly\": \"error\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/require-await\": \"off\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/restrict-plus-operands\": \"error\",\n \"typescript/restrict-template-expressions\": \"error\",\n \"typescript/return-await\": \"error\",\n \"typescript/strict-boolean-expressions\": \"error\",\n \"typescript/strict-void-return\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/unbound-method\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n \"unicorn/filename-case\": [\"error\", { case: \"kebabCase\" }],\n },\n overrides: [\n {\n files: [\"**/*.{cjs,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"typescript/no-require-imports\": \"off\",\n },\n },\n {\n files: [\"**/*.config.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"func-names\": \"off\",\n },\n },\n {\n files: [\"**/*.d.ts\"],\n rules: {\n \"typescript/no-empty-interface\": \"off\",\n },\n },\n {\n files: [\n \"**/test/**\",\n \"**/tests/**\",\n \"**/__tests__/**\",\n \"**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\",\n ],\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n env: {\n vitest: true,\n },\n rules: {\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/max-nested-describe\": [\"error\", { max: 3 }],\n },\n },\n ],\n};\n\nexport const baseLint: LintConfig = baseLintConfig;\n\nconst reactLintConfig: LintConfig = {\n plugins: [\"react\", \"jsx-a11y\"],\n env: {\n browser: true,\n },\n rules: {\n \"jsx-a11y/alt-text\": \"error\",\n\n \"react/jsx-props-no-spreading\": \"off\",\n \"react/react-in-jsx-scope\": \"off\",\n \"react/exhaustive-deps\": \"error\",\n \"react/jsx-key\": \"error\",\n \"react/jsx-max-depth\": [\"error\", { max: 4 }],\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/no-array-index-key\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-clone-element\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-find-dom-node\": \"error\",\n \"react/no-react-children\": \"error\",\n \"react/no-string-refs\": \"error\",\n \"react/style-prop-object\": \"off\",\n \"react/no-unsafe\": \"error\",\n \"react/no-unknown-property\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n },\n};\n\nexport const reactLint: LintConfig = reactLintConfig;\n\nconst serverLintConfig: LintConfig = {\n plugins: [\"node\"],\n globals: {\n WebSocketPair: \"readonly\",\n },\n rules: {\n \"node/no-exports-assign\": \"error\",\n },\n};\n\nexport const serverLint: LintConfig = serverLintConfig;\n","import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport {\n DEFAULT_STAGED_CHECK_COMMAND,\n DEFAULT_STAGED_CHECK_GLOB,\n DEFAULT_TEST_INCLUDE,\n} from \"../shared/constants.ts\";\nimport { baseFmt } from \"../shared/fmt.ts\";\nimport { baseLint } from \"../shared/lint.ts\";\n\nconst baseConfig: UserConfig = {\n fmt: baseFmt,\n lint: baseLint,\n test: {\n include: [...DEFAULT_TEST_INCLUDE],\n },\n staged: {\n [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND,\n },\n};\n\nexport function createBaseConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(baseConfig, overrides);\n}\n\nexport { createBaseConfig as createConfig };\n"],"mappings":";;AAgBA,SAAS,aAAa,QAAiC;CAErD,OAAO;AACT;AAEA,SAAgB,qBAAqB,MAAmB,GAAG,WAAsC;CAC/F,IAAI,SAAqB,CAAC;CAC1B,SAAS,YAAoC,QAAQ,aAAa,IAAI,CAAC;CAEvE,KAAK,MAAM,YAAY,WACrB,SAAS,YAAoC,QAAQ,aAAa,QAAQ,CAAC;CAG7E,OAAO;AACT;AAEA,SAAgB,oBAAoB,MAAmB,GAAG,WAAsC;CAC9F,OAAO,aAAa,qBAAqB,MAAM,GAAG,SAAS,CAAC;AAC9D;;;AClCA,MAAa,uBAAuB,CAAC,mCAAmC;AACxE,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,4BAA4B;AACzC,MAAa,+BAA+B;AAC5C,MAAa,+BAA+B;;;ACR5C,MAAa,UAAqB;CAChC,gBAAgB,CAAC,GAAG,uBAAuB;CAC3C,aAAa;EACX,iBAAiB,CAAC,KAAK,IAAI;EAC3B,iBAAiB;EACjB,QAAQ;GACN;GACA,CAAC,iBAAiB,gBAAgB;GAClC;GACA;GACA;IAAC;IAAe;IAAgB;GAAY;GAC5C;IAAC;IAAgB;IAAiB;GAAa;GAC/C;EACF;CACF;AACF;AAEA,MA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;EACA;GACE,OAAO;IACL;IACA;IACA;IACA;GACF;GACA,SAAS,CAAC,GAAG,mBAAmB,QAAQ;GACxC,KAAK,EACH,QAAQ,KACV;GACA,OAAO;IACL,sCAAsC;IACtC,8BAA8B,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;GACpD;EACF;CACF;AAGkC;AAkCpC,MAAa,YAAwB;CA/BnC,SAAS,CAAC,SAAS,UAAU;CAC7B,KAAK,EACH,SAAS,KACX;CACA,OAAO;EACL,qBAAqB;EAErB,gCAAgC;EAChC,4BAA4B;EAC5B,yBAAyB;EACzB,iBAAiB;EACjB,uBAAuB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;EAC3C,2CAA2C;EAC3C,gCAAgC;EAChC,sBAAsB;EACtB,4BAA4B;EAC5B,0BAA0B;EAC1B,0BAA0B;EAC1B,mBAAmB;EACnB,iCAAiC;EACjC,kCAAkC;EAClC,0BAA0B;EAC1B,2BAA2B;EAC3B,wBAAwB;EACxB,2BAA2B;EAC3B,mBAAmB;EACnB,6BAA6B;EAC7B,uCAAuC;CACzC;AAGmC;AAYrC,MAAa,aAAyB;CATpC,SAAS,CAAC,MAAM;CAChB,SAAS,EACP,eAAe,WACjB;CACA,OAAO,EACL,0BAA0B,QAC5B;AAGoC;;;ACjNtC,MAAM,aAAyB;CAC7B,KAAK;CACL,MAAM;CACN,MAAM,EACJ,SAAS,CAAC,GAAG,oBAAoB,EACnC;CACA,QAAQ,GACL,4BAA4B,6BAC/B;AACF;AAEA,SAAgB,iBAAiB,YAAyB,CAAC,GAAe;CACxE,OAAO,oBAAoB,YAAY,SAAS;AAClD"}
@@ -0,0 +1,16 @@
1
+ import { UserConfig } from "vite-plus";
2
+ //#region src/shared/config.d.ts
3
+ type PluginInput = object | readonly object[] | false | null | undefined;
4
+ type ConfigInput = Omit<UserConfig, "plugins"> & {
5
+ /**
6
+ * Vite plugins to merge into the config.
7
+ *
8
+ * This is intentionally typed structurally instead of as Vite's recursive
9
+ * PluginOption type. Vite 8 plugin types from different Vite entrypoints can
10
+ * trigger excessive stack-depth comparisons before the config reaches Vite.
11
+ */
12
+ readonly plugins?: readonly PluginInput[];
13
+ };
14
+ //#endregion
15
+ export { ConfigInput as t };
16
+ //# sourceMappingURL=config-Cxe-N0iS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-Cxe-N0iS.d.mts","names":[],"sources":["../src/shared/config.ts"],"mappings":";;KAGY;KAEA,cAAc,KAAK;;;;;;;;WAQpB,mBAAmB"}
@@ -1,6 +1,5 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
-
4
3
  //#region src/base/index.d.ts
5
4
  declare function createBaseConfig(overrides?: ConfigInput): UserConfig;
6
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/base/index.ts"],"mappings":";;;;iBAsBgB,gBAAA,CAAiB,SAAA,GAAW,WAAA,GAAmB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/base/index.ts"],"mappings":";;;iBAsBgB,iBAAiB,YAAW,cAAmB"}
@@ -1,2 +1,2 @@
1
- import { t as createBaseConfig } from "../../base-tA8JSy86.mjs";
1
+ import { t as createBaseConfig } from "../../base-ICoOIzvp.mjs";
2
2
  export { createBaseConfig, createBaseConfig as createConfig };
@@ -1,12 +1,9 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
- import { PluginConfig } from "@cloudflare/vite-plugin";
4
3
  import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
5
-
6
4
  //#region src/cloudflare-workers/index.d.ts
7
5
  type CloudflareWorkersPluginOptions = Exclude<NonNullable<Parameters<typeof cloudflareTest>[0]>, (...args: readonly never[]) => unknown>;
8
6
  interface CloudflareWorkersConfigOptions extends Omit<CloudflareWorkersPluginOptions, "wrangler"> {
9
- readonly cloudflare?: PluginConfig | false;
10
7
  readonly config?: ConfigInput;
11
8
  readonly include?: readonly string[];
12
9
  readonly test?: UserConfig["test"];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/cloudflare-workers/index.ts"],"mappings":";;;;;;KAWK,8BAAA,GAAiC,OAAA,CACpC,WAAA,CAAY,UAAA,QAAkB,cAAA,WAC1B,IAAA;AAAA,UAGW,8BAAA,SAAuC,IAAA,CACtD,8BAAA;EAAA,SAGS,UAAA,GAAa,YAAA;EAAA,SACb,MAAA,GAAS,WAAA;EAAA,SACT,OAAA;EAAA,SACA,IAAA,GAAO,UAAA;EAAA,SACP,QAAA,GAAW,8BAAA;AAAA;AAAA,iBAGN,6BAAA,CACd,OAAA,GAAS,8BAAA,GACR,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/cloudflare-workers/index.ts"],"mappings":";;;;KAQK,iCAAiC,QACpC,YAAY,kBAAkB,yBAC1B;UAGW,uCAAuC,KACtD;WAGS,SAAS;WACT;WACA,OAAO;WACP,WAAW;;iBAGN,8BACd,UAAS,iCACR"}
@@ -1,20 +1,17 @@
1
- import { a as DEFAULT_WRANGLER_CONFIG_PATH, o as createDefinedConfig, s as mergeConfigFragments } from "../../base-tA8JSy86.mjs";
1
+ import { a as DEFAULT_WRANGLER_CONFIG_PATH, o as createDefinedConfig, s as mergeConfigFragments } from "../../base-ICoOIzvp.mjs";
2
2
  import { createConfig as createNodeConfig } from "../node/index.mjs";
3
3
  import { lazyPlugins } from "vite-plus";
4
- import { cloudflare } from "@cloudflare/vite-plugin";
5
4
  import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
6
- import process from "node:process";
7
5
  //#region src/cloudflare-workers/index.ts
8
6
  function createCloudflareWorkersConfig(options = {}) {
9
- const { cloudflare: cloudflareOptions = {}, config = {}, include, test, wrangler, ...testPluginOptions } = options;
10
- const isTest = process.env.VITEST === "true";
7
+ const { config = {}, include, test, wrangler, ...testPluginOptions } = options;
11
8
  return createNodeConfig(mergeConfigFragments(createDefinedConfig({ plugins: lazyPlugins(() => [cloudflareTest({
12
9
  ...testPluginOptions,
13
10
  wrangler: {
14
11
  configPath: DEFAULT_WRANGLER_CONFIG_PATH,
15
12
  ...wrangler
16
13
  }
17
- })]) }, include === void 0 ? {} : { test: { include: [...include] } }, { test }), !isTest && cloudflareOptions !== false ? { plugins: lazyPlugins(() => [...cloudflare(cloudflareOptions)]) } : {}, config));
14
+ })]) }, include === void 0 ? {} : { test: { include: [...include] } }, { test }), config));
18
15
  }
19
16
  //#endregion
20
17
  export { createCloudflareWorkersConfig, createCloudflareWorkersConfig as createConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/cloudflare-workers/index.ts"],"sourcesContent":["import type { PluginConfig as CloudflareVitePluginConfig } from \"@cloudflare/vite-plugin\";\nimport type { UserConfig } from \"vite-plus\";\nimport { cloudflare } from \"@cloudflare/vite-plugin\";\nimport { cloudflareTest } from \"@cloudflare/vitest-pool-workers\";\nimport process from \"node:process\";\nimport { lazyPlugins } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createNodeConfig } from \"../node/index.ts\";\nimport { createDefinedConfig, mergeConfigFragments } from \"../shared/config.ts\";\nimport { DEFAULT_WRANGLER_CONFIG_PATH } from \"../shared/constants.ts\";\n\ntype CloudflareWorkersPluginOptions = Exclude<\n NonNullable<Parameters<typeof cloudflareTest>[0]>,\n (...args: readonly never[]) => unknown\n>;\n\nexport interface CloudflareWorkersConfigOptions extends Omit<\n CloudflareWorkersPluginOptions,\n \"wrangler\"\n> {\n readonly cloudflare?: CloudflareVitePluginConfig | false;\n readonly config?: ConfigInput;\n readonly include?: readonly string[];\n readonly test?: UserConfig[\"test\"];\n readonly wrangler?: CloudflareWorkersPluginOptions[\"wrangler\"];\n}\n\nexport function createCloudflareWorkersConfig(\n options: CloudflareWorkersConfigOptions = {},\n): UserConfig {\n const {\n cloudflare: cloudflareOptions = {},\n config = {},\n include,\n test,\n wrangler,\n ...testPluginOptions\n } = options;\n const isTest = process.env.VITEST === \"true\";\n const cloudflareTestConfig = createDefinedConfig(\n {\n plugins: lazyPlugins(() => [\n cloudflareTest({\n ...testPluginOptions,\n wrangler: {\n configPath: DEFAULT_WRANGLER_CONFIG_PATH,\n ...wrangler,\n },\n }),\n ]),\n },\n include === undefined\n ? {}\n : {\n test: {\n include: [...include],\n },\n },\n {\n test,\n },\n );\n\n const cloudflareConfig: UserConfig =\n !isTest && cloudflareOptions !== false\n ? {\n plugins: lazyPlugins(() => [...cloudflare(cloudflareOptions)]),\n }\n : {};\n\n return createNodeConfig(mergeConfigFragments(cloudflareTestConfig, cloudflareConfig, config));\n}\n\nexport { createCloudflareWorkersConfig as createConfig };\n"],"mappings":";;;;;;;AA2BA,SAAgB,8BACd,UAA0C,EAAE,EAChC;CACZ,MAAM,EACJ,YAAY,oBAAoB,EAAE,EAClC,SAAS,EAAE,EACX,SACA,MACA,UACA,GAAG,sBACD;CACJ,MAAM,SAAS,QAAQ,IAAI,WAAW;CAgCtC,OAAO,iBAAiB,qBA/BK,oBAC3B,EACE,SAAS,kBAAkB,CACzB,eAAe;EACb,GAAG;EACH,UAAU;GACR,YAAY;GACZ,GAAG;GACJ;EACF,CAAC,CACH,CAAC,EACH,EACD,YAAY,KAAA,IACR,EAAE,GACF,EACE,MAAM,EACJ,SAAS,CAAC,GAAG,QAAQ,EACtB,EACF,EACL,EACE,MACD,CAU8D,EAN/D,CAAC,UAAU,sBAAsB,QAC7B,EACE,SAAS,kBAAkB,CAAC,GAAG,WAAW,kBAAkB,CAAC,CAAC,EAC/D,GACD,EAAE,EAE6E,OAAO,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/cloudflare-workers/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { cloudflareTest } from \"@cloudflare/vitest-pool-workers\";\nimport { lazyPlugins } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createNodeConfig } from \"../node/index.ts\";\nimport { createDefinedConfig, mergeConfigFragments } from \"../shared/config.ts\";\nimport { DEFAULT_WRANGLER_CONFIG_PATH } from \"../shared/constants.ts\";\n\ntype CloudflareWorkersPluginOptions = Exclude<\n NonNullable<Parameters<typeof cloudflareTest>[0]>,\n (...args: readonly never[]) => unknown\n>;\n\nexport interface CloudflareWorkersConfigOptions extends Omit<\n CloudflareWorkersPluginOptions,\n \"wrangler\"\n> {\n readonly config?: ConfigInput;\n readonly include?: readonly string[];\n readonly test?: UserConfig[\"test\"];\n readonly wrangler?: CloudflareWorkersPluginOptions[\"wrangler\"];\n}\n\nexport function createCloudflareWorkersConfig(\n options: CloudflareWorkersConfigOptions = {},\n): UserConfig {\n const { config = {}, include, test, wrangler, ...testPluginOptions } = options;\n const cloudflareTestConfig = createDefinedConfig(\n {\n plugins: lazyPlugins(() => [\n cloudflareTest({\n ...testPluginOptions,\n wrangler: {\n configPath: DEFAULT_WRANGLER_CONFIG_PATH,\n ...wrangler,\n },\n }),\n ]),\n },\n include === undefined\n ? {}\n : {\n test: {\n include: [...include],\n },\n },\n {\n test,\n },\n );\n\n return createNodeConfig(mergeConfigFragments(cloudflareTestConfig, config));\n}\n\nexport { createCloudflareWorkersConfig as createConfig };\n"],"mappings":";;;;;AAuBA,SAAgB,8BACd,UAA0C,CAAC,GAC/B;CACZ,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,MAAM,UAAU,GAAG,sBAAsB;CAyBvE,OAAO,iBAAiB,qBAxBK,oBAC3B,EACE,SAAS,kBAAkB,CACzB,eAAe;EACb,GAAG;EACH,UAAU;GACR,YAAY;GACZ,GAAG;EACL;CACF,CAAC,CACH,CAAC,EACH,GACA,YAAY,KAAA,IACR,CAAC,IACD,EACE,MAAM,EACJ,SAAS,CAAC,GAAG,OAAO,EACtB,EACF,GACJ,EACE,KACF,CAG8D,GAAG,MAAM,CAAC;AAC5E"}
@@ -1,6 +1,5 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
-
4
3
  //#region src/library/index.d.ts
5
4
  declare function createLibraryConfig(overrides?: ConfigInput): UserConfig;
6
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/library/index.ts"],"mappings":";;;;iBAcgB,mBAAA,CAAoB,SAAA,GAAW,WAAA,GAAmB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/library/index.ts"],"mappings":";;;iBAcgB,oBAAoB,YAAW,cAAmB"}
@@ -1,4 +1,4 @@
1
- import { o as createDefinedConfig, t as createBaseConfig } from "../../base-tA8JSy86.mjs";
1
+ import { o as createDefinedConfig, t as createBaseConfig } from "../../base-ICoOIzvp.mjs";
2
2
  //#region src/library/index.ts
3
3
  const libraryConfig = { pack: {
4
4
  clean: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/library/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\n\nconst libraryConfig: UserConfig = {\n pack: {\n clean: true,\n dts: true,\n format: [\"esm\"],\n sourcemap: true,\n },\n};\n\nexport function createLibraryConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), libraryConfig, overrides);\n}\n\nexport { createLibraryConfig as createConfig };\n"],"mappings":";;AAKA,MAAM,gBAA4B,EAChC,MAAM;CACJ,OAAO;CACP,KAAK;CACL,QAAQ,CAAC,MAAM;CACf,WAAW;CACZ,EACF;AAED,SAAgB,oBAAoB,YAAyB,EAAE,EAAc;CAC3E,OAAO,oBAAoB,kBAAkB,EAAE,eAAe,UAAU"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/library/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\n\nconst libraryConfig: UserConfig = {\n pack: {\n clean: true,\n dts: true,\n format: [\"esm\"],\n sourcemap: true,\n },\n};\n\nexport function createLibraryConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), libraryConfig, overrides);\n}\n\nexport { createLibraryConfig as createConfig };\n"],"mappings":";;AAKA,MAAM,gBAA4B,EAChC,MAAM;CACJ,OAAO;CACP,KAAK;CACL,QAAQ,CAAC,KAAK;CACd,WAAW;AACb,EACF;AAEA,SAAgB,oBAAoB,YAAyB,CAAC,GAAe;CAC3E,OAAO,oBAAoB,iBAAiB,GAAG,eAAe,SAAS;AACzE"}
@@ -1,6 +1,5 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
-
4
3
  //#region src/monorepo/index.d.ts
5
4
  declare function createMonorepoConfig(overrides?: ConfigInput): UserConfig;
6
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/monorepo/index.ts"],"mappings":";;;;iBAegB,oBAAA,CAAqB,SAAA,GAAW,WAAA,GAAmB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/monorepo/index.ts"],"mappings":";;;iBAegB,qBAAqB,YAAW,cAAmB"}
@@ -1,4 +1,4 @@
1
- import { o as createDefinedConfig, t as createBaseConfig } from "../../base-tA8JSy86.mjs";
1
+ import { o as createDefinedConfig, t as createBaseConfig } from "../../base-ICoOIzvp.mjs";
2
2
  //#region src/monorepo/index.ts
3
3
  const monorepoConfig = { run: {
4
4
  cache: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/monorepo/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\n\nconst monorepoConfig: UserConfig = {\n run: {\n cache: {\n scripts: true,\n tasks: true,\n },\n enablePrePostScripts: true,\n },\n};\n\nexport function createMonorepoConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), monorepoConfig, overrides);\n}\n\nexport { createMonorepoConfig as createConfig };\n"],"mappings":";;AAKA,MAAM,iBAA6B,EACjC,KAAK;CACH,OAAO;EACL,SAAS;EACT,OAAO;EACR;CACD,sBAAsB;CACvB,EACF;AAED,SAAgB,qBAAqB,YAAyB,EAAE,EAAc;CAC5E,OAAO,oBAAoB,kBAAkB,EAAE,gBAAgB,UAAU"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/monorepo/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\n\nconst monorepoConfig: UserConfig = {\n run: {\n cache: {\n scripts: true,\n tasks: true,\n },\n enablePrePostScripts: true,\n },\n};\n\nexport function createMonorepoConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), monorepoConfig, overrides);\n}\n\nexport { createMonorepoConfig as createConfig };\n"],"mappings":";;AAKA,MAAM,iBAA6B,EACjC,KAAK;CACH,OAAO;EACL,SAAS;EACT,OAAO;CACT;CACA,sBAAsB;AACxB,EACF;AAEA,SAAgB,qBAAqB,YAAyB,CAAC,GAAe;CAC5E,OAAO,oBAAoB,iBAAiB,GAAG,gBAAgB,SAAS;AAC1E"}
@@ -1,6 +1,5 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
-
4
3
  //#region src/node/index.d.ts
5
4
  declare function createNodeConfig(overrides?: ConfigInput): UserConfig;
6
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/node/index.ts"],"mappings":";;;;iBAUgB,gBAAA,CAAiB,SAAA,GAAW,WAAA,GAAmB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/node/index.ts"],"mappings":";;;iBAUgB,iBAAiB,YAAW,cAAmB"}
@@ -1,4 +1,4 @@
1
- import { o as createDefinedConfig, r as serverLint, t as createBaseConfig } from "../../base-tA8JSy86.mjs";
1
+ import { o as createDefinedConfig, r as serverLint, t as createBaseConfig } from "../../base-ICoOIzvp.mjs";
2
2
  //#region src/node/index.ts
3
3
  const nodeConfig = { lint: serverLint };
4
4
  function createNodeConfig(overrides = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/node/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport { serverLint } from \"../shared/lint.ts\";\n\nconst nodeConfig: UserConfig = {\n lint: serverLint,\n};\n\nexport function createNodeConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), nodeConfig, overrides);\n}\n\nexport { createNodeConfig as createConfig };\n"],"mappings":";;AAMA,MAAM,aAAyB,EAC7B,MAAM,YACP;AAED,SAAgB,iBAAiB,YAAyB,EAAE,EAAc;CACxE,OAAO,oBAAoB,kBAAkB,EAAE,YAAY,UAAU"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/node/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport { serverLint } from \"../shared/lint.ts\";\n\nconst nodeConfig: UserConfig = {\n lint: serverLint,\n};\n\nexport function createNodeConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), nodeConfig, overrides);\n}\n\nexport { createNodeConfig as createConfig };\n"],"mappings":";;AAMA,MAAM,aAAyB,EAC7B,MAAM,WACR;AAEA,SAAgB,iBAAiB,YAAyB,CAAC,GAAe;CACxE,OAAO,oBAAoB,iBAAiB,GAAG,YAAY,SAAS;AACtE"}
@@ -1,6 +1,5 @@
1
- import { t as ConfigInput } from "../../config-jrALATXh.mjs";
1
+ import { t as ConfigInput } from "../../config-Cxe-N0iS.mjs";
2
2
  import { UserConfig } from "vite-plus";
3
-
4
3
  //#region src/react/index.d.ts
5
4
  declare function createReactConfig(overrides?: ConfigInput): UserConfig;
6
5
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/react/index.ts"],"mappings":";;;;iBAYgB,iBAAA,CAAkB,SAAA,GAAW,WAAA,GAAmB,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/react/index.ts"],"mappings":";;;iBAYgB,kBAAkB,YAAW,cAAmB"}
@@ -1,4 +1,4 @@
1
- import { i as reactFmt, n as reactLint, o as createDefinedConfig, t as createBaseConfig } from "../../base-tA8JSy86.mjs";
1
+ import { i as reactFmt, n as reactLint, o as createDefinedConfig, t as createBaseConfig } from "../../base-ICoOIzvp.mjs";
2
2
  //#region src/react/index.ts
3
3
  const reactConfig = {
4
4
  fmt: reactFmt,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/react/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport { reactFmt } from \"../shared/fmt.ts\";\nimport { reactLint } from \"../shared/lint.ts\";\n\nconst reactConfig: UserConfig = {\n fmt: reactFmt,\n lint: reactLint,\n};\n\nexport function createReactConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), reactConfig, overrides);\n}\n\nexport { createReactConfig as createConfig };\n"],"mappings":";;AAOA,MAAM,cAA0B;CAC9B,KAAK;CACL,MAAM;CACP;AAED,SAAgB,kBAAkB,YAAyB,EAAE,EAAc;CACzE,OAAO,oBAAoB,kBAAkB,EAAE,aAAa,UAAU"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/react/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport type { ConfigInput } from \"../shared/config.ts\";\nimport { createBaseConfig } from \"../base/index.ts\";\nimport { createDefinedConfig } from \"../shared/config.ts\";\nimport { reactFmt } from \"../shared/fmt.ts\";\nimport { reactLint } from \"../shared/lint.ts\";\n\nconst reactConfig: UserConfig = {\n fmt: reactFmt,\n lint: reactLint,\n};\n\nexport function createReactConfig(overrides: ConfigInput = {}): UserConfig {\n return createDefinedConfig(createBaseConfig(), reactConfig, overrides);\n}\n\nexport { createReactConfig as createConfig };\n"],"mappings":";;AAOA,MAAM,cAA0B;CAC9B,KAAK;CACL,MAAM;AACR;AAEA,SAAgB,kBAAkB,YAAyB,CAAC,GAAe;CACzE,OAAO,oBAAoB,iBAAiB,GAAG,aAAa,SAAS;AACvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kasoa/vite-plus-config",
3
- "version": "0.0.18",
3
+ "version": "0.1.1",
4
4
  "description": "Kasoa's Vite+ configurations",
5
5
  "keywords": [
6
6
  "config",
@@ -58,23 +58,18 @@
58
58
  "access": "public"
59
59
  },
60
60
  "devDependencies": {
61
- "@cloudflare/vite-plugin": "^1.37.3",
62
61
  "@cloudflare/vitest-pool-workers": "^0.16.8",
63
62
  "@types/node": "^25.9.1",
64
- "@typescript/native-preview": "7.0.0-dev.20260521.1",
65
- "vite-plus": "^0.1.22",
63
+ "typescript": "^7.0.2",
64
+ "vite-plus": "^0.2.5",
66
65
  "wrangler": "^4.93.1"
67
66
  },
68
67
  "peerDependencies": {
69
- "@cloudflare/vite-plugin": ">=1 <2",
70
68
  "@cloudflare/vitest-pool-workers": ">=0.13.0 <1",
71
- "vite-plus": ">=0.1.14 <1",
69
+ "vite-plus": ">=0.2.1 <1",
72
70
  "wrangler": ">=4 <5"
73
71
  },
74
72
  "peerDependenciesMeta": {
75
- "@cloudflare/vite-plugin": {
76
- "optional": true
77
- },
78
73
  "@cloudflare/vitest-pool-workers": {
79
74
  "optional": true
80
75
  },
@@ -1,17 +0,0 @@
1
- import { UserConfig } from "vite-plus";
2
-
3
- //#region src/shared/config.d.ts
4
- type PluginInput = object | readonly object[] | false | null | undefined;
5
- type ConfigInput = Omit<UserConfig, "plugins"> & {
6
- /**
7
- * Vite plugins to merge into the config.
8
- *
9
- * This is intentionally typed structurally instead of as Vite's recursive
10
- * PluginOption type. Vite 8 plugin types from different Vite entrypoints can
11
- * trigger excessive stack-depth comparisons before the config reaches Vite.
12
- */
13
- readonly plugins?: readonly PluginInput[];
14
- };
15
- //#endregion
16
- export { ConfigInput as t };
17
- //# sourceMappingURL=config-jrALATXh.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-jrALATXh.d.mts","names":[],"sources":["../src/shared/config.ts"],"mappings":";;;KAGY,WAAA;AAAA,KAEA,WAAA,GAAc,IAAA,CAAK,UAAA;EAF/B;;;;;AAEA;;EAFA,SAUW,OAAA,YAAmB,WAAA;AAAA"}