vize 0.443.0 → 0.457.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/cli.mjs +28 -73
- package/dist/cli.mjs.map +1 -1
- package/dist/config-BzFi1lsl.mjs +474 -0
- package/dist/config-BzFi1lsl.mjs.map +1 -0
- package/dist/{config-Cd_SsYdd.d.mts → config-D6OxWiSS.d.mts} +22 -5
- package/dist/config-D6OxWiSS.d.mts.map +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
- package/pkl/CompilerConfig.pkl +1 -1
- package/pkl/jsonschema/ConfigArtifactDefinitions.pkl +1 -1
- package/pkl/vize.pkl +1 -1
- package/schemas/vize.config.schema.json +1 -1
- package/src/config/vite-runtime.d.mts +1 -0
- package/src/config/vite-runtime.mjs +2 -0
- package/src/config.ts +48 -10
- package/src/index.ts +4 -0
- package/src/init/detect.ts +20 -0
- package/src/init/plan-project.ts +17 -30
- package/src/init/plan.ts +2 -2
- package/src/init/templates.ts +0 -51
- package/src/setup/config.ts +0 -20
- package/src/setup.ts +14 -4
- package/src/types/generated.ts +1 -1
- package/src/types/index.ts +2 -0
- package/src/types/rules.ts +4 -0
- package/src/types/runtime.ts +26 -0
- package/dist/config-Cd_SsYdd.d.mts.map +0 -1
- package/dist/config-ld0utx-D.mjs +0 -237
- package/dist/config-ld0utx-D.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-BzFi1lsl.mjs","names":["PACKAGE_ROOT","path","getErrorMessage","fs","resolveViteConfigExport","path","projectViteConfigExport","fs"],"sources":["../src/config/pkl.js","../../../crates/vize_carton/src/config/loader/vite-runtime.mjs","../src/config.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { execFileSync } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"../..\");\n\nconst DOCUMENTED_PKL_SCHEMA_IMPORT_RE =\n /^(\\s*(?:amends|import)\\s+)([\"'])node_modules\\/vize\\/pkl\\/(VizeConfig\\.pkl|vize\\.pkl)\\2/gm;\n\n/**\n * Evaluate a `vize.config.pkl` file and return its JSON representation.\n *\n * The npm-facing loader keeps PKL execution in Node because it needs package\n * resolution for `@pkl-community/pkl`, but all structural config normalization\n * happens in Rust after this function returns. A missing PKL runtime returns\n * `null` so config discovery can fall through to lower-priority formats; an\n * evaluation failure throws because a present PKL config should not silently be\n * ignored.\n */\nexport function loadPklConfigJson(filePath) {\n const pklBin = findPklBinary();\n if (!pklBin) {\n console.warn(\n \"[vize] pkl CLI not found. Install @pkl-community/pkl or add pkl to PATH. \" +\n \"Falling back to the next config format.\",\n );\n return null;\n }\n\n const patchedFilePath = createPklConfigWithBundledSchemaImports(filePath);\n const evalFilePath = patchedFilePath ?? filePath;\n try {\n return execFileSync(pklBin, [\"eval\", \"-f\", \"json\", evalFilePath], {\n cwd: path.dirname(filePath),\n encoding: \"utf-8\",\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n timeout: 30_000,\n });\n } catch (error) {\n throw new Error(`Failed to evaluate vize PKL config at ${filePath}: ${getErrorMessage(error)}`);\n } finally {\n if (patchedFilePath) {\n fs.rmSync(patchedFilePath, { force: true });\n }\n }\n}\n\nfunction findPklBinary() {\n try {\n const pklPkgPath = import.meta.resolve?.(\"@pkl-community/pkl\");\n if (pklPkgPath) {\n const pklLibDir = path.dirname(fileURLToPath(pklPkgPath));\n const pklPackageDir = path.dirname(pklLibDir);\n const candidates = [\n path.join(pklLibDir, \"main.js\"),\n path.join(pklPackageDir, \"pkl\"),\n path.join(pklPackageDir, \"pkl.exe\"),\n ];\n\n for (const candidate of candidates) {\n if (fs.existsSync(candidate)) {\n try {\n execFileSync(candidate, [\"--version\"], { stdio: \"ignore\" });\n return candidate;\n } catch {\n // Keep looking: the shim can exist when its runtime is unavailable.\n }\n }\n }\n }\n } catch {\n // Fall back to PATH below.\n }\n\n try {\n execFileSync(\"pkl\", [\"--version\"], { stdio: \"ignore\" });\n return \"pkl\";\n } catch {\n return null;\n }\n}\n\nfunction createPklConfigWithBundledSchemaImports(filePath) {\n const configDir = path.dirname(filePath);\n const source = fs.readFileSync(filePath, \"utf-8\");\n let patched = false;\n\n const content = source.replace(\n DOCUMENTED_PKL_SCHEMA_IMPORT_RE,\n (match, prefix, quote, schemaFile) => {\n const projectSchemaPath = path.join(configDir, \"node_modules\", \"vize\", \"pkl\", schemaFile);\n if (fs.existsSync(projectSchemaPath)) {\n return match;\n }\n\n const bundledSchemaPath = path.join(PACKAGE_ROOT, \"pkl\", schemaFile);\n if (!fs.existsSync(bundledSchemaPath)) {\n return match;\n }\n\n patched = true;\n return `${prefix}${quote}${pathToFileURL(bundledSchemaPath).href}${quote}`;\n },\n );\n\n if (!patched) {\n return null;\n }\n\n const tempFile = path.join(\n configDir,\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.pkl`,\n );\n fs.writeFileSync(tempFile, content, { flag: \"wx\", mode: 0o600 });\n return tempFile;\n}\n\nfunction getErrorMessage(error) {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n","// This dependency-free projection is also embedded by the native config loader.\nimport { resolve } from \"node:path\";\n\n// Generated validation subset of npm/cli/schemas/vize.config.schema.json.\n// Only canonical Vue options use it; legacy flat settings retain their existing behavior.\n// The source law compares every retained schema rule with the authoritative native schema.\nconst vueOptionSchema = JSON.parse(\n '{\"type\":\"object\",\"properties\":{\"compiler\":{\"$ref\":\"#/definitions/CompilerConfig\"},\"typeChecker\":{\"$ref\":\"#/definitions/TypeCheckerConfig\"},\"linter\":{\"$ref\":\"#/definitions/LinterConfig\"},\"formatter\":{\"$ref\":\"#/definitions/FormatterConfig\"},\"languageServer\":{\"$ref\":\"#/definitions/LanguageServerConfig\"},\"globalTypes\":{\"$ref\":\"#/definitions/GlobalTypesConfig\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"basePath\":{\"type\":\"string\"},\"lib\":{\"$ref\":\"#/definitions/LibConfig\"},\"version\":{\"$ref\":\"#/definitions/VueVersion\"},\"entries\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"basePath\":{\"type\":\"string\"},\"files\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ignores\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"linter\":{\"$ref\":\"#/definitions/LinterConfig\"}},\"additionalProperties\":false}}},\"additionalProperties\":false,\"definitions\":{\"VueVersion\":{\"type\":\"string\",\"enum\":[\"3\",\"2.7\",\"2\",\"1\",\"0.11\",\"0.10\"]},\"GlobalTypesConfig\":{\"type\":\"object\",\"additionalProperties\":{\"oneOf\":[{\"type\":\"string\"},{\"$ref\":\"#/definitions/GlobalTypeDeclaration\"}]}},\"GlobalTypeDeclaration\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\"},\"defaultValue\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\"]},\"LanguageServerConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"lint\":{\"type\":\"boolean\"},\"diagnostics\":{\"type\":\"boolean\"},\"typecheck\":{\"type\":\"boolean\"},\"editor\":{\"type\":\"boolean\"},\"ecosystem\":{\"type\":\"boolean\"},\"legacyVue2\":{\"type\":\"boolean\"},\"completion\":{\"type\":\"boolean\"},\"signatureHelp\":{\"type\":\"boolean\"},\"hover\":{\"type\":\"boolean\"},\"definition\":{\"type\":\"boolean\"},\"references\":{\"type\":\"boolean\"},\"documentSymbols\":{\"type\":\"boolean\"},\"workspaceSymbols\":{\"type\":\"boolean\"},\"formatting\":{\"type\":\"boolean\"},\"codeActions\":{\"type\":\"boolean\"},\"rename\":{\"type\":\"boolean\"},\"codeLens\":{\"type\":\"boolean\"},\"semanticTokens\":{\"type\":\"boolean\"},\"documentLinks\":{\"type\":\"boolean\"},\"foldingRanges\":{\"type\":\"boolean\"},\"inlayHints\":{\"type\":\"boolean\"},\"fileRename\":{\"type\":\"boolean\"},\"corsa\":{\"type\":\"boolean\"},\"tsgo\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"FormatterConfig\":{\"type\":\"object\",\"properties\":{\"sortImports\":{\"oneOf\":[{\"type\":\"boolean\",\"enum\":[false]},{\"$ref\":\"#/definitions/SortImportsConfig\"}]},\"printWidth\":{\"type\":\"integer\"},\"tabWidth\":{\"type\":\"integer\"},\"useTabs\":{\"type\":\"boolean\"},\"semi\":{\"type\":\"boolean\"},\"singleQuote\":{\"type\":\"boolean\"},\"jsxSingleQuote\":{\"type\":\"boolean\"},\"trailingComma\":{\"type\":\"string\",\"enum\":[\"all\",\"none\",\"es5\"]},\"bracketSpacing\":{\"type\":\"boolean\"},\"bracketSameLine\":{\"type\":\"boolean\"},\"arrowParens\":{\"type\":\"string\",\"enum\":[\"always\",\"avoid\"]},\"endOfLine\":{\"type\":\"string\",\"enum\":[\"lf\",\"crlf\",\"cr\",\"auto\"]},\"quoteProps\":{\"type\":\"string\",\"enum\":[\"as-needed\",\"consistent\",\"preserve\"]},\"singleAttributePerLine\":{\"type\":\"boolean\"},\"vueIndentScriptAndStyle\":{\"type\":\"boolean\"},\"sortAttributes\":{\"type\":\"boolean\"},\"attributeSortOrder\":{\"type\":\"string\",\"enum\":[\"alphabetical\",\"as-written\"]},\"mergeBindAndNonBindAttrs\":{\"type\":\"boolean\"},\"maxAttributesPerLine\":{\"type\":\"integer\"},\"attributeGroups\":{\"type\":\"array\",\"items\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"normalizeDirectiveShorthands\":{\"type\":\"boolean\"},\"sortBlocks\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"SortImportsConfig\":{\"type\":\"object\",\"properties\":{\"partitionByNewline\":{\"type\":\"boolean\"},\"partitionByComment\":{\"type\":\"boolean\"},\"sortSideEffects\":{\"type\":\"boolean\"},\"order\":{\"type\":\"string\",\"enum\":[\"asc\",\"desc\"]},\"ignoreCase\":{\"type\":\"boolean\"},\"newlinesBetween\":{\"type\":\"boolean\"},\"internalPattern\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"groups\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"properties\":{\"newlinesBetween\":{\"type\":\"boolean\"}},\"additionalProperties\":false,\"required\":[\"newlinesBetween\"]}]}},\"customGroups\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/ImportSortCustomGroup\"}}},\"additionalProperties\":false},\"ImportSortCustomGroup\":{\"type\":\"object\",\"properties\":{\"groupName\":{\"type\":\"string\"},\"elementNamePattern\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"selector\":{\"type\":\"string\"},\"modifiers\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false,\"required\":[\"groupName\"]},\"LinterConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"preset\":{\"type\":\"string\",\"enum\":[\"happy-path\",\"opinionated\",\"essential\",\"incremental\",\"ecosystem\",\"nuxt\"]},\"typeAware\":{\"type\":\"boolean\"},\"crossFile\":{\"type\":\"boolean\"},\"crossFileTree\":{\"type\":\"boolean\"},\"crossFileComplexity\":{\"type\":\"boolean\"},\"strictReactivity\":{\"type\":\"boolean\"},\"maxWarnings\":{\"type\":\"integer\",\"minimum\":0},\"rules\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]}},\"ruleOptions\":{\"$ref\":\"#/definitions/LintRuleOptions\"},\"categories\":{\"type\":\"object\",\"properties\":{\"correctness\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"suspicious\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"style\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"perf\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"a11y\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]},\"security\":{\"type\":\"string\",\"enum\":[\"off\",\"warn\",\"error\"]}},\"additionalProperties\":false}},\"additionalProperties\":false},\"LintRuleOptions\":{\"type\":\"object\",\"properties\":{\"script/define-props-destructuring\":{\"type\":\"object\",\"properties\":{\"destructure\":{\"type\":\"string\",\"enum\":[\"only-when-assigned\",\"always\",\"never\"]}},\"additionalProperties\":false},\"html/no-empty-palpable-content\":{\"type\":\"object\",\"properties\":{\"contentDirectives\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"type/strict-boolean-expressions\":{\"type\":\"object\",\"properties\":{\"allowString\":{\"type\":\"boolean\"},\"allowNumber\":{\"type\":\"boolean\"},\"allowNullableObject\":{\"type\":\"boolean\"},\"allowNullableBoolean\":{\"type\":\"boolean\"},\"allowNullableString\":{\"type\":\"boolean\"},\"allowNullableNumber\":{\"type\":\"boolean\"},\"allowNullableEnum\":{\"type\":\"boolean\"},\"allowAny\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"script/no-restricted-globals\":{\"$ref\":\"#/definitions/NoRestrictedGlobalsOptions\"},\"script/no-restricted-members\":{\"$ref\":\"#/definitions/NoRestrictedMembersOptions\"},\"vue/component-name-in-template-casing\":{\"type\":\"object\",\"properties\":{\"casing\":{\"type\":\"string\",\"enum\":[\"PascalCase\",\"kebab-case\"]},\"registeredComponentsOnly\":{\"type\":\"boolean\"},\"globals\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"script/custom-event-name-casing\":{\"type\":\"object\",\"properties\":{\"casing\":{\"type\":\"string\",\"enum\":[\"camelCase\",\"kebab-case\"]}},\"additionalProperties\":false},\"vue/no-mutating-props\":{\"type\":\"object\",\"properties\":{\"shallowOnly\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"vue/require-component-registration\":{\"type\":\"object\",\"properties\":{\"globals\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"additionalProperties\":false},\"vue/sfc-element-order\":{\"type\":\"object\",\"properties\":{\"order\":{\"type\":\"array\",\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]}}},\"additionalProperties\":false},\"vue/html-self-closing\":{\"type\":\"object\",\"properties\":{\"html\":{\"type\":\"object\",\"properties\":{\"void\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"normal\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"component\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]}},\"additionalProperties\":false},\"svg\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]},\"math\":{\"type\":\"string\",\"enum\":[\"always\",\"never\",\"any\"]}},\"additionalProperties\":false},\"vue/v-on-event-hyphenation\":{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},\"vue/attribute-hyphenation\":{\"type\":\"string\",\"enum\":[\"always\",\"never\"]},\"vue/valid-v-slot\":{\"type\":\"object\",\"properties\":{\"allowModifiers\":{\"type\":\"boolean\"}},\"additionalProperties\":false},\"musea/prefer-design-tokens\":{\"$ref\":\"#/definitions/MuseaPreferDesignTokensOptions\"}},\"additionalProperties\":false},\"MuseaPreferDesignTokensOptions\":{\"type\":\"object\",\"properties\":{\"tokens\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/MuseaDesignToken\"}}},\"additionalProperties\":false},\"MuseaDesignToken\":{\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"tier\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"path\",\"value\"]},\"NoRestrictedMembersOptions\":{\"type\":\"object\",\"properties\":{\"members\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/RestrictedMember\"}}},\"additionalProperties\":false},\"RestrictedMember\":{\"type\":\"object\",\"properties\":{\"object\":{\"type\":\"string\"},\"property\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"object\",\"property\"]},\"NoRestrictedGlobalsOptions\":{\"type\":\"object\",\"properties\":{\"globals\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/RestrictedGlobal\"}}},\"additionalProperties\":false},\"RestrictedGlobal\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"name\"]},\"TypeCheckerConfig\":{\"type\":\"object\",\"properties\":{\"enabled\":{\"type\":\"boolean\"},\"strict\":{\"type\":\"boolean\"},\"checkProps\":{\"type\":\"boolean\"},\"checkEmits\":{\"type\":\"boolean\"},\"checkTemplateBindings\":{\"type\":\"boolean\"},\"checkReactivity\":{\"type\":\"boolean\"},\"checkSetupContext\":{\"type\":\"boolean\"},\"checkInvalidExports\":{\"type\":\"boolean\"},\"checkFallthroughAttrs\":{\"type\":\"boolean\"},\"optionsApi\":{\"type\":\"boolean\"},\"legacyVue2\":{\"type\":\"boolean\"},\"jsxTypecheck\":{\"type\":\"boolean\"},\"tsconfig\":{\"type\":\"string\"},\"corsaPath\":{\"type\":\"string\"},\"tsgoPath\":{\"type\":\"string\"},\"globalsFile\":{\"type\":\"string\"},\"servers\":{\"type\":\"integer\"},\"lspRequestTimeoutMs\":{\"type\":\"integer\",\"minimum\":1}},\"additionalProperties\":false},\"CompilerConfig\":{\"type\":\"object\",\"properties\":{\"mode\":{\"type\":\"string\",\"enum\":[\"module\",\"function\"]},\"vapor\":{\"type\":\"boolean\"},\"jsxMode\":{\"type\":\"string\",\"enum\":[\"vdom\",\"vapor\"]},\"jsxCompat\":{\"type\":\"string\",\"enum\":[\"native\",\"babel\"]},\"customRenderer\":{\"type\":\"boolean\"},\"customElements\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"ssr\":{\"type\":\"boolean\"},\"templateSyntax\":{\"type\":\"string\",\"enum\":[\"standard\",\"strict\",\"quirks\"]},\"whitespace\":{\"type\":\"string\",\"enum\":[\"condense\",\"preserve\",\"vue2-line-breaks\",\"vue2-preserve\"]},\"sourceMap\":{\"type\":\"boolean\"},\"prefixIdentifiers\":{\"type\":\"boolean\"},\"hoistStatic\":{\"type\":\"boolean\"},\"cacheHandlers\":{\"type\":\"boolean\"},\"isTs\":{\"type\":\"boolean\"},\"scriptExt\":{\"type\":\"string\",\"enum\":[\"ts\",\"js\"]},\"runtimeModuleName\":{\"type\":\"string\"},\"runtimeGlobalName\":{\"type\":\"string\"},\"compatibility\":{\"$ref\":\"#/definitions/CompilerCompatibilityConfig\"}},\"additionalProperties\":false},\"CompilerCompatibilityConfig\":{\"type\":\"object\",\"properties\":{\"vueVersion\":{\"$ref\":\"#/definitions/VueVersion\"},\"hostCompiler\":{\"type\":\"boolean\"},\"scriptSetupInStandalone\":{\"type\":\"boolean\"},\"optionsApiVapor\":{\"type\":\"boolean\"},\"nuxtVersion\":{\"type\":\"integer\",\"enum\":[2,3,4]},\"webpackVersion\":{\"type\":\"integer\",\"enum\":[4,5]}},\"additionalProperties\":false},\"LibConfig\":{\"type\":\"object\",\"properties\":{\"dir\":{\"type\":\"string\"},\"uiDir\":{\"type\":\"string\"},\"composableDir\":{\"type\":\"string\"},\"lockfile\":{\"type\":\"string\"},\"registries\":{\"type\":\"object\",\"additionalProperties\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"string\"},\"dir\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"source\"]}]},\"propertyNames\":{\"pattern\":\"^@[a-z0-9][a-z0-9._-]*$\"}}},\"additionalProperties\":false}}}',\n);\n\n// Read the source of our Vite+ factory without starting Vite, plugins or tasks.\nconst sourceConfigKey = Symbol.for(\"@vizejs/vite-plugin/vite-plus/source\");\n\nfunction object(value) {\n if (value === null || typeof value !== \"object\") return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction merge(base, own) {\n const result = { ...base };\n for (const [key, value] of Object.entries(own)) {\n result[key] = object(value) && object(result[key]) ? merge(result[key], value) : value;\n }\n return result;\n}\n\nasync function resolveSource(value, env, parents = new Set()) {\n value = await value;\n if (parents.has(value)) throw new Error(\"Circular extends in Vize's Vite config\");\n parents.add(value);\n try {\n if (typeof value === \"function\" && sourceConfigKey in value) {\n return await resolveSource(value[sourceConfigKey], env, parents);\n }\n const config = await (typeof value === \"function\" ? value(env) : value);\n if (!object(config)) throw new Error(\"Vite config must export an object or a config function\");\n const { extends: bases, ...own } = config;\n let inherited = {};\n for (const base of Array.isArray(bases) ? bases : bases ? [bases] : []) {\n inherited = mergeViteSource(inherited, await resolveSource(base, env, parents));\n }\n return mergeViteSource(inherited, own);\n } finally {\n parents.delete(value);\n }\n}\n\nexport const VITE_CONFIG_FILE_NAMES = [\n \"vite.config.ts\",\n \"vite.config.js\",\n \"vite.config.mjs\",\n \"vite.config.cjs\",\n \"vite.config.mts\",\n \"vite.config.cts\",\n];\n\nexport function isViteConfigFile(filePath) {\n return /(?:^|[/\\\\])vite\\.config\\.(?:[cm]?[jt]s)$/.test(filePath);\n}\n\n/** Project workflows support JSX without an extra feature flag. Legacy config stays unchanged. */\nexport function projectConfigDefaults() {\n return { typeChecker: { jsxTypecheck: true } };\n}\n\n/** Resolve just the native settings from an ordinary Vite or Vite+ export. */\nexport async function resolveViteConfigExport(exported, env, configDir) {\n env ??= { mode: \"development\", command: \"serve\" };\n // Dedicated Vize workflows also use commands such as lint and check. A Vite\n // function receives only Vite's serve/build discriminator, without mutation.\n if (env.command !== \"build\" && env.command !== \"serve\") {\n env = { ...env, command: \"serve\" };\n }\n const source = await resolveSource(exported, env);\n return projectViteConfigSource(source, env, configDir);\n}\n\n/** Project already evaluated settings; the owning adapter evaluates its Vite export once. */\nexport async function projectViteConfigSource(source, env, configDir) {\n if (!object(source)) throw new TypeError(\"Vite config source must be an object\");\n env ??= { mode: \"development\", command: \"serve\" };\n // Adapters may pass a native task environment after evaluating the Vite source.\n // Its legacy native callback shares the same idempotent Vite command mapping.\n if (env.command !== \"build\" && env.command !== \"serve\") env = { ...env, command: \"serve\" };\n const selected = vueConfigOptions(source);\n const canonical = selected === undefined ? {} : flatVueOptions(selected);\n let shared = await (typeof source.vize === \"function\" ? source.vize(env) : source.vize);\n const alias = object(shared) ? shared.lint : undefined;\n if (object(shared)) {\n const { lint: _lint, ...native } = shared;\n shared = native;\n }\n const overrides = {};\n if (object(source.compiler)) {\n const { vueVersion, ...compiler } = source.compiler;\n const version = vueVersion ?? compiler.compatibility?.vueVersion;\n overrides.compiler = merge(\n compiler,\n version === undefined\n ? {}\n : {\n // Numeric 0.1 is the newly public spelling of Vue 0.10.\n compatibility: {\n vueVersion: String(version === 0.1 ? \"0.10\" : version === \"legacy\" ? 2 : version),\n },\n },\n );\n }\n if (typeof source.typecheck === \"boolean\") overrides.typeChecker = { enabled: source.typecheck };\n else if (object(source.typecheck)) overrides.typeChecker = source.typecheck;\n const lint = source.lint?.vize === undefined ? alias : source.lint.vize;\n if (typeof lint === \"boolean\") overrides.linter = { enabled: lint };\n else if (object(lint)) {\n const {\n typecheck: _typecheck,\n locale: _locale,\n helpLevel: _helpLevel,\n ...native\n } = merge(object(alias) ? alias : {}, lint);\n overrides.linter = native;\n }\n if (object(source.fmt)) {\n const { vize, sortImports } = source.fmt;\n const common = sortImports === undefined ? {} : { sortImports };\n overrides.formatter = merge(common, object(vize) ? vize : {});\n }\n // Keep scoped entries in their authored order; the unscoped defaults precede\n // them, while tool sections override only the shared unscoped settings.\n const root = typeof source.root === \"string\" ? resolve(configDir ?? \".\", source.root) : configDir;\n if (Array.isArray(shared)) {\n const entries = canonical.entries;\n const { entries: _entries, ...own } = canonical;\n const retained = entries === undefined ? shared : shared.filter(isUnscopedEntry);\n return [\n { ...projectConfigDefaults(), ...(root ? { __vizeProjectRoot: root } : {}) },\n ...retained.map((entry) => projectPaths(entry, root, true)),\n projectPaths(\n { ...overlayVueOptions(overrides, own), ...(root ? { __vizeProjectRoot: root } : {}) },\n root,\n false,\n ),\n ...(entries ?? []).map((entry) => projectPaths(entry, root, true)),\n ];\n }\n const config = overlayVueOptions(\n merge(merge(projectConfigDefaults(), shared ?? {}), overrides),\n canonical,\n );\n return root ? { ...projectPaths(config, root, false), __vizeProjectRoot: root } : config;\n}\n\n/** Validate only canonical settings; selecting them never evaluates a legacy callback. */\nexport function vueConfigOptions(source) {\n const selected = source.vue;\n if (selected !== undefined) validateVueOption(selected, vueOptionSchema, \"vue\");\n return selected;\n}\n\n/** Share canonical composition with adapters while their other Vite fields keep Vite merging. */\nexport function mergeVueConfigOptions(base, own) {\n vueConfigOptions({ vue: base });\n vueConfigOptions({ vue: own });\n if (base === undefined) return own;\n if (own === undefined) return base;\n return overlayVueOptions(base, own);\n}\n\nfunction mergeViteSource(base, own) {\n const result = merge(base, own);\n const selected = mergeVueConfigOptions(base.vue, own.vue);\n if (selected !== undefined) result.vue = selected;\n return result;\n}\n\nfunction flatVueOptions(selected) {\n const { version, entries, ...sections } = selected;\n return {\n ...sections,\n ...(version === undefined ? {} : { vue: { version } }),\n ...(entries === undefined ? {} : { entries: entries.map(flatVueOptions) }),\n };\n}\n\n// Match the existing native global-entry rule after its nullish removal.\nfunction isUnscopedEntry(entry) {\n return !object(entry) || [\"basePath\", \"files\", \"ignores\"].every((key) => entry[key] == null);\n}\n\n// Native arrays replace; authored false leaves win and undefined remains absent.\nfunction overlayVueOptions(base, own) {\n const result = { ...base };\n for (const [key, value] of Object.entries(own)) {\n if (value === undefined) continue;\n const previous = Object.hasOwn(result, key) ? result[key] : undefined;\n Object.defineProperty(result, key, {\n value: object(value) && object(previous) ? overlayVueOptions(previous, value) : value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n }\n return result;\n}\n\nfunction validateVueOption(value, schema, label) {\n const refuse = (reason) => {\n throw new TypeError(`${label}: ${reason}`);\n };\n if (schema.$ref) {\n return validateVueOption(\n value,\n vueOptionSchema.definitions[schema.$ref.split(\"/\").at(-1)],\n label,\n );\n }\n if (schema.oneOf) {\n const matches = schema.oneOf.filter((candidate) => {\n try {\n validateVueOption(value, candidate, label);\n return true;\n } catch (error) {\n if (!(error instanceof TypeError)) throw error;\n return false;\n }\n });\n if (matches.length !== 1) refuse(\"must match one documented native option type\");\n return;\n }\n if (schema.enum && !schema.enum.includes(value)) refuse(\"unsupported native option value\");\n const valid = {\n object: object(value),\n array: Array.isArray(value),\n string: typeof value === \"string\",\n boolean: typeof value === \"boolean\",\n integer: Number.isInteger(value),\n number: typeof value === \"number\" && Number.isFinite(value),\n null: value === null,\n };\n if (schema.type && !valid[schema.type]) refuse(`must be ${schema.type}`);\n if (schema.minimum !== undefined && value < schema.minimum)\n refuse(`must be >= ${schema.minimum}`);\n if (Array.isArray(value) && schema.items) {\n for (let index = 0; index < value.length; index++) {\n validateVueOption(value[index], schema.items, `${label}[${index}]`);\n }\n }\n if (object(value)) {\n for (const required of schema.required ?? []) {\n if (!Object.hasOwn(value, required) || value[required] === undefined)\n refuse(`missing ${required}`);\n }\n for (const [key, item] of Object.entries(value)) {\n const documented = Object.hasOwn(schema.properties ?? {}, key);\n if (!documented && schema.additionalProperties === false) refuse(`unknown option ${key}`);\n if (schema.propertyNames?.pattern && !new RegExp(schema.propertyNames.pattern).test(key)) {\n refuse(`invalid native option name ${key}`);\n }\n const rule = documented ? schema.properties[key] : schema.additionalProperties;\n if (item !== undefined && object(rule)) validateVueOption(item, rule, `${label}.${key}`);\n }\n }\n}\n\n// Vite-owned settings use its root. Dedicated Vize files keep their established\n// config-directory path contract, and CLI arguments never pass through here.\nfunction projectPaths(config, root, entry) {\n if (!root || !object(config)) return config;\n const result = { ...config };\n if (\n typeof config.basePath === \"string\" ||\n config.files !== undefined ||\n (entry && config.ignores !== undefined)\n ) {\n result.basePath = resolve(root, config.basePath ?? \".\");\n }\n if (Array.isArray(config.entries)) {\n result.entries = config.entries.map((value) => projectPaths(value, root, true));\n }\n if (object(config.typeChecker)) {\n result.typeChecker = { ...config.typeChecker };\n for (const key of [\"tsconfig\", \"corsaPath\", \"tsgoPath\", \"globalsFile\"]) {\n if (typeof config.typeChecker[key] === \"string\") {\n result.typeChecker[key] = resolve(root, config.typeChecker[key]);\n }\n }\n }\n return result;\n}\n","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { randomUUID } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport type {\n ResolvedVizeConfig,\n LoadConfigOptions,\n UserConfigExport,\n ConfigEnv,\n GlobalTypesConfig,\n GlobalTypeDeclaration,\n} from \"./types/index.js\";\nimport { loadPklConfigJson } from \"./config/pkl.js\";\nimport {\n VITE_CONFIG_FILE_NAMES,\n isViteConfigFile,\n resolveViteConfigExport as projectViteConfigExport,\n} from \"./config/vite-runtime.mjs\";\n\nexport { VITE_CONFIG_FILE_NAMES } from \"./config/vite-runtime.mjs\";\n\ntype NativeConfigHelpers = {\n normalizeVizeConfig(value: unknown): unknown;\n};\n\nconst require = createRequire(import.meta.url);\n\nexport const CONFIG_FILE_NAMES = [\n \"vize.config.pkl\",\n \"vize.config.ts\",\n \"vize.config.js\",\n \"vize.config.mjs\",\n \"vize.config.json\",\n] as const;\n\nconst DEFAULT_CONFIG_ENV: ConfigEnv = {\n mode: \"development\",\n command: \"serve\",\n};\n\nconst PACKAGE_ROOT = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"..\");\n\nexport const VIZE_CONFIG_JSON_SCHEMA_PATH = path.join(\n PACKAGE_ROOT,\n \"schemas\",\n \"vize.config.schema.json\",\n);\n\nexport const VIZE_CONFIG_PKL_SCHEMA_PATH = path.join(PACKAGE_ROOT, \"pkl\", \"vize.pkl\");\n\n/**\n * Define a Vize configuration with type checking.\n * Accepts a plain object or a function that receives ConfigEnv.\n */\nexport function defineConfig(config: UserConfigExport): UserConfigExport {\n return config;\n}\n\n/** Resolve native settings from an already loaded Vite/Vite+ export, without starting its plugins. */\nexport async function resolveViteConfigExport(\n exported: unknown,\n env?: ConfigEnv,\n configDir?: string,\n): Promise<ResolvedVizeConfig> {\n return normalizeLoadedConfig(await projectViteConfigExport(exported, env, configDir));\n}\n\n/**\n * Load project settings from a compatible dedicated config or `vite.config.*`.\n */\nexport async function loadConfig(\n root: string,\n options: LoadConfigOptions = {},\n): Promise<ResolvedVizeConfig | null> {\n const { mode = \"root\", configFile, env, viteConfig = true } = options;\n\n if (mode === \"none\") {\n return null;\n }\n\n if (configFile) {\n const absolutePath = path.isAbsolute(configFile) ? configFile : path.resolve(root, configFile);\n if (fs.existsSync(absolutePath)) {\n return loadConfigFile(absolutePath, env);\n }\n return null;\n }\n\n if (mode === \"auto\") {\n return loadConfigFromDirAuto(root, env, viteConfig);\n }\n\n return loadConfigFromDir(root, env, viteConfig);\n}\n\nasync function loadConfigFromDir(\n dir: string,\n env?: ConfigEnv,\n viteConfig = true,\n): Promise<ResolvedVizeConfig | null> {\n for (const name of [...CONFIG_FILE_NAMES, ...(viteConfig ? VITE_CONFIG_FILE_NAMES : [])]) {\n const filePath = path.join(dir, name);\n if (!fs.existsSync(filePath)) {\n continue;\n }\n\n const config = await loadConfigFile(filePath, env);\n if (config !== null) {\n return config;\n }\n }\n return null;\n}\n\nasync function loadConfigFromDirAuto(\n startDir: string,\n env?: ConfigEnv,\n viteConfig = true,\n): Promise<ResolvedVizeConfig | null> {\n let currentDir = path.resolve(startDir);\n\n while (true) {\n const config = await loadConfigFromDir(currentDir, env, viteConfig);\n if (config !== null) {\n return config;\n }\n\n if (\n [\"package.json\", \"tsconfig.json\", \"jsconfig.json\"].some((name) =>\n fs.existsSync(path.join(currentDir, name)),\n )\n ) {\n return null;\n }\n const parentDir = path.dirname(currentDir);\n if (parentDir === currentDir) {\n return null;\n }\n\n currentDir = parentDir;\n }\n}\n\nasync function loadConfigFile(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig | null> {\n const absolutePath = path.resolve(filePath);\n if (!fs.existsSync(absolutePath)) {\n return null;\n }\n\n const ext = path.extname(absolutePath);\n\n if (ext === \".pkl\") {\n return loadPklConfig(absolutePath);\n }\n\n if (ext === \".json\") {\n const content = fs.readFileSync(absolutePath, \"utf-8\");\n return parseJsonConfig(content, absolutePath);\n }\n\n if (ext === \".ts\" || ext === \".mts\") {\n return loadTypeScriptConfig(absolutePath, env);\n }\n\n return loadESMConfig(absolutePath, env);\n}\n\nfunction loadPklConfig(filePath: string): ResolvedVizeConfig | null {\n const output = loadPklConfigJson(filePath);\n return output === null ? null : parseJsonConfig(output, filePath);\n}\n\nexport async function resolveConfigExport(\n exported: UserConfigExport,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n if (typeof exported === \"function\") {\n return normalizeLoadedConfig(await exported(env ?? DEFAULT_CONFIG_ENV));\n }\n\n return normalizeLoadedConfig(exported);\n}\n\nasync function loadTypeScriptConfig(\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n const source = fs.readFileSync(filePath, \"utf-8\");\n const oxcTransform = await import(\"oxc-transform\");\n const result = await oxcTransform.transform(filePath, source, {\n typescript: {\n onlyRemoveTypeImports: true,\n },\n });\n const code = rewriteSelfConfigImports(result.code);\n\n const tempFile = path.join(\n path.dirname(filePath),\n `.vize-config-${process.pid}-${Date.now()}-${randomUUID()}.mjs`,\n );\n fs.writeFileSync(tempFile, code, { flag: \"wx\", mode: 0o600 });\n\n try {\n const module = await importFresh(tempFile);\n const exported: UserConfigExport = module.default || module;\n return resolveFileExport(exported, filePath, env);\n } finally {\n fs.rmSync(tempFile, { force: true });\n }\n}\n\nasync function loadESMConfig(filePath: string, env?: ConfigEnv): Promise<ResolvedVizeConfig> {\n const module = await importFresh(filePath);\n const exported: UserConfigExport = module.default || module;\n return resolveFileExport(exported, filePath, env);\n}\n\nasync function resolveFileExport(\n exported: UserConfigExport,\n filePath: string,\n env?: ConfigEnv,\n): Promise<ResolvedVizeConfig> {\n return isViteConfigFile(filePath)\n ? resolveViteConfigExport(exported, env, path.dirname(filePath))\n : resolveConfigExport(exported, env);\n}\n\nasync function importFresh(filePath: string): Promise<Record<string, unknown>> {\n const fileUrl = pathToFileURL(filePath);\n fileUrl.searchParams.set(\"t\", String(fs.statSync(filePath).mtimeMs));\n return import(fileUrl.href);\n}\n\nfunction rewriteSelfConfigImports(code: string): string {\n return code\n .replace(/\\bfrom\\s+([\"'])(vize(?:\\/config)?)\\1/gu, (_match, quote, specifier) => {\n return `from ${quote}${resolveSelfConfigImportUrl(specifier)}${quote}`;\n })\n .replace(/\\bimport\\s+([\"'])(vize(?:\\/config)?)\\1/gu, (_match, quote, specifier) => {\n return `import ${quote}${resolveSelfConfigImportUrl(specifier)}${quote}`;\n })\n .replace(/\\bimport\\s*\\(\\s*([\"'])(vize(?:\\/config)?)\\1\\s*\\)/gu, (_match, quote, specifier) => {\n return `import(${quote}${resolveSelfConfigImportUrl(specifier)}${quote})`;\n });\n}\n\nfunction resolveSelfConfigImportUrl(specifier: string): string {\n const distTarget =\n specifier === \"vize\"\n ? path.join(PACKAGE_ROOT, \"dist\", \"index.mjs\")\n : path.join(PACKAGE_ROOT, \"dist\", \"config.mjs\");\n const sourceTarget = path.join(PACKAGE_ROOT, \"src\", \"config.ts\");\n return pathToFileURL(fs.existsSync(distTarget) ? distTarget : sourceTarget).href;\n}\n\nfunction parseJsonConfig(content: string, filePath: string): ResolvedVizeConfig {\n try {\n return normalizeLoadedConfig(JSON.parse(content));\n } catch (error) {\n throw new Error(`Failed to parse vize config JSON at ${filePath}: ${getErrorMessage(error)}`);\n }\n}\n\nfunction normalizeLoadedConfig(config: unknown): ResolvedVizeConfig {\n const native = require(\"@vizejs/native\") as NativeConfigHelpers;\n return native.normalizeVizeConfig(config ?? null) as ResolvedVizeConfig;\n}\n\nfunction getErrorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n\n return String(error);\n}\n\n/**\n * Normalize GlobalTypesConfig shorthand strings to GlobalTypeDeclaration objects\n */\nexport function normalizeGlobalTypes(\n config: GlobalTypesConfig,\n): Record<string, GlobalTypeDeclaration> {\n const resolvedConfig =\n \"types\" in config &&\n typeof config.types === \"object\" &&\n config.types !== null &&\n !Array.isArray(config.types)\n ? config.types\n : config;\n\n const result: Record<string, GlobalTypeDeclaration> = {};\n for (const [key, value] of Object.entries(resolvedConfig)) {\n if (typeof value === \"string\") {\n result[key] = { type: value };\n } else {\n result[key] = value;\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;;AAMA,MAAMA,iBAAeC,OAAK,QAAQ,cAAc,IAAI,IAAI,KAAK,OAAO,KAAK,GAAG,CAAC,GAAG,OAAO;AAEvF,MAAM,kCACJ;;;;;;;;;;;AAYF,SAAgB,kBAAkB,UAAU;CAC1C,MAAM,SAAS,cAAc;CAC7B,IAAI,CAAC,QAAQ;EACX,QAAQ,KACN,kHAEF;EACA,OAAO;CACT;CAEA,MAAM,kBAAkB,wCAAwC,QAAQ;CACxE,MAAM,eAAe,mBAAmB;CACxC,IAAI;EACF,OAAO,aAAa,QAAQ;GAAC;GAAQ;GAAM;GAAQ;EAAY,GAAG;GAChE,KAAKA,OAAK,QAAQ,QAAQ;GAC1B,UAAU;GACV,OAAO;IAAC;IAAU;IAAQ;GAAM;GAChC,SAAS;EACX,CAAC;CACH,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,yCAAyC,SAAS,IAAIC,kBAAgB,KAAK,GAAG;CAChG,UAAU;EACR,IAAI,iBACF,KAAG,OAAO,iBAAiB,EAAE,OAAO,KAAK,CAAC;CAE9C;AACF;AAEA,SAAS,gBAAgB;CACvB,IAAI;EACF,MAAM,aAAa,OAAO,KAAK,UAAU,oBAAoB;EAC7D,IAAI,YAAY;GACd,MAAM,YAAYD,OA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cAAc;EAC3F,OAAO,UAAU,QAAQ,2BAA2B,SAAS,IAAI,MAAM;CACzE,CAAC;AACL;AAEA,SAAS,2BAA2B,WAA2B;CAC7D,MAAM,aACJ,cAAc,SACVF,OAAK,KAAK,cAAc,QAAQ,WAAW,IAC3CA,OAAK,KAAK,cAAc,QAAQ,YAAY;CAClD,MAAM,eAAeA,OAAK,KAAK,cAAc,OAAO,WAAW;CAC/D,OAAO,cAAcE,KAAG,WAAW,UAAU,IAAI,aAAa,YAAY,EAAE;AAC9E;AAEA,SAAS,gBAAgB,SAAiB,UAAsC;CAC9E,IAAI;EACF,OAAO,sBAAsB,KAAK,MAAM,OAAO,CAAC;CAClD,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,uCAAuC,SAAS,IAAI,gBAAgB,KAAK,GAAG;CAC9F;AACF;AAEA,SAAS,sBAAsB,QAAqC;CAElE,OADe,QAAQ,gBACX,EAAE,oBAAoB,UAAU,IAAI;AAClD;AAEA,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,iBAAiB,OACnB,OAAO,MAAM;CAGf,OAAO,OAAO,KAAK;AACrB;;;;AAKA,SAAgB,qBACd,QACuC;CACvC,MAAM,iBACJ,WAAW,UACX,OAAO,OAAO,UAAU,YACxB,OAAO,UAAU,QACjB,CAAC,MAAM,QAAQ,OAAO,KAAK,IACvB,OAAO,QACP;CAEN,MAAM,SAAgD,CAAC;CACvD,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,cAAc,GACtD,IAAI,OAAO,UAAU,UACnB,OAAO,OAAO,EAAE,MAAM,MAAM;MAE5B,OAAO,OAAO;CAGlB,OAAO;AACT"}
|
|
@@ -98,7 +98,7 @@ interface CompilerConfig {
|
|
|
98
98
|
/**
|
|
99
99
|
* Vue template whitespace strategy or opt-in Vue 2 line-break migration mode
|
|
100
100
|
*/
|
|
101
|
-
whitespace?: "condense" | "preserve" | "vue2-line-breaks";
|
|
101
|
+
whitespace?: "condense" | "preserve" | "vue2-line-breaks" | "vue2-preserve";
|
|
102
102
|
/**
|
|
103
103
|
* Enable source map generation
|
|
104
104
|
*/
|
|
@@ -794,7 +794,7 @@ interface VizeConfigEntry {
|
|
|
794
794
|
}
|
|
795
795
|
//#endregion
|
|
796
796
|
//#region src/types/rules.d.ts
|
|
797
|
-
declare const LINT_RULE_NAMES: readonly ["a11y/alt-text", "a11y/anchor-has-content", "a11y/anchor-is-valid", "a11y/aria-props", "a11y/aria-role", "a11y/aria-unsupported-elements", "a11y/click-events-have-key-events", "a11y/form-control-has-label", "a11y/heading-has-content", "a11y/heading-levels", "a11y/iframe-has-title", "a11y/img-alt", "a11y/interactive-supports-focus", "a11y/label-has-for", "a11y/landmark-roles", "a11y/media-has-caption", "a11y/mouse-events-have-key-events", "a11y/no-access-key", "a11y/no-aria-hidden-on-focusable", "a11y/no-autofocus", "a11y/no-distracting-elements", "a11y/no-i-for-icon", "a11y/no-redundant-roles", "a11y/no-refer-to-non-existent-id", "a11y/no-role-presentation-on-focusable", "a11y/no-static-element-interactions", "a11y/placeholder-label-option", "a11y/role-has-required-aria-props", "a11y/tabindex-no-positive", "a11y/use-list", "css/no-display-none", "css/no-hardcoded-values", "css/no-id-selectors", "css/no-important", "css/no-utility-classes", "css/no-v-bind-performance", "css/prefer-logical-properties", "css/prefer-nested-selectors", "css/prefer-slotted", "css/require-font-display", "ecosystem/nuxt-prefer-nuxt-link", "ecosystem/pinia-prefer-store-to-refs", "ecosystem/router-link-require-to", "ecosystem/void-link-require-href", "ecosystem/void-link-valid-method", "ecosystem/vue-i18n-no-missing-key", "ecosystem/vue-router-prefer-named-link", "ecosystem/vue-router-prefer-named-push", "ecosystem/vue-test-utils-no-html-snapshot", "html/deprecated-attr", "html/deprecated-element", "html/id-duplication", "html/no-consecutive-br", "html/no-dupe-style-properties", "html/no-duplicate-class", "html/no-duplicate-dt", "html/no-empty-palpable-content", "html/require-datetime", "musea/no-empty-variant", "musea/prefer-design-tokens", "musea/require-component", "musea/require-title", "musea/unique-variant-names", "musea/valid-variant", "nuxt/no-nuxt-config-test-key", "nuxt/no-page-meta-runtime-values", "nuxt/nuxt-config-keys-order", "nuxt/prefer-import-meta", "petite-vue/no-unsupported-directive", "petite-vue/valid-v-effect", "petite-vue/valid-v-scope", "script/component-options-name-casing", "script/custom-event-name-casing", "script/define-emits-declaration", "script/define-macros-order", "script/define-props-declaration", "script/define-props-destructuring", "script/no-arrow-functions-in-watch", "script/no-async-in-computed", "script/no-boolean-default", "script/no-deep-destructure-in-props", "script/no-deprecated-data-object-declaration", "script/no-deprecated-destroyed-lifecycle", "script/no-deprecated-dollar-listeners-api", "script/no-deprecated-dollar-scopedslots-api", "script/no-deprecated-events-api", "script/no-deprecated-props-default-this", "script/no-dupe-keys", "script/no-duplicate-attr-inheritance", "script/no-export-in-script-setup", "script/no-get-current-instance", "script/no-import-compiler-macros", "script/no-internal-imports", "script/no-multiple-slot-args", "script/no-options-api", "script/no-potential-component-option-typo", "script/no-reactive-destructure", "script/no-ref-as-operand", "script/no-required-prop-with-default", "script/no-reserved-identifiers", "script/no-reserved-keys", "script/no-reserved-props", "script/no-restricted-globals", "script/no-restricted-members", "script/no-side-effects-in-computed-properties", "script/no-top-level-ref-in-script", "script/no-unstable-nested-components", "script/no-unused-emit-declarations", "script/no-use-computed-property-like-method", "script/no-with-defaults", "script/prefer-computed", "script/prefer-define-options", "script/prefer-import-from-vue", "script/prefer-ref-over-reactive", "script/prefer-use-attrs", "script/prefer-use-id", "script/prefer-use-slots", "script/prefer-use-template-ref", "script/require-default-prop", "script/require-explicit-emits", "script/require-explicit-slots", "script/require-function-return-type", "script/require-prop-type-constructor", "script/require-prop-types", "script/require-symbol-provide", "script/require-typed-object-prop", "script/require-typed-ref", "script/require-valid-default-prop", "script/return-in-computed-property", "script/return-in-emits-validator", "script/valid-define-emits", "script/valid-define-options", "script/valid-define-props", "script/valid-next-tick", "ssr/no-browser-globals-in-ssr", "ssr/no-hydration-mismatch", "type/no-floating-promises", "type/no-reactivity-loss", "type/no-unsafe-template-binding", "type/require-typed-emits", "type/require-typed-props", "type/strict-boolean-expressions", "vapor/no-inline-template", "vapor/no-vue-lifecycle-events", "vapor/prefer-static-class", "vapor/require-vapor-attribute", "vue/a11y-img-alt", "vue/attribute-hyphenation", "vue/attribute-order", "vue/component-definition-name-casing", "vue/component-name-in-template-casing", "vue/html-button-has-type", "vue/html-quotes", "vue/html-self-closing", "vue/max-template-complexity", "vue/multi-word-component-names", "vue/mustache-interpolation-spacing", "vue/no-array-index-key", "vue/no-bare-strings-in-template", "vue/no-boolean-attr-value", "vue/no-child-content", "vue/no-deprecated-filter", "vue/no-deprecated-functional-template", "vue/no-deprecated-html-element-is", "vue/no-deprecated-inline-template", "vue/no-deprecated-router-link-tag-prop", "vue/no-deprecated-scope-attribute", "vue/no-deprecated-slot-attribute", "vue/no-deprecated-slot-scope-attribute", "vue/no-deprecated-v-bind-sync", "vue/no-deprecated-v-on-native-modifier", "vue/no-deprecated-v-on-number-modifiers", "vue/no-dupe-v-else-if", "vue/no-duplicate-attributes", "vue/no-empty-component-block", "vue/no-inline-style", "vue/no-invalid-html-attribute", "vue/no-lone-template", "vue/no-multi-spaces", "vue/no-multiple-objects-in-class", "vue/no-multiple-template-root", "vue/no-mutating-props", "vue/no-negated-v-if-condition", "vue/no-non-component-keep-alive-child", "vue/no-preprocessor-lang", "vue/no-reserved-component-names", "vue/no-root-v-if", "vue/no-script-non-standard-lang", "vue/no-src-attribute", "vue/no-static-inline-styles", "vue/no-template-key", "vue/no-template-lang", "vue/no-template-shadow", "vue/no-template-target-blank", "vue/no-textarea-mustache", "vue/no-undefined-refs", "vue/no-unsafe-url", "vue/no-unsandboxed-iframe", "vue/no-unused-components", "vue/no-unused-properties", "vue/no-unused-refs", "vue/no-unused-setup-bindings", "vue/no-unused-vars", "vue/no-use-v-else-with-v-for", "vue/no-use-v-if-with-v-for", "vue/no-useless-mustaches", "vue/no-useless-template-attributes", "vue/no-useless-v-bind", "vue/no-v-for-template-key-on-child", "vue/no-v-html", "vue/no-v-text", "vue/no-v-text-v-html-on-component", "vue/permitted-contents", "vue/prefer-props-shorthand", "vue/prefer-true-attribute-shorthand", "vue/prop-name-casing", "vue/require-component-is", "vue/require-component-registration", "vue/require-scoped-style", "vue/require-toggle-inside-transition", "vue/require-v-for-key", "vue/scoped-event-names", "vue/sfc-element-order", "vue/single-style-block", "vue/slot-name-casing", "vue/this-in-template", "vue/use-unique-element-ids", "vue/use-v-on-exact", "vue/v-bind-style", "vue/v-on-event-hyphenation", "vue/v-on-handler-style", "vue/v-on-style", "vue/v-slot-style", "vue/valid-attribute-name", "vue/valid-template-root", "vue/valid-v-bind", "vue/valid-v-cloak", "vue/valid-v-else", "vue/valid-v-for", "vue/valid-v-html", "vue/valid-v-if", "vue/valid-v-memo", "vue/valid-v-model", "vue/valid-v-on", "vue/valid-v-once", "vue/valid-v-show", "vue/valid-v-slot", "vue/valid-v-text", "vue/warn-custom-block", "vue/warn-custom-directive"];
|
|
797
|
+
declare const LINT_RULE_NAMES: readonly ["a11y/alt-text", "a11y/anchor-has-content", "a11y/anchor-is-valid", "a11y/aria-props", "a11y/aria-role", "a11y/aria-unsupported-elements", "a11y/click-events-have-key-events", "a11y/form-control-has-label", "a11y/heading-has-content", "a11y/heading-levels", "a11y/iframe-has-title", "a11y/img-alt", "a11y/interactive-supports-focus", "a11y/label-has-for", "a11y/landmark-roles", "a11y/media-has-caption", "a11y/mouse-events-have-key-events", "a11y/no-access-key", "a11y/no-aria-hidden-on-focusable", "a11y/no-autofocus", "a11y/no-distracting-elements", "a11y/no-i-for-icon", "a11y/no-redundant-roles", "a11y/no-refer-to-non-existent-id", "a11y/no-role-presentation-on-focusable", "a11y/no-static-element-interactions", "a11y/placeholder-label-option", "a11y/role-has-required-aria-props", "a11y/tabindex-no-positive", "a11y/use-list", "css/no-display-none", "css/no-hardcoded-values", "css/no-id-selectors", "css/no-important", "css/no-utility-classes", "css/no-v-bind-performance", "css/prefer-logical-properties", "css/prefer-nested-selectors", "css/prefer-slotted", "css/require-font-display", "ecosystem/nuxt-prefer-nuxt-link", "ecosystem/pinia-prefer-store-to-refs", "ecosystem/router-link-require-to", "ecosystem/void-link-require-href", "ecosystem/void-link-valid-method", "ecosystem/vue-i18n-no-missing-key", "ecosystem/vue-router-prefer-named-link", "ecosystem/vue-router-prefer-named-push", "ecosystem/vue-test-utils-no-html-snapshot", "html/deprecated-attr", "html/deprecated-element", "html/id-duplication", "html/no-consecutive-br", "html/no-dupe-style-properties", "html/no-duplicate-class", "html/no-duplicate-dt", "html/no-empty-palpable-content", "html/require-datetime", "musea/no-empty-variant", "musea/prefer-design-tokens", "musea/require-component", "musea/require-title", "musea/unique-variant-names", "musea/valid-variant", "nuxt/no-nuxt-config-test-key", "nuxt/no-page-meta-runtime-values", "nuxt/nuxt-config-keys-order", "nuxt/prefer-import-meta", "petite-vue/no-unsupported-directive", "petite-vue/valid-v-effect", "petite-vue/valid-v-scope", "script/component-options-name-casing", "script/custom-event-name-casing", "script/define-emits-declaration", "script/define-macros-order", "script/define-props-declaration", "script/define-props-destructuring", "script/no-arrow-functions-in-watch", "script/no-async-in-computed", "script/no-boolean-default", "script/no-deep-destructure-in-props", "script/no-deprecated-data-object-declaration", "script/no-deprecated-destroyed-lifecycle", "script/no-deprecated-dollar-listeners-api", "script/no-deprecated-dollar-scopedslots-api", "script/no-deprecated-events-api", "script/no-deprecated-props-default-this", "script/no-dupe-keys", "script/no-duplicate-attr-inheritance", "script/no-export-in-script-setup", "script/no-get-current-instance", "script/no-import-compiler-macros", "script/no-internal-imports", "script/no-multiple-slot-args", "script/no-options-api", "script/no-potential-component-option-typo", "script/no-reactive-destructure", "script/no-ref-as-operand", "script/no-required-prop-with-default", "script/no-reserved-identifiers", "script/no-reserved-keys", "script/no-reserved-props", "script/no-restricted-globals", "script/no-restricted-members", "script/no-side-effects-in-computed-properties", "script/no-top-level-ref-in-script", "script/no-unstable-nested-components", "script/no-unused-emit-declarations", "script/no-use-computed-property-like-method", "script/no-with-defaults", "script/prefer-computed", "script/prefer-define-options", "script/prefer-import-from-vue", "script/prefer-ref-over-reactive", "script/prefer-use-attrs", "script/prefer-use-id", "script/prefer-use-slots", "script/prefer-use-template-ref", "script/require-default-prop", "script/require-explicit-emits", "script/require-explicit-slots", "script/require-function-return-type", "script/require-prop-type-constructor", "script/require-prop-types", "script/require-symbol-provide", "script/require-typed-object-prop", "script/require-typed-ref", "script/require-valid-default-prop", "script/return-in-computed-property", "script/return-in-emits-validator", "script/valid-define-emits", "script/valid-define-options", "script/valid-define-props", "script/valid-next-tick", "ssr/no-browser-globals-in-ssr", "ssr/no-hydration-mismatch", "type/no-floating-promises", "type/no-reactivity-loss", "type/no-unsafe-template-binding", "type/require-typed-emits", "type/require-typed-props", "type/strict-boolean-expressions", "vapor/no-inline-template", "vapor/no-vue-lifecycle-events", "vapor/prefer-static-class", "vapor/require-vapor-attribute", "vue/a11y-img-alt", "vue/attribute-hyphenation", "vue/attribute-order", "vue/component-definition-name-casing", "vue/component-name-in-template-casing", "vue/html-button-has-type", "vue/html-quotes", "vue/html-self-closing", "vue/max-template-complexity", "vue/multi-word-component-names", "vue/mustache-interpolation-spacing", "vue/no-array-index-key", "vue/no-bare-strings-in-template", "vue/no-boolean-attr-value", "vue/no-child-content", "vue/no-deprecated-filter", "vue/no-deprecated-functional-template", "vue/no-deprecated-html-element-is", "vue/no-deprecated-inline-template", "vue/no-deprecated-router-link-tag-prop", "vue/no-deprecated-scope-attribute", "vue/no-deprecated-slot-attribute", "vue/no-deprecated-slot-scope-attribute", "vue/no-deprecated-v-bind-sync", "vue/no-deprecated-v-is", "vue/no-deprecated-v-on-native-modifier", "vue/no-deprecated-v-on-number-modifiers", "vue/no-dupe-v-else-if", "vue/no-duplicate-attributes", "vue/no-empty-component-block", "vue/no-inline-style", "vue/no-invalid-html-attribute", "vue/no-lone-template", "vue/no-multi-spaces", "vue/no-multiple-objects-in-class", "vue/no-multiple-template-root", "vue/no-mutating-props", "vue/no-negated-v-if-condition", "vue/no-non-component-keep-alive-child", "vue/no-preprocessor-lang", "vue/no-reserved-component-names", "vue/no-root-v-if", "vue/no-script-non-standard-lang", "vue/no-src-attribute", "vue/no-static-inline-styles", "vue/no-template-key", "vue/no-template-lang", "vue/no-template-shadow", "vue/no-template-target-blank", "vue/no-textarea-mustache", "vue/no-undefined-refs", "vue/no-unsafe-url", "vue/no-unsandboxed-iframe", "vue/no-unused-components", "vue/no-unused-properties", "vue/no-unused-refs", "vue/no-unused-setup-bindings", "vue/no-unused-vars", "vue/no-use-v-else-with-v-for", "vue/no-use-v-if-with-v-for", "vue/no-useless-mustaches", "vue/no-useless-template-attributes", "vue/no-useless-v-bind", "vue/no-v-for-template-key-on-child", "vue/no-v-html", "vue/no-v-text", "vue/no-v-text-v-html-on-component", "vue/permitted-contents", "vue/prefer-props-shorthand", "vue/prefer-true-attribute-shorthand", "vue/prop-name-casing", "vue/require-component-is", "vue/require-component-registration", "vue/require-scoped-style", "vue/require-toggle-inside-transition", "vue/require-v-for-key", "vue/scoped-event-names", "vue/sfc-element-order", "vue/single-style-block", "vue/slot-name-casing", "vue/this-in-template", "vue/use-unique-element-ids", "vue/use-v-on-exact", "vue/v-bind-style", "vue/v-on-event-hyphenation", "vue/v-on-handler-style", "vue/v-on-style", "vue/v-slot-style", "vue/valid-attribute-name", "vue/valid-template-root", "vue/valid-v-bind", "vue/valid-v-cloak", "vue/valid-v-else", "vue/valid-v-else-if", "vue/valid-v-for", "vue/valid-v-html", "vue/valid-v-if", "vue/valid-v-is", "vue/valid-v-memo", "vue/valid-v-model", "vue/valid-v-on", "vue/valid-v-once", "vue/valid-v-pre", "vue/valid-v-show", "vue/valid-v-slot", "vue/valid-v-text", "vue/warn-custom-block", "vue/warn-custom-directive"];
|
|
798
798
|
type LintRuleName = (typeof LINT_RULE_NAMES)[number];
|
|
799
799
|
type LintRulesConfig = Partial<Record<LintRuleName, RuleSeverity>>;
|
|
800
800
|
//#endregion
|
|
@@ -804,6 +804,7 @@ interface ConfigEnv {
|
|
|
804
804
|
mode: string;
|
|
805
805
|
command: "serve" | "build" | "check" | "lint" | "fmt";
|
|
806
806
|
isSsrBuild?: boolean;
|
|
807
|
+
isPreview?: boolean;
|
|
807
808
|
}
|
|
808
809
|
type VueConfig = {
|
|
809
810
|
/**
|
|
@@ -811,6 +812,15 @@ type VueConfig = {
|
|
|
811
812
|
*/
|
|
812
813
|
version?: VueVersion;
|
|
813
814
|
};
|
|
815
|
+
/** Native Vue settings shared by Vite, Vite+, the CLI projection and the editor. */
|
|
816
|
+
type VueOptionKeys = "compiler" | "typeChecker" | "linter" | "formatter" | "languageServer" | "globalTypes" | "files" | "ignores" | "basePath" | "lib";
|
|
817
|
+
/** Scoped policy currently supported by the native configuration model. */
|
|
818
|
+
type VueOptionsEntry = Pick<VizeConfigEntry, "basePath" | "files" | "ignores" | "linter">;
|
|
819
|
+
/** Section option values reuse the native types rather than a second schema. */
|
|
820
|
+
type VueOptions = Pick<VizeConfig, VueOptionKeys> & {
|
|
821
|
+
version?: VueVersion;
|
|
822
|
+
entries?: VueOptionsEntry[];
|
|
823
|
+
};
|
|
814
824
|
type UserConfigEntry = VizeConfigEntry & {
|
|
815
825
|
/**
|
|
816
826
|
* Shared Vue dialect section accepted by the Rust config model.
|
|
@@ -854,6 +864,8 @@ interface LoadConfigOptions {
|
|
|
854
864
|
* Custom config file path (overrides automatic search)
|
|
855
865
|
*/
|
|
856
866
|
configFile?: string;
|
|
867
|
+
/** Read Vite settings during discovery. Integrations with an already loaded Vite config use false. */
|
|
868
|
+
viteConfig?: boolean;
|
|
857
869
|
/**
|
|
858
870
|
* Config environment for dynamic config resolution
|
|
859
871
|
*/
|
|
@@ -866,6 +878,9 @@ interface LoadConfigOptions {
|
|
|
866
878
|
*/
|
|
867
879
|
type LspConfig = LanguageServerConfig;
|
|
868
880
|
//#endregion
|
|
881
|
+
//#region ../../crates/vize_carton/src/config/loader/vite-runtime.d.mts
|
|
882
|
+
declare const VITE_CONFIG_FILE_NAMES: readonly string[];
|
|
883
|
+
//#endregion
|
|
869
884
|
//#region src/config.d.ts
|
|
870
885
|
declare const CONFIG_FILE_NAMES: readonly ["vize.config.pkl", "vize.config.ts", "vize.config.js", "vize.config.mjs", "vize.config.json"];
|
|
871
886
|
declare const VIZE_CONFIG_JSON_SCHEMA_PATH: any;
|
|
@@ -875,8 +890,10 @@ declare const VIZE_CONFIG_PKL_SCHEMA_PATH: any;
|
|
|
875
890
|
* Accepts a plain object or a function that receives ConfigEnv.
|
|
876
891
|
*/
|
|
877
892
|
declare function defineConfig(config: UserConfigExport): UserConfigExport;
|
|
893
|
+
/** Resolve native settings from an already loaded Vite/Vite+ export, without starting its plugins. */
|
|
894
|
+
declare function resolveViteConfigExport(exported: unknown, env?: ConfigEnv, configDir?: string): Promise<ResolvedVizeConfig>;
|
|
878
895
|
/**
|
|
879
|
-
* Load
|
|
896
|
+
* Load project settings from a compatible dedicated config or `vite.config.*`.
|
|
880
897
|
*/
|
|
881
898
|
declare function loadConfig(root: string, options?: LoadConfigOptions): Promise<ResolvedVizeConfig | null>;
|
|
882
899
|
declare function resolveConfigExport(exported: UserConfigExport, env?: ConfigEnv): Promise<ResolvedVizeConfig>;
|
|
@@ -885,5 +902,5 @@ declare function resolveConfigExport(exported: UserConfigExport, env?: ConfigEnv
|
|
|
885
902
|
*/
|
|
886
903
|
declare function normalizeGlobalTypes(config: GlobalTypesConfig): Record<string, GlobalTypeDeclaration>;
|
|
887
904
|
//#endregion
|
|
888
|
-
export {
|
|
889
|
-
//# sourceMappingURL=config-
|
|
905
|
+
export { LibConfig as A, VitePluginConfig as B, LintRulesConfig as C, GlobalTypeDeclaration as D, FormatterConfig as E, MuseaConfig as F, VizeConfigEntry as H, MuseaVrtConfig as I, RuleCategory as L, LinterConfig as M, MuseaA11yConfig as N, GlobalTypesConfig as O, MuseaAutogenConfig as P, RuleSeverity as R, LintRuleName as S, CompilerConfig as T, VueVersion as U, VizeConfig as V, UserConfigExport as _, loadConfig as a, VueOptions as b, resolveViteConfigExport as c, ConfigEnv as d, LoadConfigOptions as f, UserConfigEntry as g, UserConfig as h, defineConfig as i, LintPreset as j, LanguageServerConfig as k, VITE_CONFIG_FILE_NAMES as l, ResolvedVizeConfig as m, VIZE_CONFIG_JSON_SCHEMA_PATH as n, normalizeGlobalTypes as o, MaybePromise as p, VIZE_CONFIG_PKL_SCHEMA_PATH as r, resolveConfigExport as s, CONFIG_FILE_NAMES as t, LspConfig as u, UserConfigInput as v, CompilerCompatibilityConfig as w, VueOptionsEntry as x, VueConfig as y, TypeCheckerConfig as z };
|
|
906
|
+
//# sourceMappingURL=config-D6OxWiSS.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-D6OxWiSS.d.mts","names":["mode","command","isSsrBuild","isPreview","filePath","typeChecker","jsxTypecheck","T","vue","source","base","own","ConfigEnv","env","configDir","Promise","exported"],"sources":["../src/types/generated.ts","../src/types/rules.ts","../src/types/runtime.ts","../src/types/index.ts","../../../crates/vize_carton/src/config/loader/vite-runtime.d.mts","../src/config.ts"],"mappings":";;AAOA;;;;KAAY,UAAA;AAAA,KAQA,YAAA;AAAA,KAEA,YAAA;;;AAFY;KAOZ,UAAA;;;;UAKK,UAAA;EALL;;;EASV,IAAA;EAToB;AAKtB;;EAQE,QAAA;EAiBW;;;EAbX,KAAA;EAyBY;;;EArBZ,OAAA;EAyBc;;;EArBd,OAAA;EA0ByB;;;EAtBzB,OAAA;EACA,QAAA,GAAW,cAAA;EACX,aAAA;IAAA,CACG,CAAA;MAAA,CAGM,CAAA;IAAA;EAAA;EAIT,IAAA,GAAO,gBAAA;EACP,MAAA,GAAS,YAAA;EACT,WAAA,GAAc,iBAAA;EACd,SAAA,GAAY,eAAA;EACZ,cAAA,GAAiB,oBAAA;EACjB,GAAA,GAAM,oBAAA;EACN,KAAA,GAAQ,WAAA;EACR,WAAA,GAAc,iBAAA;EACd,GAAA,GAAM,SAAA;EALM;;;EASZ,OAAA,GAAU,eAAA;AAA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;EFrBN;;;EEyBA,OAAA,GAAU,eAAA;AAAA;AAAA,KAGA,eAAA,GAAkB,UAAA,GAAa,eAAe;AAAA,KAE9C,kBAAA,GAAqB,UAAA;EFf5B;;;;EEoBH,OAAA,EAAS,eAAe;AAAA;AAAA,KAGd,gBAAA,GACR,eAAA,KACE,GAAA,EAAK,SAAA,KAAc,YAAA,CAAa,eAAA;AAAA,UAMrB,iBAAA;EFrBf;;;;;;;EE6BA,IAAA;EFzBA;;;EE8BA,UAAA;EFzBA;EE4BA,UAAA;EF5ByB;AAAA;AAK3B;EE4BE,GAAA,GAAM,SAAS;AAAA;;;;;;KC3EL,SAAA,GAAS,oBAAgD;;;cC9BxD,sBAAA;;;cC2BA,iBAAA;AAAA,cAeA,4BAAA;AAAA,cAMA,2BAAA;AL1CS;AAQtB;;;AARsB,iBKgDN,YAAA,CAAa,MAAA,EAAQ,gBAAA,GAAmB,gBAAgB;ALxChD;AAAA,iBK6CF,uBAAA,CACpB,QAAA,WACA,GAAA,GAAM,SAAA,EACN,SAAA,YACC,OAAA,CAAQ,kBAAA;;;;iBAOW,UAAA,CACpB,IAAA,UACA,OAAA,GAAS,iBAAA,GACR,OAAA,CAAQ,kBAAA;AAAA,iBAsGW,mBAAA,CACpB,QAAA,EAAU,gBAAA,EACV,GAAA,GAAM,SAAA,GACL,OAAA,CAAQ,kBAAA;;;;iBAwGK,oBAAA,CACd,MAAA,EAAQ,iBAAA,GACP,MAAA,SAAe,qBAAA"}
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-
|
|
2
|
-
export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
|
|
1
|
+
import { a as loadConfig, c as resolveViteConfigExport, i as defineConfig, l as VITE_CONFIG_FILE_NAMES, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-D6OxWiSS.mjs";
|
|
2
|
+
export { CONFIG_FILE_NAMES, VITE_CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport, resolveViteConfigExport };
|
package/dist/config.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-
|
|
2
|
-
export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
|
|
1
|
+
import { a as loadConfig, c as resolveViteConfigExport, i as defineConfig, l as VITE_CONFIG_FILE_NAMES, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-BzFi1lsl.mjs";
|
|
2
|
+
export { CONFIG_FILE_NAMES, VITE_CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport, resolveViteConfigExport };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { CONFIG_FILE_NAMES, type CompilerCompatibilityConfig, type CompilerConfig, type ConfigEnv, type FormatterConfig, type GlobalTypeDeclaration, type GlobalTypesConfig, type LanguageServerConfig, type LibConfig, type LintPreset, type LintRuleName, type LintRulesConfig, type LinterConfig, type LoadConfigOptions, type LspConfig, type MaybePromise, type MuseaA11yConfig, type MuseaAutogenConfig, type MuseaConfig, type MuseaVrtConfig, type ResolvedVizeConfig, type RuleCategory, type RuleSeverity, type TypeCheckerConfig, type UserConfig, type UserConfigEntry, type UserConfigExport, type UserConfigInput, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, type VitePluginConfig, type VizeConfig, type VizeConfigEntry, type VueConfig, type VueVersion, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
|
|
1
|
+
import { A as LibConfig, B as VitePluginConfig, C as LintRulesConfig, D as GlobalTypeDeclaration, E as FormatterConfig, F as MuseaConfig, H as VizeConfigEntry, I as MuseaVrtConfig, L as RuleCategory, M as LinterConfig, N as MuseaA11yConfig, O as GlobalTypesConfig, P as MuseaAutogenConfig, R as RuleSeverity, S as LintRuleName, T as CompilerConfig, U as VueVersion, V as VizeConfig, _ as UserConfigExport, a as loadConfig, b as VueOptions, c as resolveViteConfigExport, d as ConfigEnv, f as LoadConfigOptions, g as UserConfigEntry, h as UserConfig, i as defineConfig, j as LintPreset, k as LanguageServerConfig, l as VITE_CONFIG_FILE_NAMES, m as ResolvedVizeConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, p as MaybePromise, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES, u as LspConfig, v as UserConfigInput, w as CompilerCompatibilityConfig, x as VueOptionsEntry, y as VueConfig, z as TypeCheckerConfig } from "./config-D6OxWiSS.mjs";
|
|
2
|
+
export { CONFIG_FILE_NAMES, type CompilerCompatibilityConfig, type CompilerConfig, type ConfigEnv, type FormatterConfig, type GlobalTypeDeclaration, type GlobalTypesConfig, type LanguageServerConfig, type LibConfig, type LintPreset, type LintRuleName, type LintRulesConfig, type LinterConfig, type LoadConfigOptions, type LspConfig, type MaybePromise, type MuseaA11yConfig, type MuseaAutogenConfig, type MuseaConfig, type MuseaVrtConfig, type ResolvedVizeConfig, type RuleCategory, type RuleSeverity, type TypeCheckerConfig, type UserConfig, type UserConfigEntry, type UserConfigExport, type UserConfigInput, VITE_CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, type VitePluginConfig, type VizeConfig, type VizeConfigEntry, type VueConfig, type VueOptions, type VueOptionsEntry, type VueVersion, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport, resolveViteConfigExport };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as loadConfig, i as defineConfig, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-
|
|
2
|
-
export { CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport };
|
|
1
|
+
import { a as loadConfig, c as resolveViteConfigExport, i as defineConfig, l as VITE_CONFIG_FILE_NAMES, n as VIZE_CONFIG_JSON_SCHEMA_PATH, o as normalizeGlobalTypes, r as VIZE_CONFIG_PKL_SCHEMA_PATH, s as resolveConfigExport, t as CONFIG_FILE_NAMES } from "./config-BzFi1lsl.mjs";
|
|
2
|
+
export { CONFIG_FILE_NAMES, VITE_CONFIG_FILE_NAMES, VIZE_CONFIG_JSON_SCHEMA_PATH, VIZE_CONFIG_PKL_SCHEMA_PATH, defineConfig, loadConfig, normalizeGlobalTypes, resolveConfigExport, resolveViteConfigExport };
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/ubugeeei-prod/vize/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@vizejs/native": "0.
|
|
10
|
+
"@vizejs/native": "0.457.0",
|
|
11
11
|
"oxc-transform": "0.144.0"
|
|
12
12
|
},
|
|
13
13
|
"description": "Vize - High-performance Vue.js toolchain in Rust",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
"version": "0.
|
|
109
|
+
"version": "0.457.0",
|
|
110
110
|
"scripts": {
|
|
111
111
|
"build": "vp run --workspace-root generate:rule-types && vp pack",
|
|
112
112
|
"check": "vp check src tests vite.config.ts",
|
|
113
113
|
"check:fix": "vp check --fix src tests vite.config.ts",
|
|
114
114
|
"fmt": "vp fmt --write src tests vite.config.ts",
|
|
115
115
|
"generate:rule-types": "vp run --workspace-root generate:rule-types",
|
|
116
|
-
"test": "vp pack && vp test run tests/config.test.ts tests/define-config.test.ts tests/corsa-runtime.test.ts tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-tsconfig.test.ts tests/init-prompt.test.ts"
|
|
116
|
+
"test": "vp pack && vp test run tests/config.test.ts tests/vite-project-config.test.ts tests/define-config.test.ts tests/corsa-runtime.test.ts tests/setup.test.ts tests/setup-oxlint-config.test.ts tests/init.test.ts tests/init-frameworks.test.ts tests/init-tsconfig.test.ts tests/init-prompt.test.ts tests/init-config-free.test.ts tests/init-workspace.test.ts"
|
|
117
117
|
}
|
|
118
118
|
}
|
package/pkl/CompilerConfig.pkl
CHANGED
|
@@ -3,7 +3,7 @@ module vize.CompilerConfig
|
|
|
3
3
|
|
|
4
4
|
typealias VueVersion = "3"|"2.7"|"2"|"1"|"0.11"|"0.10"
|
|
5
5
|
typealias TemplateSyntax = "standard" | "strict" | "quirks"
|
|
6
|
-
typealias Whitespace = "condense" | "preserve" | "vue2-line-breaks"
|
|
6
|
+
typealias Whitespace = "condense" | "preserve" | "vue2-line-breaks" | "vue2-preserve"
|
|
7
7
|
typealias JsxMode = "vdom" | "vapor"
|
|
8
8
|
typealias JsxCompat = "native" | "babel"
|
|
9
9
|
|
|
@@ -112,7 +112,7 @@ compilerConfigDef: JsonSchema = new JsonSchema {
|
|
|
112
112
|
}
|
|
113
113
|
["whitespace"] = new JsonSchema {
|
|
114
114
|
type = "string"
|
|
115
|
-
enum = new Listing { "condense"; "preserve"; "vue2-line-breaks" }
|
|
115
|
+
enum = new Listing { "condense"; "preserve"; "vue2-line-breaks"; "vue2-preserve" }
|
|
116
116
|
description = "Vue template whitespace strategy or opt-in Vue 2 line-break migration mode"
|
|
117
117
|
default = "condense"
|
|
118
118
|
}
|
package/pkl/vize.pkl
CHANGED
|
@@ -11,7 +11,7 @@ import "SortImportsConfig.pkl"
|
|
|
11
11
|
import "LintRuleOptionTypes.pkl"
|
|
12
12
|
typealias CompilerMode = "module" | "function"
|
|
13
13
|
typealias TemplateSyntax = "standard" | "strict" | "quirks"
|
|
14
|
-
typealias Whitespace = "condense" | "preserve" | "vue2-line-breaks"
|
|
14
|
+
typealias Whitespace = "condense" | "preserve" | "vue2-line-breaks" | "vue2-preserve"
|
|
15
15
|
typealias JsxMode = "vdom" | "vapor"
|
|
16
16
|
typealias JsxCompat = "native" | "babel"
|
|
17
17
|
typealias ScriptExt = "ts" | "js"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"description": "Vue template whitespace strategy or opt-in Vue 2 line-break migration mode",
|
|
96
96
|
"default": "condense",
|
|
97
97
|
"type": "string",
|
|
98
|
-
"enum": ["condense", "preserve", "vue2-line-breaks"]
|
|
98
|
+
"enum": ["condense", "preserve", "vue2-line-breaks", "vue2-preserve"]
|
|
99
99
|
},
|
|
100
100
|
"sourceMap": {
|
|
101
101
|
"description": "Enable source map generation",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../../crates/vize_carton/src/config/loader/vite-runtime.mjs";
|
package/src/config.ts
CHANGED
|
@@ -12,6 +12,13 @@ import type {
|
|
|
12
12
|
GlobalTypeDeclaration,
|
|
13
13
|
} from "./types/index.js";
|
|
14
14
|
import { loadPklConfigJson } from "./config/pkl.js";
|
|
15
|
+
import {
|
|
16
|
+
VITE_CONFIG_FILE_NAMES,
|
|
17
|
+
isViteConfigFile,
|
|
18
|
+
resolveViteConfigExport as projectViteConfigExport,
|
|
19
|
+
} from "./config/vite-runtime.mjs";
|
|
20
|
+
|
|
21
|
+
export { VITE_CONFIG_FILE_NAMES } from "./config/vite-runtime.mjs";
|
|
15
22
|
|
|
16
23
|
type NativeConfigHelpers = {
|
|
17
24
|
normalizeVizeConfig(value: unknown): unknown;
|
|
@@ -50,14 +57,23 @@ export function defineConfig(config: UserConfigExport): UserConfigExport {
|
|
|
50
57
|
return config;
|
|
51
58
|
}
|
|
52
59
|
|
|
60
|
+
/** Resolve native settings from an already loaded Vite/Vite+ export, without starting its plugins. */
|
|
61
|
+
export async function resolveViteConfigExport(
|
|
62
|
+
exported: unknown,
|
|
63
|
+
env?: ConfigEnv,
|
|
64
|
+
configDir?: string,
|
|
65
|
+
): Promise<ResolvedVizeConfig> {
|
|
66
|
+
return normalizeLoadedConfig(await projectViteConfigExport(exported, env, configDir));
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
/**
|
|
54
|
-
* Load
|
|
70
|
+
* Load project settings from a compatible dedicated config or `vite.config.*`.
|
|
55
71
|
*/
|
|
56
72
|
export async function loadConfig(
|
|
57
73
|
root: string,
|
|
58
74
|
options: LoadConfigOptions = {},
|
|
59
75
|
): Promise<ResolvedVizeConfig | null> {
|
|
60
|
-
const { mode = "root", configFile, env } = options;
|
|
76
|
+
const { mode = "root", configFile, env, viteConfig = true } = options;
|
|
61
77
|
|
|
62
78
|
if (mode === "none") {
|
|
63
79
|
return null;
|
|
@@ -72,14 +88,18 @@ export async function loadConfig(
|
|
|
72
88
|
}
|
|
73
89
|
|
|
74
90
|
if (mode === "auto") {
|
|
75
|
-
return loadConfigFromDirAuto(root, env);
|
|
91
|
+
return loadConfigFromDirAuto(root, env, viteConfig);
|
|
76
92
|
}
|
|
77
93
|
|
|
78
|
-
return loadConfigFromDir(root, env);
|
|
94
|
+
return loadConfigFromDir(root, env, viteConfig);
|
|
79
95
|
}
|
|
80
96
|
|
|
81
|
-
async function loadConfigFromDir(
|
|
82
|
-
|
|
97
|
+
async function loadConfigFromDir(
|
|
98
|
+
dir: string,
|
|
99
|
+
env?: ConfigEnv,
|
|
100
|
+
viteConfig = true,
|
|
101
|
+
): Promise<ResolvedVizeConfig | null> {
|
|
102
|
+
for (const name of [...CONFIG_FILE_NAMES, ...(viteConfig ? VITE_CONFIG_FILE_NAMES : [])]) {
|
|
83
103
|
const filePath = path.join(dir, name);
|
|
84
104
|
if (!fs.existsSync(filePath)) {
|
|
85
105
|
continue;
|
|
@@ -96,15 +116,23 @@ async function loadConfigFromDir(dir: string, env?: ConfigEnv): Promise<Resolved
|
|
|
96
116
|
async function loadConfigFromDirAuto(
|
|
97
117
|
startDir: string,
|
|
98
118
|
env?: ConfigEnv,
|
|
119
|
+
viteConfig = true,
|
|
99
120
|
): Promise<ResolvedVizeConfig | null> {
|
|
100
121
|
let currentDir = path.resolve(startDir);
|
|
101
122
|
|
|
102
123
|
while (true) {
|
|
103
|
-
const config = await loadConfigFromDir(currentDir, env);
|
|
124
|
+
const config = await loadConfigFromDir(currentDir, env, viteConfig);
|
|
104
125
|
if (config !== null) {
|
|
105
126
|
return config;
|
|
106
127
|
}
|
|
107
128
|
|
|
129
|
+
if (
|
|
130
|
+
["package.json", "tsconfig.json", "jsconfig.json"].some((name) =>
|
|
131
|
+
fs.existsSync(path.join(currentDir, name)),
|
|
132
|
+
)
|
|
133
|
+
) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
108
136
|
const parentDir = path.dirname(currentDir);
|
|
109
137
|
if (parentDir === currentDir) {
|
|
110
138
|
return null;
|
|
@@ -134,7 +162,7 @@ async function loadConfigFile(
|
|
|
134
162
|
return parseJsonConfig(content, absolutePath);
|
|
135
163
|
}
|
|
136
164
|
|
|
137
|
-
if (ext === ".ts") {
|
|
165
|
+
if (ext === ".ts" || ext === ".mts") {
|
|
138
166
|
return loadTypeScriptConfig(absolutePath, env);
|
|
139
167
|
}
|
|
140
168
|
|
|
@@ -179,7 +207,7 @@ async function loadTypeScriptConfig(
|
|
|
179
207
|
try {
|
|
180
208
|
const module = await importFresh(tempFile);
|
|
181
209
|
const exported: UserConfigExport = module.default || module;
|
|
182
|
-
return
|
|
210
|
+
return resolveFileExport(exported, filePath, env);
|
|
183
211
|
} finally {
|
|
184
212
|
fs.rmSync(tempFile, { force: true });
|
|
185
213
|
}
|
|
@@ -188,7 +216,17 @@ async function loadTypeScriptConfig(
|
|
|
188
216
|
async function loadESMConfig(filePath: string, env?: ConfigEnv): Promise<ResolvedVizeConfig> {
|
|
189
217
|
const module = await importFresh(filePath);
|
|
190
218
|
const exported: UserConfigExport = module.default || module;
|
|
191
|
-
return
|
|
219
|
+
return resolveFileExport(exported, filePath, env);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async function resolveFileExport(
|
|
223
|
+
exported: UserConfigExport,
|
|
224
|
+
filePath: string,
|
|
225
|
+
env?: ConfigEnv,
|
|
226
|
+
): Promise<ResolvedVizeConfig> {
|
|
227
|
+
return isViteConfigFile(filePath)
|
|
228
|
+
? resolveViteConfigExport(exported, env, path.dirname(filePath))
|
|
229
|
+
: resolveConfigExport(exported, env);
|
|
192
230
|
}
|
|
193
231
|
|
|
194
232
|
async function importFresh(filePath: string): Promise<Record<string, unknown>> {
|
package/src/index.ts
CHANGED
|
@@ -26,6 +26,8 @@ export type {
|
|
|
26
26
|
LoadConfigOptions,
|
|
27
27
|
ConfigEnv,
|
|
28
28
|
VueConfig,
|
|
29
|
+
VueOptions,
|
|
30
|
+
VueOptionsEntry,
|
|
29
31
|
UserConfig,
|
|
30
32
|
UserConfigEntry,
|
|
31
33
|
UserConfigExport,
|
|
@@ -45,10 +47,12 @@ export type {
|
|
|
45
47
|
// Config utilities
|
|
46
48
|
export {
|
|
47
49
|
CONFIG_FILE_NAMES,
|
|
50
|
+
VITE_CONFIG_FILE_NAMES,
|
|
48
51
|
VIZE_CONFIG_JSON_SCHEMA_PATH,
|
|
49
52
|
VIZE_CONFIG_PKL_SCHEMA_PATH,
|
|
50
53
|
defineConfig,
|
|
51
54
|
loadConfig,
|
|
52
55
|
resolveConfigExport,
|
|
56
|
+
resolveViteConfigExport,
|
|
53
57
|
normalizeGlobalTypes,
|
|
54
58
|
} from "./config.js";
|
package/src/init/detect.ts
CHANGED
|
@@ -62,8 +62,28 @@ export interface ProjectDetection {
|
|
|
62
62
|
* command in its corsa-not-found message; if the two ever disagreed, a user
|
|
63
63
|
* would be told to run `pnpm add` by one half of the toolchain and `npm install`
|
|
64
64
|
* by the other.
|
|
65
|
+
*
|
|
66
|
+
* A workspace package has no lockfile of its own, so the search continues in
|
|
67
|
+
* the parent directories and the nearest answer wins. It stops at the
|
|
68
|
+
* repository root: a lockfile above the directory that holds `.git` belongs to
|
|
69
|
+
* something else.
|
|
65
70
|
*/
|
|
66
71
|
export function detectPackageManager(root: string): PackageManager | null {
|
|
72
|
+
let directory = path.resolve(root);
|
|
73
|
+
for (;;) {
|
|
74
|
+
const detected = detectPackageManagerIn(directory);
|
|
75
|
+
if (detected !== null) {
|
|
76
|
+
return detected;
|
|
77
|
+
}
|
|
78
|
+
const parent = path.dirname(directory);
|
|
79
|
+
if (parent === directory || fs.existsSync(path.join(directory, ".git"))) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
directory = parent;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function detectPackageManagerIn(root: string): PackageManager | null {
|
|
67
87
|
const exists = (name: string): boolean => fs.existsSync(path.join(root, name));
|
|
68
88
|
if (exists("pnpm-lock.yaml")) {
|
|
69
89
|
return "pnpm";
|