knip 6.25.0 → 6.27.0
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/dist/ConfigurationChief.d.ts +108 -0
- package/dist/DependencyDeputy.d.ts +1 -1
- package/dist/DependencyDeputy.js +2 -2
- package/dist/ProjectPrincipal.d.ts +3 -3
- package/dist/ProjectPrincipal.js +4 -4
- package/dist/binaries/fallback.js +5 -1
- package/dist/binaries/resolvers/bun.js +13 -5
- package/dist/binaries/resolvers/npm.js +4 -2
- package/dist/binaries/resolvers/pnpm.js +11 -1
- package/dist/binaries/resolvers/yarn.js +10 -4
- package/dist/binaries/util.d.ts +4 -0
- package/dist/binaries/util.js +14 -0
- package/dist/compilers/index.d.ts +180 -0
- package/dist/compilers/less.js +1 -1
- package/dist/compilers/scss.js +1 -1
- package/dist/compilers/stylus.js +1 -1
- package/dist/constants.js +19 -0
- package/dist/graph/analyze.js +1 -1
- package/dist/graph/build.js +24 -7
- package/dist/plugins/_vue/auto-import.d.ts +12 -0
- package/dist/plugins/_vue/auto-import.js +332 -0
- package/dist/plugins/_vue/types.d.ts +45 -0
- package/dist/plugins/_vue/types.js +1 -0
- package/dist/plugins/astro/index.js +2 -37
- package/dist/plugins/astro/resolveFromAST.d.ts +4 -4
- package/dist/plugins/astro/resolveFromAST.js +34 -7
- package/dist/plugins/electron-vite/index.d.ts +3 -0
- package/dist/plugins/electron-vite/index.js +51 -0
- package/dist/plugins/electron-vite/types.d.ts +23 -0
- package/dist/plugins/electron-vite/types.js +1 -0
- package/dist/plugins/esbuild/index.d.ts +3 -0
- package/dist/plugins/esbuild/index.js +17 -0
- package/dist/plugins/eslint/resolveFromAST.js +18 -21
- package/dist/plugins/index.d.ts +18 -0
- package/dist/plugins/index.js +36 -0
- package/dist/plugins/laravel-vite-plugin/index.d.ts +3 -0
- package/dist/plugins/laravel-vite-plugin/index.js +14 -0
- package/dist/plugins/laravel-vite-plugin/resolveFromAST.d.ts +2 -0
- package/dist/plugins/laravel-vite-plugin/resolveFromAST.js +27 -0
- package/dist/plugins/next/index.js +2 -2
- package/dist/plugins/next-mdx/index.js +2 -8
- package/dist/plugins/next-mdx/resolveFromAST.d.ts +3 -2
- package/dist/plugins/next-mdx/resolveFromAST.js +17 -21
- package/dist/plugins/nuxt/index.js +5 -68
- package/dist/plugins/nuxt/types.d.ts +0 -34
- package/dist/plugins/nuxtjs-i18n/index.d.ts +3 -0
- package/dist/plugins/nuxtjs-i18n/index.js +12 -0
- package/dist/plugins/oclif/index.js +10 -5
- package/dist/plugins/orval/index.js +1 -3
- package/dist/plugins/orval/resolveFromAST.d.ts +2 -2
- package/dist/plugins/orval/resolveFromAST.js +4 -7
- package/dist/plugins/oxlint/index.js +23 -2
- package/dist/plugins/pnpm/index.js +2 -1
- package/dist/plugins/pnpm/types.d.ts +2 -4
- package/dist/plugins/quasar/index.d.ts +3 -0
- package/dist/plugins/quasar/index.js +15 -0
- package/dist/plugins/quasar/resolveFromAST.d.ts +3 -0
- package/dist/plugins/quasar/resolveFromAST.js +63 -0
- package/dist/plugins/qwik/index.js +1 -25
- package/dist/plugins/qwik/resolveFromAST.d.ts +5 -3
- package/dist/plugins/qwik/resolveFromAST.js +28 -9
- package/dist/plugins/react-email/index.js +1 -0
- package/dist/plugins/rolldown/index.js +2 -5
- package/dist/plugins/rollup/index.js +2 -5
- package/dist/plugins/rslib/index.js +2 -5
- package/dist/plugins/sst/index.js +1 -5
- package/dist/plugins/sst/resolveFromAST.d.ts +1 -1
- package/dist/plugins/sst/resolveFromAST.js +1 -1
- package/dist/plugins/starlight/index.js +1 -19
- package/dist/plugins/starlight/resolveFromAST.d.ts +2 -2
- package/dist/plugins/starlight/resolveFromAST.js +12 -8
- package/dist/plugins/stencil/index.js +2 -37
- package/dist/plugins/stencil/resolveFromAST.d.ts +3 -0
- package/dist/plugins/stencil/resolveFromAST.js +36 -0
- package/dist/plugins/storybook/index.js +3 -0
- package/dist/plugins/sveltekit/index.js +1 -48
- package/dist/plugins/sveltekit/resolveFromAST.d.ts +2 -0
- package/dist/plugins/sveltekit/resolveFromAST.js +45 -0
- package/dist/plugins/tailwind/compiler.js +9 -4
- package/dist/plugins/tanstack-router/index.js +3 -1
- package/dist/plugins/tauri/index.d.ts +3 -0
- package/dist/plugins/tauri/index.js +42 -0
- package/dist/plugins/tauri/types.d.ts +16 -0
- package/dist/plugins/tauri/types.js +1 -0
- package/dist/plugins/temporal/index.d.ts +3 -0
- package/dist/plugins/temporal/index.js +12 -0
- package/dist/plugins/tsdown/index.js +16 -7
- package/dist/plugins/tsdown/types.d.ts +4 -1
- package/dist/plugins/tsup/index.js +2 -5
- package/dist/plugins/unplugin-auto-import/index.d.ts +3 -0
- package/dist/plugins/unplugin-auto-import/index.js +18 -0
- package/dist/plugins/unplugin-icons/index.d.ts +3 -0
- package/dist/plugins/unplugin-icons/index.js +17 -0
- package/dist/plugins/unplugin-vue-components/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-components/index.js +16 -0
- package/dist/plugins/unplugin-vue-i18n/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-i18n/index.js +10 -0
- package/dist/plugins/unplugin-vue-markdown/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-markdown/index.js +16 -0
- package/dist/plugins/unplugin-vue-router/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-router/index.js +14 -0
- package/dist/plugins/vite/helpers.d.ts +2 -0
- package/dist/plugins/vite/helpers.js +46 -31
- package/dist/plugins/vite/index.js +1 -1
- package/dist/plugins/vite-plugin-pages/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-pages/index.js +26 -0
- package/dist/plugins/vite-plugin-pwa/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-pwa/index.js +17 -0
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.d.ts +4 -0
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.js +37 -0
- package/dist/plugins/vite-plugin-vue-layouts-next/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-vue-layouts-next/index.js +23 -0
- package/dist/plugins/vite-plus/index.d.ts +3 -0
- package/dist/plugins/vite-plus/index.js +14 -0
- package/dist/plugins/vite-plus/resolveFromAST.d.ts +2 -0
- package/dist/plugins/vite-plus/resolveFromAST.js +37 -0
- package/dist/plugins/vite-pwa-assets-generator/index.d.ts +3 -0
- package/dist/plugins/vite-pwa-assets-generator/index.js +12 -0
- package/dist/plugins/vitepress/index.js +5 -1
- package/dist/plugins/vitest/index.js +19 -0
- package/dist/plugins/vitest/types.d.ts +8 -0
- package/dist/plugins/vue/index.js +5 -3
- package/dist/plugins/yarn/index.js +2 -1
- package/dist/plugins/yarn/types.d.ts +2 -4
- package/dist/run.js +3 -3
- package/dist/schema/configuration.d.ts +270 -0
- package/dist/schema/plugins.d.ts +90 -0
- package/dist/schema/plugins.js +18 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +18 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/package-json.d.ts +8 -4
- package/dist/typescript/ast-helpers.d.ts +7 -2
- package/dist/typescript/ast-helpers.js +36 -8
- package/dist/typescript/ast-nodes.d.ts +2 -0
- package/dist/typescript/ast-nodes.js +8 -0
- package/dist/typescript/get-imports-and-exports.js +8 -5
- package/dist/typescript/resolve-module-names.d.ts +2 -2
- package/dist/typescript/resolve-module-names.js +97 -18
- package/dist/typescript/visitors/walk.d.ts +2 -1
- package/dist/typescript/visitors/walk.js +13 -2
- package/dist/util/cli-arguments.d.ts +1 -1
- package/dist/util/cli-arguments.js +1 -1
- package/dist/util/create-input-handler.js +8 -1
- package/dist/util/create-options.d.ts +180 -0
- package/dist/util/package-json.d.ts +7 -0
- package/dist/util/package-json.js +37 -0
- package/dist/util/resolve.d.ts +1 -0
- package/dist/util/resolve.js +5 -2
- package/dist/util/to-source-path.d.ts +4 -3
- package/dist/util/to-source-path.js +23 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +72 -0
- package/dist/plugins/next/resolveFromAST.d.ts +0 -2
- package/dist/plugins/next/resolveFromAST.js +0 -2
- package/dist/plugins/nuxt/helpers.d.ts +0 -15
- package/dist/plugins/nuxt/helpers.js +0 -133
- package/dist/plugins/rolldown/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rolldown/resolveFromAST.js +0 -4
- package/dist/plugins/rollup/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rollup/resolveFromAST.js +0 -4
- package/dist/plugins/rslib/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rslib/resolveFromAST.js +0 -4
- package/dist/plugins/tsdown/resolveFromAST.d.ts +0 -2
- package/dist/plugins/tsdown/resolveFromAST.js +0 -4
- package/dist/plugins/tsup/resolveFromAST.d.ts +0 -2
- package/dist/plugins/tsup/resolveFromAST.js +0 -4
- package/dist/plugins/vue/compiler.d.ts +0 -3
- package/dist/plugins/vue/compiler.js +0 -10
|
@@ -197,11 +197,21 @@ export declare class ConfigurationChief {
|
|
|
197
197
|
entry?: string | string[] | undefined;
|
|
198
198
|
project?: string | string[] | undefined;
|
|
199
199
|
} | undefined;
|
|
200
|
+
'electron-vite'?: string | boolean | string[] | {
|
|
201
|
+
config?: string | string[] | undefined;
|
|
202
|
+
entry?: string | string[] | undefined;
|
|
203
|
+
project?: string | string[] | undefined;
|
|
204
|
+
} | undefined;
|
|
200
205
|
eleventy?: string | boolean | string[] | {
|
|
201
206
|
config?: string | string[] | undefined;
|
|
202
207
|
entry?: string | string[] | undefined;
|
|
203
208
|
project?: string | string[] | undefined;
|
|
204
209
|
} | undefined;
|
|
210
|
+
esbuild?: string | boolean | string[] | {
|
|
211
|
+
config?: string | string[] | undefined;
|
|
212
|
+
entry?: string | string[] | undefined;
|
|
213
|
+
project?: string | string[] | undefined;
|
|
214
|
+
} | undefined;
|
|
205
215
|
eslint?: string | boolean | string[] | {
|
|
206
216
|
config?: string | string[] | undefined;
|
|
207
217
|
entry?: string | string[] | undefined;
|
|
@@ -297,6 +307,11 @@ export declare class ConfigurationChief {
|
|
|
297
307
|
entry?: string | string[] | undefined;
|
|
298
308
|
project?: string | string[] | undefined;
|
|
299
309
|
} | undefined;
|
|
310
|
+
'laravel-vite-plugin'?: string | boolean | string[] | {
|
|
311
|
+
config?: string | string[] | undefined;
|
|
312
|
+
entry?: string | string[] | undefined;
|
|
313
|
+
project?: string | string[] | undefined;
|
|
314
|
+
} | undefined;
|
|
300
315
|
lefthook?: string | boolean | string[] | {
|
|
301
316
|
config?: string | string[] | undefined;
|
|
302
317
|
entry?: string | string[] | undefined;
|
|
@@ -432,6 +447,11 @@ export declare class ConfigurationChief {
|
|
|
432
447
|
entry?: string | string[] | undefined;
|
|
433
448
|
project?: string | string[] | undefined;
|
|
434
449
|
} | undefined;
|
|
450
|
+
'nuxtjs-i18n'?: string | boolean | string[] | {
|
|
451
|
+
config?: string | string[] | undefined;
|
|
452
|
+
entry?: string | string[] | undefined;
|
|
453
|
+
project?: string | string[] | undefined;
|
|
454
|
+
} | undefined;
|
|
435
455
|
nx?: string | boolean | string[] | {
|
|
436
456
|
config?: string | string[] | undefined;
|
|
437
457
|
entry?: string | string[] | undefined;
|
|
@@ -537,6 +557,11 @@ export declare class ConfigurationChief {
|
|
|
537
557
|
entry?: string | string[] | undefined;
|
|
538
558
|
project?: string | string[] | undefined;
|
|
539
559
|
} | undefined;
|
|
560
|
+
quasar?: string | boolean | string[] | {
|
|
561
|
+
config?: string | string[] | undefined;
|
|
562
|
+
entry?: string | string[] | undefined;
|
|
563
|
+
project?: string | string[] | undefined;
|
|
564
|
+
} | undefined;
|
|
540
565
|
qwik?: string | boolean | string[] | {
|
|
541
566
|
config?: string | string[] | undefined;
|
|
542
567
|
entry?: string | string[] | undefined;
|
|
@@ -727,6 +752,16 @@ export declare class ConfigurationChief {
|
|
|
727
752
|
entry?: string | string[] | undefined;
|
|
728
753
|
project?: string | string[] | undefined;
|
|
729
754
|
} | undefined;
|
|
755
|
+
tauri?: string | boolean | string[] | {
|
|
756
|
+
config?: string | string[] | undefined;
|
|
757
|
+
entry?: string | string[] | undefined;
|
|
758
|
+
project?: string | string[] | undefined;
|
|
759
|
+
} | undefined;
|
|
760
|
+
temporal?: string | boolean | string[] | {
|
|
761
|
+
config?: string | string[] | undefined;
|
|
762
|
+
entry?: string | string[] | undefined;
|
|
763
|
+
project?: string | string[] | undefined;
|
|
764
|
+
} | undefined;
|
|
730
765
|
travis?: string | boolean | string[] | {
|
|
731
766
|
config?: string | string[] | undefined;
|
|
732
767
|
entry?: string | string[] | undefined;
|
|
@@ -772,6 +807,36 @@ export declare class ConfigurationChief {
|
|
|
772
807
|
entry?: string | string[] | undefined;
|
|
773
808
|
project?: string | string[] | undefined;
|
|
774
809
|
} | undefined;
|
|
810
|
+
'unplugin-auto-import'?: string | boolean | string[] | {
|
|
811
|
+
config?: string | string[] | undefined;
|
|
812
|
+
entry?: string | string[] | undefined;
|
|
813
|
+
project?: string | string[] | undefined;
|
|
814
|
+
} | undefined;
|
|
815
|
+
'unplugin-icons'?: string | boolean | string[] | {
|
|
816
|
+
config?: string | string[] | undefined;
|
|
817
|
+
entry?: string | string[] | undefined;
|
|
818
|
+
project?: string | string[] | undefined;
|
|
819
|
+
} | undefined;
|
|
820
|
+
'unplugin-vue-components'?: string | boolean | string[] | {
|
|
821
|
+
config?: string | string[] | undefined;
|
|
822
|
+
entry?: string | string[] | undefined;
|
|
823
|
+
project?: string | string[] | undefined;
|
|
824
|
+
} | undefined;
|
|
825
|
+
'unplugin-vue-i18n'?: string | boolean | string[] | {
|
|
826
|
+
config?: string | string[] | undefined;
|
|
827
|
+
entry?: string | string[] | undefined;
|
|
828
|
+
project?: string | string[] | undefined;
|
|
829
|
+
} | undefined;
|
|
830
|
+
'unplugin-vue-markdown'?: string | boolean | string[] | {
|
|
831
|
+
config?: string | string[] | undefined;
|
|
832
|
+
entry?: string | string[] | undefined;
|
|
833
|
+
project?: string | string[] | undefined;
|
|
834
|
+
} | undefined;
|
|
835
|
+
'unplugin-vue-router'?: string | boolean | string[] | {
|
|
836
|
+
config?: string | string[] | undefined;
|
|
837
|
+
entry?: string | string[] | undefined;
|
|
838
|
+
project?: string | string[] | undefined;
|
|
839
|
+
} | undefined;
|
|
775
840
|
vercel?: string | boolean | string[] | {
|
|
776
841
|
config?: string | string[] | undefined;
|
|
777
842
|
entry?: string | string[] | undefined;
|
|
@@ -792,6 +857,31 @@ export declare class ConfigurationChief {
|
|
|
792
857
|
entry?: string | string[] | undefined;
|
|
793
858
|
project?: string | string[] | undefined;
|
|
794
859
|
} | undefined;
|
|
860
|
+
'vite-plugin-pages'?: string | boolean | string[] | {
|
|
861
|
+
config?: string | string[] | undefined;
|
|
862
|
+
entry?: string | string[] | undefined;
|
|
863
|
+
project?: string | string[] | undefined;
|
|
864
|
+
} | undefined;
|
|
865
|
+
'vite-plugin-pwa'?: string | boolean | string[] | {
|
|
866
|
+
config?: string | string[] | undefined;
|
|
867
|
+
entry?: string | string[] | undefined;
|
|
868
|
+
project?: string | string[] | undefined;
|
|
869
|
+
} | undefined;
|
|
870
|
+
'vite-plugin-vue-layouts-next'?: string | boolean | string[] | {
|
|
871
|
+
config?: string | string[] | undefined;
|
|
872
|
+
entry?: string | string[] | undefined;
|
|
873
|
+
project?: string | string[] | undefined;
|
|
874
|
+
} | undefined;
|
|
875
|
+
'vite-plus'?: string | boolean | string[] | {
|
|
876
|
+
config?: string | string[] | undefined;
|
|
877
|
+
entry?: string | string[] | undefined;
|
|
878
|
+
project?: string | string[] | undefined;
|
|
879
|
+
} | undefined;
|
|
880
|
+
'vite-pwa-assets-generator'?: string | boolean | string[] | {
|
|
881
|
+
config?: string | string[] | undefined;
|
|
882
|
+
entry?: string | string[] | undefined;
|
|
883
|
+
project?: string | string[] | undefined;
|
|
884
|
+
} | undefined;
|
|
795
885
|
vitepress?: string | boolean | string[] | {
|
|
796
886
|
config?: string | string[] | undefined;
|
|
797
887
|
entry?: string | string[] | undefined;
|
|
@@ -907,7 +997,9 @@ export declare class ConfigurationChief {
|
|
|
907
997
|
docusaurus?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
908
998
|
dotenv?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
909
999
|
drizzle?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1000
|
+
"electron-vite"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
910
1001
|
eleventy?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1002
|
+
esbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
911
1003
|
eslint?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
912
1004
|
eve?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
913
1005
|
execa?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -927,6 +1019,7 @@ export declare class ConfigurationChief {
|
|
|
927
1019
|
karma?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
928
1020
|
knex?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
929
1021
|
ladle?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1022
|
+
"laravel-vite-plugin"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
930
1023
|
lefthook?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
931
1024
|
"lint-staged"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
932
1025
|
linthtml?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -954,6 +1047,7 @@ export declare class ConfigurationChief {
|
|
|
954
1047
|
nodemon?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
955
1048
|
"npm-package-json-lint"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
956
1049
|
nuxt?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1050
|
+
"nuxtjs-i18n"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
957
1051
|
nx?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
958
1052
|
nyc?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
959
1053
|
oclif?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -975,6 +1069,7 @@ export declare class ConfigurationChief {
|
|
|
975
1069
|
preconstruct?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
976
1070
|
prettier?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
977
1071
|
prisma?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1072
|
+
quasar?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
978
1073
|
qwik?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
979
1074
|
raycast?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
980
1075
|
"react-cosmos"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -1013,6 +1108,8 @@ export declare class ConfigurationChief {
|
|
|
1013
1108
|
tailwind?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1014
1109
|
"tanstack-router"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1015
1110
|
taskfile?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1111
|
+
tauri?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1112
|
+
temporal?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1016
1113
|
travis?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1017
1114
|
"ts-node"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1018
1115
|
tsdown?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -1022,10 +1119,21 @@ export declare class ConfigurationChief {
|
|
|
1022
1119
|
typescript?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1023
1120
|
unbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1024
1121
|
unocss?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1122
|
+
"unplugin-auto-import"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1123
|
+
"unplugin-icons"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1124
|
+
"unplugin-vue-components"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1125
|
+
"unplugin-vue-i18n"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1126
|
+
"unplugin-vue-markdown"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1127
|
+
"unplugin-vue-router"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1025
1128
|
vercel?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1026
1129
|
"vercel-og"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1027
1130
|
vike?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1028
1131
|
vite?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1132
|
+
"vite-plugin-pages"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1133
|
+
"vite-plugin-pwa"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1134
|
+
"vite-plugin-vue-layouts-next"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1135
|
+
"vite-plus"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1136
|
+
"vite-pwa-assets-generator"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1029
1137
|
vitepress?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1030
1138
|
vitest?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1031
1139
|
vue?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -58,7 +58,7 @@ export declare class DependencyDeputy {
|
|
|
58
58
|
isPeerOptional: boolean;
|
|
59
59
|
}[];
|
|
60
60
|
getOptionalPeerDependencies(workspaceName: string): DependencySet;
|
|
61
|
-
maybeAddReferencedExternalDependency(workspace: Workspace, packageName: string, isDevOnly?: boolean, isTypeOnly?: boolean): boolean;
|
|
61
|
+
maybeAddReferencedExternalDependency(workspace: Workspace, packageName: string, isDevOnly?: boolean, isTypeOnly?: boolean, isResolved?: boolean): boolean;
|
|
62
62
|
maybeAddReferencedBinary(workspace: Workspace, binaryName: string): Set<string> | undefined;
|
|
63
63
|
private isInDependencies;
|
|
64
64
|
settleDependencyIssues(): {
|
package/dist/DependencyDeputy.js
CHANGED
|
@@ -122,7 +122,7 @@ export class DependencyDeputy {
|
|
|
122
122
|
getOptionalPeerDependencies(workspaceName) {
|
|
123
123
|
return this._manifests.get(workspaceName)?.optionalPeerDependencies ?? new Set();
|
|
124
124
|
}
|
|
125
|
-
maybeAddReferencedExternalDependency(workspace, packageName, isDevOnly, isTypeOnly) {
|
|
125
|
+
maybeAddReferencedExternalDependency(workspace, packageName, isDevOnly, isTypeOnly, isResolved) {
|
|
126
126
|
if (!this.isReportDependencies)
|
|
127
127
|
return true;
|
|
128
128
|
if (isBuiltin(packageName))
|
|
@@ -150,7 +150,7 @@ export class DependencyDeputy {
|
|
|
150
150
|
this.addReferencedDependency(workspace.name, packageName);
|
|
151
151
|
return true;
|
|
152
152
|
}
|
|
153
|
-
if (!this.isStrict) {
|
|
153
|
+
if (!this.isStrict && isResolved !== false) {
|
|
154
154
|
for (const name of workspaceNames) {
|
|
155
155
|
const hosts = this.getHostDependenciesFor(name, packageName);
|
|
156
156
|
if (hosts.length === 0)
|
|
@@ -7,7 +7,7 @@ import type { Paths } from './types/project.ts';
|
|
|
7
7
|
import type { ResolveGlobPattern } from './typescript/resolve-module-names.ts';
|
|
8
8
|
import { SourceFileManager } from './typescript/SourceFileManager.ts';
|
|
9
9
|
import type { MainOptions } from './util/create-options.ts';
|
|
10
|
-
import type { ToSourceFilePath,
|
|
10
|
+
import type { ToSourceFilePath, WorkspacePackageTargetHandler } from './util/to-source-path.ts';
|
|
11
11
|
export declare class ProjectPrincipal {
|
|
12
12
|
entryPaths: Set<string>;
|
|
13
13
|
projectPaths: Set<string>;
|
|
@@ -25,14 +25,14 @@ export declare class ProjectPrincipal {
|
|
|
25
25
|
private extensions;
|
|
26
26
|
cache: CacheConsultant<FileNode>;
|
|
27
27
|
toSourceFilePath: ToSourceFilePath;
|
|
28
|
-
private
|
|
28
|
+
private findWorkspacePackageTarget;
|
|
29
29
|
fileManager: SourceFileManager;
|
|
30
30
|
private resolveModule;
|
|
31
31
|
resolveGlobPattern: ResolveGlobPattern;
|
|
32
32
|
resolvedFiles: Set<string>;
|
|
33
33
|
deletedFiles: Set<string>;
|
|
34
34
|
private onPathAdded;
|
|
35
|
-
constructor(options: MainOptions, toSourceFilePath: ToSourceFilePath,
|
|
35
|
+
constructor(options: MainOptions, toSourceFilePath: ToSourceFilePath, findWorkspacePackageTarget?: WorkspacePackageTargetHandler);
|
|
36
36
|
addCompilers(compilers: [SyncCompilers, AsyncCompilers]): void;
|
|
37
37
|
addPaths(paths: Paths, basePath: string, scope: string): void;
|
|
38
38
|
addRootDirs(rootDirs: string[] | undefined, scope: string): void;
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -35,17 +35,17 @@ export class ProjectPrincipal {
|
|
|
35
35
|
extensions = new Set(DEFAULT_EXTENSIONS);
|
|
36
36
|
cache;
|
|
37
37
|
toSourceFilePath;
|
|
38
|
-
|
|
38
|
+
findWorkspacePackageTarget;
|
|
39
39
|
fileManager;
|
|
40
40
|
resolveModule = () => undefined;
|
|
41
41
|
resolveGlobPattern = pattern => [pattern];
|
|
42
42
|
resolvedFiles = new Set();
|
|
43
43
|
deletedFiles = new Set();
|
|
44
44
|
onPathAdded;
|
|
45
|
-
constructor(options, toSourceFilePath,
|
|
45
|
+
constructor(options, toSourceFilePath, findWorkspacePackageTarget) {
|
|
46
46
|
this.cache = new CacheConsultant('root', options);
|
|
47
47
|
this.toSourceFilePath = toSourceFilePath;
|
|
48
|
-
this.
|
|
48
|
+
this.findWorkspacePackageTarget = findWorkspacePackageTarget;
|
|
49
49
|
this.tsConfigFile = options.tsConfigFile ? toAbsolute(options.tsConfigFile, options.cwd) : undefined;
|
|
50
50
|
this.pluginVisitorObjects.push(createBunShellVisitor(this.pluginCtx));
|
|
51
51
|
this.fileManager = new SourceFileManager({
|
|
@@ -91,7 +91,7 @@ export class ProjectPrincipal {
|
|
|
91
91
|
const customCompilerExtensions = getCompilerExtensions([this.syncCompilers, this.asyncCompilers]);
|
|
92
92
|
const scopedPaths = this.paths.size > 0 ? Array.from(this.paths, ([scope, paths]) => ({ scope, paths })) : undefined;
|
|
93
93
|
const scopedRootDirs = this.rootDirs.size > 0 ? Array.from(this.rootDirs, ([scope, rootDirs]) => ({ scope, rootDirs })) : undefined;
|
|
94
|
-
this.resolveModule = createCustomModuleResolver({ scopedPaths, scopedRootDirs }, customCompilerExtensions, this.toSourceFilePath, this.
|
|
94
|
+
this.resolveModule = createCustomModuleResolver({ scopedPaths, scopedRootDirs }, customCompilerExtensions, this.toSourceFilePath, this.findWorkspacePackageTarget, this.tsConfigFile);
|
|
95
95
|
this.resolveGlobPattern = createGlobAliasResolver(scopedPaths);
|
|
96
96
|
}
|
|
97
97
|
readFile(filePath) {
|
|
@@ -7,7 +7,11 @@ const positionals = new Set(['babel-node', 'esbuild', 'execa', 'jiti', 'oxnode',
|
|
|
7
7
|
const positionalBinaries = new Set(['concurrently']);
|
|
8
8
|
export const resolve = (binary, args, { fromArgs }) => {
|
|
9
9
|
const parsed = parseArgs(args, { boolean: ['quiet', 'verbose'], '--': endOfCommandBinaries.includes(binary) });
|
|
10
|
-
const bin = binary.startsWith('.')
|
|
10
|
+
const bin = binary.startsWith('.') || binary.includes('/')
|
|
11
|
+
? toEntry(binary)
|
|
12
|
+
: isValidBinary(binary)
|
|
13
|
+
? toBinary(binary)
|
|
14
|
+
: undefined;
|
|
11
15
|
const pos = positionals.has(binary) ? [toDeferResolve(parsed._[0])] : [];
|
|
12
16
|
const newCommand = parsed['--'] && parsed['--'].length > 0 ? fromArgs(parsed['--']) : [];
|
|
13
17
|
const commands = positionalBinaries.has(binary) ? parsed._.flatMap(cmd => fromArgs([cmd])) : [];
|
|
@@ -2,6 +2,7 @@ import parseArgs from '../../util/parse-args.js';
|
|
|
2
2
|
import { toBinary, toEntry } from '../../util/input.js';
|
|
3
3
|
import { isAbsolute, join } from '../../util/path.js';
|
|
4
4
|
import { _resolveSync } from '../../util/resolve.js';
|
|
5
|
+
import { argsAfter, expandScript } from '../util.js';
|
|
5
6
|
import { resolveX } from './bunx.js';
|
|
6
7
|
const commands = new Set([
|
|
7
8
|
'add',
|
|
@@ -59,10 +60,12 @@ export const resolve = (_binary, args, options) => {
|
|
|
59
60
|
return [binary, ...resolveX(argsForX, options)];
|
|
60
61
|
}
|
|
61
62
|
const { manifest, cwd, fromArgs } = options;
|
|
62
|
-
if (command === 'run' && manifest.scriptNames.has(script))
|
|
63
|
-
return [binary];
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
if (command === 'run' && manifest.scriptNames.has(script)) {
|
|
64
|
+
return [binary, ...(expandScript(script, argsAfter(args, script), manifest.scripts, options) ?? [])];
|
|
65
|
+
}
|
|
66
|
+
if (manifest.scriptNames.has(command)) {
|
|
67
|
+
return [binary, ...(expandScript(command, argsAfter(args, command), manifest.scripts, options) ?? [])];
|
|
68
|
+
}
|
|
66
69
|
if (command !== 'run' && commands.has(command))
|
|
67
70
|
return [binary];
|
|
68
71
|
const filePath = command === 'run' ? script : command;
|
|
@@ -74,5 +77,10 @@ export const resolve = (_binary, args, options) => {
|
|
|
74
77
|
return [binary, toEntry(resolved)];
|
|
75
78
|
const dir = parsed.cwd ? join(cwd, parsed.cwd) : undefined;
|
|
76
79
|
const opts = dir ? { cwd: dir } : {};
|
|
77
|
-
|
|
80
|
+
if (command !== 'run')
|
|
81
|
+
return [binary, ...fromArgs(args, opts)];
|
|
82
|
+
const input = toBinary(filePath, { optional: true });
|
|
83
|
+
if (dir)
|
|
84
|
+
input.dir = dir;
|
|
85
|
+
return [binary, input];
|
|
78
86
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import parseArgs from '../../util/parse-args.js';
|
|
2
|
+
import { expandScript } from '../util.js';
|
|
2
3
|
export const resolve = (_binary, args, options) => {
|
|
3
4
|
const { fromArgs, manifest } = options;
|
|
4
5
|
const parsed = parseArgs(args, { '--': true });
|
|
@@ -6,7 +7,8 @@ export const resolve = (_binary, args, options) => {
|
|
|
6
7
|
const _childArgs = parsed['--'] && parsed['--'].length > 0 ? fromArgs(parsed['--'], { knownBinsOnly: true }) : [];
|
|
7
8
|
if (command === 'exec')
|
|
8
9
|
return _childArgs;
|
|
9
|
-
if (command === 'run' && manifest.scriptNames.has(script))
|
|
10
|
-
return _childArgs;
|
|
10
|
+
if (command === 'run' && manifest.scriptNames.has(script)) {
|
|
11
|
+
return expandScript(script, parsed['--'] ?? [], manifest.scripts, options) ?? _childArgs;
|
|
12
|
+
}
|
|
11
13
|
return [];
|
|
12
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import parseArgs from '../../util/parse-args.js';
|
|
2
2
|
import { toBinary } from '../../util/input.js';
|
|
3
3
|
import { isValidBinary } from '../../util/modules.js';
|
|
4
|
+
import { argsAfter, expandScript } from '../util.js';
|
|
4
5
|
import { resolveDlx } from './pnpx.js';
|
|
5
6
|
const commands = [
|
|
6
7
|
'add',
|
|
@@ -98,8 +99,17 @@ export const resolve = (_binary, args, options) => {
|
|
|
98
99
|
if (command === 'exec') {
|
|
99
100
|
return childInputs.length > 0 ? childInputs : fromArgs(parsed._.slice(1));
|
|
100
101
|
}
|
|
102
|
+
if (command === 'run') {
|
|
103
|
+
const script = parsed._[1];
|
|
104
|
+
if (script && manifest.scriptNames.has(script)) {
|
|
105
|
+
return expandScript(script, argsAfter(args, script), manifest.scripts, options) ?? childInputs;
|
|
106
|
+
}
|
|
107
|
+
return childInputs;
|
|
108
|
+
}
|
|
101
109
|
const isScript = manifest.scriptNames.has(command);
|
|
102
|
-
if (isScript
|
|
110
|
+
if (isScript)
|
|
111
|
+
return expandScript(command, argsAfter(args, command), manifest.scripts, options) ?? childInputs;
|
|
112
|
+
if (commands.includes(command))
|
|
103
113
|
return childInputs;
|
|
104
114
|
return command && isValidBinary(command) ? [toBinary(command)] : [];
|
|
105
115
|
};
|
|
@@ -2,7 +2,7 @@ import parseArgs from '../../util/parse-args.js';
|
|
|
2
2
|
import { isBinary, isDependency, toBinary, toDependency } from '../../util/input.js';
|
|
3
3
|
import { stripVersionFromSpecifier } from '../../util/modules.js';
|
|
4
4
|
import { join } from '../../util/path.js';
|
|
5
|
-
import { argsFrom } from '../util.js';
|
|
5
|
+
import { argsAfter, argsFrom, expandScript } from '../util.js';
|
|
6
6
|
const commands = [
|
|
7
7
|
'add',
|
|
8
8
|
'bin',
|
|
@@ -58,8 +58,10 @@ export const resolve = (_binary, args, options) => {
|
|
|
58
58
|
const dirManifest = (dir && getManifest(dir)) || manifest;
|
|
59
59
|
const _childArgs = parsed['--'] && parsed['--'].length > 0 ? fromArgs(parsed['--'], { knownBinsOnly: true }) : [];
|
|
60
60
|
if (command === 'run') {
|
|
61
|
-
if (dirManifest.scriptNames.has(binary))
|
|
62
|
-
|
|
61
|
+
if (dirManifest.scriptNames.has(binary)) {
|
|
62
|
+
const opts = dir ? { cwd: dir, manifest: dirManifest } : {};
|
|
63
|
+
return expandScript(binary, argsAfter(args, binary), dirManifest.scripts, options, opts) ?? _childArgs;
|
|
64
|
+
}
|
|
63
65
|
const bin = toBinary(binary, { optional: true });
|
|
64
66
|
if (dir)
|
|
65
67
|
Object.assign(bin, { dir });
|
|
@@ -71,7 +73,11 @@ export const resolve = (_binary, args, options) => {
|
|
|
71
73
|
const argsForDlx = args.filter(arg => arg !== 'dlx');
|
|
72
74
|
return resolveDlx(argsForDlx, options);
|
|
73
75
|
}
|
|
74
|
-
if (dirManifest.scriptNames.has(command)
|
|
76
|
+
if (dirManifest.scriptNames.has(command)) {
|
|
77
|
+
const opts = dir ? { cwd: dir, manifest: dirManifest } : {};
|
|
78
|
+
return expandScript(command, argsAfter(args, command), dirManifest.scripts, options, opts) ?? _childArgs;
|
|
79
|
+
}
|
|
80
|
+
if (commands.includes(command))
|
|
75
81
|
return _childArgs;
|
|
76
82
|
const opts = dir ? { cwd: dir } : {};
|
|
77
83
|
return fromArgs(argsFrom(args, command === 'exec' ? binary : command), opts);
|
package/dist/binaries/util.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import type { BinaryResolverOptions, GetInputsFromScriptsOptions } from '../types/config.ts';
|
|
2
|
+
import type { Input } from '../util/input.ts';
|
|
1
3
|
export declare const argsFrom: (args: string[], from: string) => string[];
|
|
4
|
+
export declare const argsAfter: (args: string[], token: string) => string[];
|
|
5
|
+
export declare const expandScript: (name: string, forwardedArgs: string[], scripts: Record<string, string> | undefined, options: BinaryResolverOptions, opts?: Partial<GetInputsFromScriptsOptions>) => Input[] | undefined;
|
|
2
6
|
export declare const parseNodeArgs: (args: string[]) => import("../util/parse-args.ts").ParsedArgs;
|
package/dist/binaries/util.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import parseArgs from '../util/parse-args.js';
|
|
2
2
|
export const argsFrom = (args, from) => args.slice(args.indexOf(from));
|
|
3
|
+
export const argsAfter = (args, token) => {
|
|
4
|
+
const index = args.indexOf(token);
|
|
5
|
+
return index === -1 ? [] : args.slice(index + 1).filter(arg => arg !== '--');
|
|
6
|
+
};
|
|
7
|
+
export const expandScript = (name, forwardedArgs, scripts, options, opts = {}) => {
|
|
8
|
+
const source = scripts?.[name];
|
|
9
|
+
if (!source || forwardedArgs.length === 0)
|
|
10
|
+
return;
|
|
11
|
+
const expandedScripts = options.expandedScripts ?? new Set();
|
|
12
|
+
if (expandedScripts.has(name))
|
|
13
|
+
return;
|
|
14
|
+
expandedScripts.add(name);
|
|
15
|
+
return options.fromArgs([source, ...forwardedArgs], { ...opts, expandedScripts });
|
|
16
|
+
};
|
|
3
17
|
export const parseNodeArgs = (args) => parseArgs(args, {
|
|
4
18
|
string: ['r'],
|
|
5
19
|
alias: { require: ['r', 'loader', 'experimental-loader', 'test-reporter', 'watch', 'import'] },
|