knip 6.24.0 → 6.26.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 +115 -1
- package/dist/ConfigurationChief.js +3 -0
- package/dist/ProjectPrincipal.d.ts +2 -0
- package/dist/ProjectPrincipal.js +4 -1
- package/dist/binaries/bash-parser.js +55 -83
- package/dist/binaries/index.js +3 -0
- package/dist/compilers/index.d.ts +199 -5
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +18 -0
- package/dist/graph/analyze.js +37 -2
- package/dist/graph/build.js +17 -3
- package/dist/graph-explorer/explorer.d.ts +1 -0
- package/dist/graph-explorer/explorer.js +2 -0
- package/dist/graph-explorer/operations/find-all-cycles.d.ts +3 -0
- package/dist/graph-explorer/operations/find-all-cycles.js +43 -0
- package/dist/graph-explorer/operations/find-cycles.js +3 -9
- package/dist/graph-explorer/utils.d.ts +10 -1
- package/dist/graph-explorer/utils.js +53 -0
- package/dist/plugins/_vue/auto-import.d.ts +12 -0
- package/dist/plugins/_vue/auto-import.js +272 -0
- package/dist/plugins/_vue/types.d.ts +38 -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/bun/index.js +28 -14
- 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/eve/index.d.ts +3 -0
- package/dist/plugins/eve/index.js +22 -0
- package/dist/plugins/execa/visitors/execa.js +10 -18
- package/dist/plugins/fumadocs/index.d.ts +3 -0
- package/dist/plugins/fumadocs/index.js +18 -0
- package/dist/plugins/graphql-codegen/index.js +9 -7
- package/dist/plugins/index.d.ts +19 -0
- package/dist/plugins/index.js +38 -0
- package/dist/plugins/jest/index.js +13 -3
- 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 +25 -12
- 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/node/index.js +4 -1
- 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 +22 -1
- package/dist/plugins/pnpm/types.d.ts +4 -0
- package/dist/plugins/pnpm/types.js +1 -0
- package/dist/plugins/prettier/index.js +19 -3
- package/dist/plugins/prettier/types.d.ts +6 -1
- 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/rolldown/index.js +2 -5
- package/dist/plugins/rollup/index.js +2 -5
- package/dist/plugins/rslib/index.js +2 -5
- package/dist/plugins/rspack/index.js +5 -0
- package/dist/plugins/serverless-framework/index.js +12 -1
- package/dist/plugins/serverless-framework/types.d.ts +5 -2
- 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 +10 -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/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/tsdown/index.js +2 -5
- package/dist/plugins/tsup/index.js +2 -5
- package/dist/plugins/typedoc/index.js +9 -3
- package/dist/plugins/typedoc/types.d.ts +2 -0
- 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/visitors/importMetaGlob.js +1 -8
- 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 +4 -0
- package/dist/plugins/vitest/types.d.ts +3 -0
- package/dist/plugins/vue/index.js +5 -3
- package/dist/plugins/webpack/visitors/requireContext.js +2 -13
- package/dist/plugins/yarn/index.js +14 -4
- package/dist/plugins/yarn/types.d.ts +8 -0
- package/dist/plugins/yarn/types.js +1 -0
- package/dist/plugins/zx/visitors/zx.js +4 -4
- package/dist/reporters/cycles.d.ts +3 -0
- package/dist/reporters/cycles.js +79 -0
- package/dist/reporters/index.d.ts +1 -0
- package/dist/reporters/index.js +2 -0
- package/dist/reporters/json.d.ts +3 -0
- package/dist/reporters/json.js +2 -1
- package/dist/reporters/util/util.d.ts +3 -1
- package/dist/reporters/util/util.js +5 -1
- package/dist/schema/configuration.d.ts +295 -6
- package/dist/schema/configuration.js +6 -0
- package/dist/schema/plugins.d.ts +95 -0
- package/dist/schema/plugins.js +19 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +19 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/issues.d.ts +3 -0
- package/dist/types/module-graph.d.ts +7 -0
- package/dist/types/package-json.d.ts +8 -1
- package/dist/typescript/ast-helpers.d.ts +7 -2
- package/dist/typescript/ast-helpers.js +36 -8
- package/dist/typescript/ast-nodes.d.ts +4 -1
- package/dist/typescript/ast-nodes.js +17 -1
- package/dist/typescript/get-imports-and-exports.js +10 -0
- package/dist/typescript/glob-imports.d.ts +3 -0
- package/dist/typescript/glob-imports.js +49 -0
- package/dist/typescript/resolve-module-names.d.ts +2 -0
- package/dist/typescript/resolve-module-names.js +35 -1
- package/dist/typescript/visitors/calls.js +4 -6
- package/dist/typescript/visitors/imports.js +8 -8
- package/dist/typescript/visitors/script-visitors.js +4 -4
- package/dist/typescript/visitors/walk.js +2 -3
- package/dist/util/cli-arguments.d.ts +2 -1
- package/dist/util/cli-arguments.js +5 -3
- package/dist/util/create-options.d.ts +202 -5
- package/dist/util/create-options.js +4 -1
- package/dist/util/get-included-issue-types.d.ts +1 -0
- package/dist/util/get-included-issue-types.js +4 -2
- package/dist/util/issue-initializers.js +1 -1
- package/dist/util/load-tsconfig.js +17 -4
- package/dist/util/module-graph.js +1 -0
- package/dist/util/modules.js +25 -4
- package/dist/util/resolve.js +4 -1
- package/dist/util/scripts.d.ts +7 -0
- package/dist/util/scripts.js +75 -0
- package/dist/util/to-source-path.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +108 -1
- 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
|
@@ -23,12 +23,17 @@ const issueTypeSchema = z.union([
|
|
|
23
23
|
z.literal('enumMembers'),
|
|
24
24
|
z.literal('namespaceMembers'),
|
|
25
25
|
z.literal('catalog'),
|
|
26
|
+
z.literal('cycles'),
|
|
26
27
|
]);
|
|
27
28
|
const rulesSchema = z.partialRecord(issueTypeSchema, z.enum(['error', 'warn', 'off']));
|
|
28
29
|
const ignorableSymbolTypes = Object.values(SYMBOL_TYPE).filter(type => type !== 'unknown');
|
|
29
30
|
const ignoreExportsUsedInFileObjectSchema = z.strictObject(Object.fromEntries(ignorableSymbolTypes.map(type => [type, z.optional(z.boolean())])));
|
|
30
31
|
const ignoreExportsUsedInFileSchema = z.union([z.boolean(), ignoreExportsUsedInFileObjectSchema]);
|
|
31
32
|
const ignoreIssuesSchema = z.record(z.string(), z.array(issueTypeSchema));
|
|
33
|
+
const cyclesSchema = z.strictObject({
|
|
34
|
+
allow: z.optional(z.array(z.array(z.string()))),
|
|
35
|
+
dynamicImports: z.optional(z.boolean()),
|
|
36
|
+
});
|
|
32
37
|
const rootConfigurationSchema = z.object({
|
|
33
38
|
$schema: z.optional(z.string()),
|
|
34
39
|
rules: z.optional(rulesSchema),
|
|
@@ -43,6 +48,7 @@ const rootConfigurationSchema = z.object({
|
|
|
43
48
|
ignoreUnresolved: z.optional(stringOrRegexSchema),
|
|
44
49
|
ignoreExportsUsedInFile: z.optional(ignoreExportsUsedInFileSchema),
|
|
45
50
|
ignoreIssues: z.optional(ignoreIssuesSchema),
|
|
51
|
+
cycles: z.optional(cyclesSchema),
|
|
46
52
|
ignoreWorkspaces: z.optional(z.array(z.string())),
|
|
47
53
|
includeEntryExports: z.optional(z.boolean()),
|
|
48
54
|
compilers: z.optional(compilersSchema),
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -146,16 +146,31 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
146
146
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
147
147
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
148
148
|
}, z.core.$strip>]>;
|
|
149
|
+
'electron-vite': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
150
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
151
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
152
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
153
|
+
}, z.core.$strip>]>;
|
|
149
154
|
eleventy: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
150
155
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
151
156
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
152
157
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
153
158
|
}, z.core.$strip>]>;
|
|
159
|
+
esbuild: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
160
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
161
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
162
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
163
|
+
}, z.core.$strip>]>;
|
|
154
164
|
eslint: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
155
165
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
156
166
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
157
167
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
158
168
|
}, z.core.$strip>]>;
|
|
169
|
+
eve: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
170
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
171
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
172
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
173
|
+
}, z.core.$strip>]>;
|
|
159
174
|
execa: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
160
175
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
161
176
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -176,6 +191,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
176
191
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
177
192
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
178
193
|
}, z.core.$strip>]>;
|
|
194
|
+
fumadocs: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
195
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
196
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
197
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
198
|
+
}, z.core.$strip>]>;
|
|
179
199
|
gatsby: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
180
200
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
181
201
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -236,6 +256,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
236
256
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
237
257
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
238
258
|
}, z.core.$strip>]>;
|
|
259
|
+
'laravel-vite-plugin': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
260
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
261
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
262
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
263
|
+
}, z.core.$strip>]>;
|
|
239
264
|
lefthook: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
240
265
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
241
266
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -371,6 +396,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
371
396
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
372
397
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
373
398
|
}, z.core.$strip>]>;
|
|
399
|
+
'nuxtjs-i18n': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
400
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
401
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
402
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
403
|
+
}, z.core.$strip>]>;
|
|
374
404
|
nx: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
375
405
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
376
406
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -476,6 +506,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
476
506
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
477
507
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
478
508
|
}, z.core.$strip>]>;
|
|
509
|
+
quasar: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
510
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
511
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
512
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
513
|
+
}, z.core.$strip>]>;
|
|
479
514
|
qwik: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
480
515
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
481
516
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -666,6 +701,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
666
701
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
667
702
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
668
703
|
}, z.core.$strip>]>;
|
|
704
|
+
tauri: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
705
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
706
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
707
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
708
|
+
}, z.core.$strip>]>;
|
|
669
709
|
travis: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
670
710
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
671
711
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -711,6 +751,36 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
711
751
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
712
752
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
713
753
|
}, z.core.$strip>]>;
|
|
754
|
+
'unplugin-auto-import': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
755
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
756
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
757
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
758
|
+
}, z.core.$strip>]>;
|
|
759
|
+
'unplugin-icons': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
760
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
761
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
762
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
763
|
+
}, z.core.$strip>]>;
|
|
764
|
+
'unplugin-vue-components': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
765
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
766
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
767
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
768
|
+
}, z.core.$strip>]>;
|
|
769
|
+
'unplugin-vue-i18n': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
770
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
771
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
772
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
773
|
+
}, z.core.$strip>]>;
|
|
774
|
+
'unplugin-vue-markdown': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
775
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
776
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
777
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
778
|
+
}, z.core.$strip>]>;
|
|
779
|
+
'unplugin-vue-router': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
780
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
781
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
782
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
783
|
+
}, z.core.$strip>]>;
|
|
714
784
|
vercel: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
715
785
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
716
786
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -731,6 +801,31 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
731
801
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
732
802
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
733
803
|
}, z.core.$strip>]>;
|
|
804
|
+
'vite-plugin-pages': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
805
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
806
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
807
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
808
|
+
}, z.core.$strip>]>;
|
|
809
|
+
'vite-plugin-pwa': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
810
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
811
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
812
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
813
|
+
}, z.core.$strip>]>;
|
|
814
|
+
'vite-plugin-vue-layouts-next': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
815
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
816
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
817
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
818
|
+
}, z.core.$strip>]>;
|
|
819
|
+
'vite-plus': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
820
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
821
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
822
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
823
|
+
}, z.core.$strip>]>;
|
|
824
|
+
'vite-pwa-assets-generator': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
825
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
826
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
827
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
828
|
+
}, z.core.$strip>]>;
|
|
734
829
|
vitepress: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
735
830
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
736
831
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -38,12 +38,16 @@ export const pluginsSchema = z.object({
|
|
|
38
38
|
docusaurus: pluginSchema,
|
|
39
39
|
dotenv: pluginSchema,
|
|
40
40
|
drizzle: pluginSchema,
|
|
41
|
+
'electron-vite': pluginSchema,
|
|
41
42
|
eleventy: pluginSchema,
|
|
43
|
+
esbuild: pluginSchema,
|
|
42
44
|
eslint: pluginSchema,
|
|
45
|
+
eve: pluginSchema,
|
|
43
46
|
execa: pluginSchema,
|
|
44
47
|
expo: pluginSchema,
|
|
45
48
|
'expressive-code': pluginSchema,
|
|
46
49
|
fast: pluginSchema,
|
|
50
|
+
fumadocs: pluginSchema,
|
|
47
51
|
gatsby: pluginSchema,
|
|
48
52
|
'github-action': pluginSchema,
|
|
49
53
|
'github-actions': pluginSchema,
|
|
@@ -56,6 +60,7 @@ export const pluginsSchema = z.object({
|
|
|
56
60
|
karma: pluginSchema,
|
|
57
61
|
knex: pluginSchema,
|
|
58
62
|
ladle: pluginSchema,
|
|
63
|
+
'laravel-vite-plugin': pluginSchema,
|
|
59
64
|
lefthook: pluginSchema,
|
|
60
65
|
'lint-staged': pluginSchema,
|
|
61
66
|
linthtml: pluginSchema,
|
|
@@ -83,6 +88,7 @@ export const pluginsSchema = z.object({
|
|
|
83
88
|
nodemon: pluginSchema,
|
|
84
89
|
'npm-package-json-lint': pluginSchema,
|
|
85
90
|
nuxt: pluginSchema,
|
|
91
|
+
'nuxtjs-i18n': pluginSchema,
|
|
86
92
|
nx: pluginSchema,
|
|
87
93
|
nyc: pluginSchema,
|
|
88
94
|
oclif: pluginSchema,
|
|
@@ -104,6 +110,7 @@ export const pluginsSchema = z.object({
|
|
|
104
110
|
preconstruct: pluginSchema,
|
|
105
111
|
prettier: pluginSchema,
|
|
106
112
|
prisma: pluginSchema,
|
|
113
|
+
quasar: pluginSchema,
|
|
107
114
|
qwik: pluginSchema,
|
|
108
115
|
raycast: pluginSchema,
|
|
109
116
|
'react-cosmos': pluginSchema,
|
|
@@ -142,6 +149,7 @@ export const pluginsSchema = z.object({
|
|
|
142
149
|
tailwind: pluginSchema,
|
|
143
150
|
'tanstack-router': pluginSchema,
|
|
144
151
|
taskfile: pluginSchema,
|
|
152
|
+
tauri: pluginSchema,
|
|
145
153
|
travis: pluginSchema,
|
|
146
154
|
'ts-node': pluginSchema,
|
|
147
155
|
tsdown: pluginSchema,
|
|
@@ -151,10 +159,21 @@ export const pluginsSchema = z.object({
|
|
|
151
159
|
typescript: pluginSchema,
|
|
152
160
|
unbuild: pluginSchema,
|
|
153
161
|
unocss: pluginSchema,
|
|
162
|
+
'unplugin-auto-import': pluginSchema,
|
|
163
|
+
'unplugin-icons': pluginSchema,
|
|
164
|
+
'unplugin-vue-components': pluginSchema,
|
|
165
|
+
'unplugin-vue-i18n': pluginSchema,
|
|
166
|
+
'unplugin-vue-markdown': pluginSchema,
|
|
167
|
+
'unplugin-vue-router': pluginSchema,
|
|
154
168
|
vercel: pluginSchema,
|
|
155
169
|
'vercel-og': pluginSchema,
|
|
156
170
|
vike: pluginSchema,
|
|
157
171
|
vite: pluginSchema,
|
|
172
|
+
'vite-plugin-pages': pluginSchema,
|
|
173
|
+
'vite-plugin-pwa': pluginSchema,
|
|
174
|
+
'vite-plugin-vue-layouts-next': pluginSchema,
|
|
175
|
+
'vite-plus': pluginSchema,
|
|
176
|
+
'vite-pwa-assets-generator': pluginSchema,
|
|
158
177
|
vitepress: pluginSchema,
|
|
159
178
|
vitest: pluginSchema,
|
|
160
179
|
vue: pluginSchema,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'fast', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
@@ -27,12 +27,16 @@ export const pluginNames = [
|
|
|
27
27
|
'docusaurus',
|
|
28
28
|
'dotenv',
|
|
29
29
|
'drizzle',
|
|
30
|
+
'electron-vite',
|
|
30
31
|
'eleventy',
|
|
32
|
+
'esbuild',
|
|
31
33
|
'eslint',
|
|
34
|
+
'eve',
|
|
32
35
|
'execa',
|
|
33
36
|
'expo',
|
|
34
37
|
'expressive-code',
|
|
35
38
|
'fast',
|
|
39
|
+
'fumadocs',
|
|
36
40
|
'gatsby',
|
|
37
41
|
'github-action',
|
|
38
42
|
'github-actions',
|
|
@@ -45,6 +49,7 @@ export const pluginNames = [
|
|
|
45
49
|
'karma',
|
|
46
50
|
'knex',
|
|
47
51
|
'ladle',
|
|
52
|
+
'laravel-vite-plugin',
|
|
48
53
|
'lefthook',
|
|
49
54
|
'lint-staged',
|
|
50
55
|
'linthtml',
|
|
@@ -72,6 +77,7 @@ export const pluginNames = [
|
|
|
72
77
|
'nodemon',
|
|
73
78
|
'npm-package-json-lint',
|
|
74
79
|
'nuxt',
|
|
80
|
+
'nuxtjs-i18n',
|
|
75
81
|
'nx',
|
|
76
82
|
'nyc',
|
|
77
83
|
'oclif',
|
|
@@ -93,6 +99,7 @@ export const pluginNames = [
|
|
|
93
99
|
'preconstruct',
|
|
94
100
|
'prettier',
|
|
95
101
|
'prisma',
|
|
102
|
+
'quasar',
|
|
96
103
|
'qwik',
|
|
97
104
|
'raycast',
|
|
98
105
|
'react-cosmos',
|
|
@@ -131,6 +138,7 @@ export const pluginNames = [
|
|
|
131
138
|
'tailwind',
|
|
132
139
|
'tanstack-router',
|
|
133
140
|
'taskfile',
|
|
141
|
+
'tauri',
|
|
134
142
|
'travis',
|
|
135
143
|
'ts-node',
|
|
136
144
|
'tsdown',
|
|
@@ -140,10 +148,21 @@ export const pluginNames = [
|
|
|
140
148
|
'typescript',
|
|
141
149
|
'unbuild',
|
|
142
150
|
'unocss',
|
|
151
|
+
'unplugin-auto-import',
|
|
152
|
+
'unplugin-icons',
|
|
153
|
+
'unplugin-vue-components',
|
|
154
|
+
'unplugin-vue-i18n',
|
|
155
|
+
'unplugin-vue-markdown',
|
|
156
|
+
'unplugin-vue-router',
|
|
143
157
|
'vercel',
|
|
144
158
|
'vercel-og',
|
|
145
159
|
'vike',
|
|
146
160
|
'vite',
|
|
161
|
+
'vite-plugin-pages',
|
|
162
|
+
'vite-plugin-pwa',
|
|
163
|
+
'vite-plugin-vue-layouts-next',
|
|
164
|
+
'vite-plus',
|
|
165
|
+
'vite-pwa-assets-generator',
|
|
147
166
|
'vitepress',
|
|
148
167
|
'vitest',
|
|
149
168
|
'vue',
|
package/dist/types/config.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export type IgnorePatterns = (string | RegExp)[];
|
|
|
30
30
|
type IgnorableExport = Exclude<SymbolType, 'unknown'>;
|
|
31
31
|
export type IgnoreExportsUsedInFile = boolean | Partial<Record<IgnorableExport, boolean>>;
|
|
32
32
|
export type IgnoreIssues = Record<string, IssueType[]>;
|
|
33
|
+
export type CyclesConfig = {
|
|
34
|
+
allow?: string[][];
|
|
35
|
+
dynamicImports?: boolean;
|
|
36
|
+
};
|
|
33
37
|
export type GetImportsAndExportsOptions = {
|
|
34
38
|
skipTypeOnly: boolean;
|
|
35
39
|
isFixExports: boolean;
|
|
@@ -43,6 +47,7 @@ export interface Configuration {
|
|
|
43
47
|
ignoreDependencies: IgnorePatterns;
|
|
44
48
|
ignoreExportsUsedInFile: IgnoreExportsUsedInFile;
|
|
45
49
|
ignoreFiles: NormalizedGlob;
|
|
50
|
+
cycles: CyclesConfig;
|
|
46
51
|
ignoreIssues: IgnoreIssues;
|
|
47
52
|
ignoreMembers: IgnorePatterns;
|
|
48
53
|
ignoreUnresolved: IgnorePatterns;
|
|
@@ -130,6 +135,10 @@ export type PluginVisitorContext = {
|
|
|
130
135
|
sourceText: string;
|
|
131
136
|
addScript: (script: string) => void;
|
|
132
137
|
addImport: (specifier: string, pos: number, modifiers: number) => void;
|
|
138
|
+
addImportGlob: (patterns: string[], options?: {
|
|
139
|
+
base?: string;
|
|
140
|
+
filter?: RegExp;
|
|
141
|
+
}) => void;
|
|
133
142
|
markExportRegistered: (name: string) => void;
|
|
134
143
|
};
|
|
135
144
|
export type PluginVisitorObject = VisitorObject;
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { Fixes } from './exports.ts';
|
|
|
3
3
|
export type SymbolType = (typeof SYMBOL_TYPE)[keyof typeof SYMBOL_TYPE];
|
|
4
4
|
export interface IssueSymbol {
|
|
5
5
|
symbol: string;
|
|
6
|
+
kind?: string;
|
|
7
|
+
specifier?: string;
|
|
6
8
|
pos?: number;
|
|
7
9
|
line?: number;
|
|
8
10
|
col?: number;
|
|
@@ -40,6 +42,7 @@ export type Issues = {
|
|
|
40
42
|
enumMembers: IssueRecords;
|
|
41
43
|
namespaceMembers: IssueRecords;
|
|
42
44
|
catalog: IssueRecords;
|
|
45
|
+
cycles: IssueRecords;
|
|
43
46
|
};
|
|
44
47
|
export type IssueType = keyof Issues;
|
|
45
48
|
export type Report = {
|
|
@@ -29,6 +29,7 @@ export interface Import extends Position {
|
|
|
29
29
|
readonly filePath: string | undefined;
|
|
30
30
|
readonly identifier: string | undefined;
|
|
31
31
|
readonly isTypeOnly: boolean;
|
|
32
|
+
readonly modifiers: number;
|
|
32
33
|
}
|
|
33
34
|
export interface ExternalRef {
|
|
34
35
|
readonly specifier: string;
|
|
@@ -68,8 +69,14 @@ export type FileNode = {
|
|
|
68
69
|
exports: ExportMap;
|
|
69
70
|
duplicates: Iterable<Array<IssueSymbol>>;
|
|
70
71
|
scripts: Set<string>;
|
|
72
|
+
importGlobs: ImportGlob[];
|
|
71
73
|
importedBy: undefined | ImportMaps;
|
|
72
74
|
internalImportCache: undefined | ImportMap;
|
|
73
75
|
};
|
|
76
|
+
export interface ImportGlob {
|
|
77
|
+
patterns: string[];
|
|
78
|
+
base?: string;
|
|
79
|
+
filter?: RegExp;
|
|
80
|
+
}
|
|
74
81
|
export type ModuleGraph = Map<FilePath, FileNode>;
|
|
75
82
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PluginMap, WorkspaceConfiguration } from './config.ts';
|
|
2
2
|
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
3
3
|
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
4
|
-
type Dependencies = Record<string, string>;
|
|
5
4
|
type C = 'import' | 'require' | 'node' | 'node-addons' | 'deno' | 'browser' | 'electron' | 'react-native' | 'default';
|
|
6
5
|
type ExportCondition = LiteralUnion<C, string>;
|
|
7
6
|
type Exports = null | string | string[] | {
|
|
@@ -25,6 +24,13 @@ type Plugins = PluginConfig<PluginMap>;
|
|
|
25
24
|
export type Scripts = Record<string, string>;
|
|
26
25
|
export type Catalog = Record<string, string>;
|
|
27
26
|
export type Catalogs = Record<string, Catalog>;
|
|
27
|
+
type Dependencies = Record<string, string>;
|
|
28
|
+
export type PackageExtensions = Record<string, {
|
|
29
|
+
peerDependencies?: Dependencies;
|
|
30
|
+
peerDependenciesMeta?: Record<string, {
|
|
31
|
+
optional?: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
28
34
|
export type PackageJson = {
|
|
29
35
|
name?: string;
|
|
30
36
|
main?: string;
|
|
@@ -57,6 +63,7 @@ export type PackageJson = {
|
|
|
57
63
|
engines?: Record<string, string>;
|
|
58
64
|
pnpm?: {
|
|
59
65
|
overrides?: Dependencies;
|
|
66
|
+
packageExtensions?: PackageExtensions;
|
|
60
67
|
};
|
|
61
68
|
knip?: WorkspaceConfiguration;
|
|
62
69
|
} & Plugins;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type { ParseResult, Program } from 'oxc-parser';
|
|
1
|
+
import type { CallExpression, ParseResult, Program } from 'oxc-parser';
|
|
2
2
|
export declare const getPropertyKey: (prop: any) => string | undefined;
|
|
3
3
|
export declare const getImportMap: (program: Program) => Map<string, string>;
|
|
4
|
-
export declare const getDefaultImportName: (importMap: Map<string, string>, specifier: string) => string | undefined;
|
|
5
4
|
export declare const getPropertyValues: (node: any, propertyName: string) => Set<string>;
|
|
6
5
|
export declare const collectPropertyValues: (program: Program, propertyName: string) => Set<string>;
|
|
6
|
+
export declare const getFirstPropertyValue: (node: any, propertyName: string) => string | undefined;
|
|
7
|
+
export declare const collectFirstPropertyValue: (program: Program, propertyName: string) => string | undefined;
|
|
7
8
|
export declare const resolveObjectArg: (arg: any) => any | undefined;
|
|
9
|
+
type ModuleMatch = string | string[] | ((path: string) => boolean);
|
|
10
|
+
export declare const findImportedCalls: (program: Program, module: ModuleMatch) => CallExpression[];
|
|
11
|
+
export declare const findImportedCallArg: (program: Program, module: ModuleMatch) => any | undefined;
|
|
8
12
|
export declare const findCallArg: (program: Program, fnName: string) => any | undefined;
|
|
9
13
|
export declare const findProperty: (node: any, name: string) => any | undefined;
|
|
10
14
|
export declare const getStringValues: (node: any) => Set<string>;
|
|
11
15
|
export declare const isExternalReExportsOnly: (result: ParseResult) => boolean;
|
|
12
16
|
export declare const hasImportSpecifier: (program: Program, modulePath: string, specifierName: string) => boolean;
|
|
13
17
|
export declare const collectStringLiterals: (sourceText: string, filePath: string) => Set<string>;
|
|
18
|
+
export {};
|
|
@@ -34,12 +34,6 @@ export const getImportMap = (program) => {
|
|
|
34
34
|
}
|
|
35
35
|
return importMap;
|
|
36
36
|
};
|
|
37
|
-
export const getDefaultImportName = (importMap, specifier) => {
|
|
38
|
-
for (const [name, path] of importMap) {
|
|
39
|
-
if (path === specifier)
|
|
40
|
-
return name;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
37
|
const addStringValue = (values, node) => {
|
|
44
38
|
const value = getStringValue(node);
|
|
45
39
|
if (value != null)
|
|
@@ -52,8 +46,7 @@ export const getPropertyValues = (node, propertyName) => {
|
|
|
52
46
|
for (const prop of node.properties ?? []) {
|
|
53
47
|
if (prop.type !== 'Property')
|
|
54
48
|
continue;
|
|
55
|
-
|
|
56
|
-
if (name !== propertyName)
|
|
49
|
+
if (getPropertyKey(prop) !== propertyName)
|
|
57
50
|
continue;
|
|
58
51
|
const init = prop.value;
|
|
59
52
|
if (init?.type === 'ArrayExpression') {
|
|
@@ -83,6 +76,12 @@ export const collectPropertyValues = (program, propertyName) => {
|
|
|
83
76
|
visitor.visit(program);
|
|
84
77
|
return values;
|
|
85
78
|
};
|
|
79
|
+
const firstValue = (values) => {
|
|
80
|
+
for (const value of values)
|
|
81
|
+
return value;
|
|
82
|
+
};
|
|
83
|
+
export const getFirstPropertyValue = (node, propertyName) => firstValue(getPropertyValues(node, propertyName));
|
|
84
|
+
export const collectFirstPropertyValue = (program, propertyName) => firstValue(collectPropertyValues(program, propertyName));
|
|
86
85
|
const unwrapParens = (node) => node?.type === 'ParenthesizedExpression' ? unwrapParens(node.expression) : node;
|
|
87
86
|
export const resolveObjectArg = (arg) => {
|
|
88
87
|
const node = unwrapParens(arg);
|
|
@@ -105,6 +104,35 @@ export const resolveObjectArg = (arg) => {
|
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
};
|
|
107
|
+
export const findImportedCalls = (program, module) => {
|
|
108
|
+
const isMatch = typeof module === 'function'
|
|
109
|
+
? module
|
|
110
|
+
: Array.isArray(module)
|
|
111
|
+
? (path) => module.includes(path)
|
|
112
|
+
: (path) => path === module;
|
|
113
|
+
const names = new Set();
|
|
114
|
+
for (const [name, path] of getImportMap(program))
|
|
115
|
+
if (isMatch(path))
|
|
116
|
+
names.add(name);
|
|
117
|
+
const calls = [];
|
|
118
|
+
if (names.size === 0)
|
|
119
|
+
return calls;
|
|
120
|
+
const visitor = new Visitor({
|
|
121
|
+
CallExpression(node) {
|
|
122
|
+
if (node.callee?.type === 'Identifier' && names.has(node.callee.name))
|
|
123
|
+
calls.push(node);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
visitor.visit(program);
|
|
127
|
+
return calls;
|
|
128
|
+
};
|
|
129
|
+
export const findImportedCallArg = (program, module) => {
|
|
130
|
+
for (const call of findImportedCalls(program, module)) {
|
|
131
|
+
const arg = resolveObjectArg(call.arguments?.[0]);
|
|
132
|
+
if (arg)
|
|
133
|
+
return arg;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
108
136
|
export const findCallArg = (program, fnName) => {
|
|
109
137
|
let result;
|
|
110
138
|
const visitor = new Visitor({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type TSEnumDeclaration, type TSModuleDeclaration } from 'oxc-parser';
|
|
1
|
+
import { type TemplateLiteral, type TSEnumDeclaration, type TSModuleDeclaration } from 'oxc-parser';
|
|
2
2
|
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile } from '../types/config.ts';
|
|
3
3
|
import type { SymbolType } from '../types/issues.ts';
|
|
4
4
|
import type { ExportMember } from '../types/module-graph.ts';
|
|
5
5
|
export declare const _parseFile: (filePath: string, sourceText: string) => import("oxc-parser").ParseResult;
|
|
6
|
+
export declare const isAmbientDeclarationFile: (filePath: string, sourceText: string) => boolean;
|
|
6
7
|
export type ResolveModule = (specifier: string, containingFile: string) => ResolvedModule | undefined;
|
|
7
8
|
export interface ResolvedModule {
|
|
8
9
|
resolvedFileName: string;
|
|
@@ -16,6 +17,8 @@ export declare const getLineAndCol: (lineStarts: number[], pos: number) => {
|
|
|
16
17
|
export declare const stripQuotes: (name: string) => string;
|
|
17
18
|
export declare const isStringLiteral: (node: any) => boolean;
|
|
18
19
|
export declare const getStringValue: (node: any) => string | undefined;
|
|
20
|
+
export declare const getScriptFromTemplate: (template: TemplateLiteral) => string;
|
|
21
|
+
export declare const getScriptFromArg: (arg: any) => string | undefined;
|
|
19
22
|
export declare const getSafeScriptFromArgs: (executable: any, argsArray: any) => string | undefined;
|
|
20
23
|
export declare const shouldCountRefs: (ignoreExportsUsedInFile: IgnoreExportsUsedInFile, type: SymbolType) => boolean | undefined;
|
|
21
24
|
export declare function extractNamespaceMembers(decl: TSModuleDeclaration, options: GetImportsAndExportsOptions, lineStarts: number[], getJSDocTags: (start: number) => Set<string>, prefix?: string): ExportMember[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseSync, rawTransferSupported, visitorKeys, } from 'oxc-parser';
|
|
2
|
-
import { DEFAULT_EXTENSIONS, FIX_FLAGS, SYMBOL_TYPE } from '../constants.js';
|
|
2
|
+
import { DEFAULT_EXTENSIONS, FIX_FLAGS, SCRIPT_INTERPOLATION, SYMBOL_TYPE } from '../constants.js';
|
|
3
3
|
import { extname } from '../util/path.js';
|
|
4
4
|
import { timerify } from '../util/Performance.js';
|
|
5
5
|
import { EMPTY_TAGS } from './visitors/jsdoc.js';
|
|
@@ -13,6 +13,14 @@ const parseFile = (filePath, sourceText) => {
|
|
|
13
13
|
return parseSync(parseFileName, sourceText, defaultParseOptions);
|
|
14
14
|
};
|
|
15
15
|
export const _parseFile = timerify(parseFile);
|
|
16
|
+
export const isAmbientDeclarationFile = (filePath, sourceText) => {
|
|
17
|
+
try {
|
|
18
|
+
return _parseFile(filePath, sourceText).module.staticExports.length === 0;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
16
24
|
export const buildLineStarts = (sourceText) => {
|
|
17
25
|
const starts = [0];
|
|
18
26
|
let index = sourceText.indexOf('\n');
|
|
@@ -53,6 +61,14 @@ export const getStringValue = (node) => {
|
|
|
53
61
|
return node.quasis[0].value?.cooked ?? node.quasis[0].value?.raw;
|
|
54
62
|
return undefined;
|
|
55
63
|
};
|
|
64
|
+
export const getScriptFromTemplate = (template) => {
|
|
65
|
+
const { quasis } = template;
|
|
66
|
+
let script = quasis[0].value.raw;
|
|
67
|
+
for (let i = 1; i < quasis.length; i++)
|
|
68
|
+
script += SCRIPT_INTERPOLATION + quasis[i].value.raw;
|
|
69
|
+
return script;
|
|
70
|
+
};
|
|
71
|
+
export const getScriptFromArg = (arg) => isStringLiteral(arg) ? getStringValue(arg) : arg?.type === 'TemplateLiteral' ? getScriptFromTemplate(arg) : undefined;
|
|
56
72
|
const SAFE_SCRIPT_ARG = /^[\w@.,:/=+~-]+$/;
|
|
57
73
|
export const getSafeScriptFromArgs = (executable, argsArray) => {
|
|
58
74
|
if (!isStringLiteral(executable))
|