feat: init
This commit is contained in:
21
node_modules/@dxup/nuxt/LICENSE
generated
vendored
Normal file
21
node_modules/@dxup/nuxt/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2025-present KazariEX
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
112
node_modules/@dxup/nuxt/README.md
generated
vendored
Normal file
112
node_modules/@dxup/nuxt/README.md
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
# @dxup/nuxt
|
||||
|
||||
[](https://www.npmjs.com/package/@dxup/nuxt)
|
||||
[](https://www.npmjs.com/package/@dxup/nuxt)
|
||||
[](/LICENSE)
|
||||
|
||||
This is a TypeScript plugin that improves Nuxt DX.
|
||||
|
||||
> [!note]
|
||||
> It's now an experimental builtin feature of Nuxt. Please refer to the [documentation](https://nuxt.com/docs/4.x/guide/going-further/experimental-features#typescriptplugin) for more details.
|
||||
|
||||
## Installation
|
||||
|
||||
*No installation is required if you are using Nuxt 4.2 or above.*
|
||||
|
||||
## Usage
|
||||
|
||||
1. Have `@dxup/unimport` installed as a dependency if you haven't enabled the `shamefullyHoist` option with pnpm workspace.
|
||||
|
||||
2. Add the following to your `nuxt.config.ts`:
|
||||
|
||||
```ts
|
||||
export default defineNuxtConfig({
|
||||
experimental: {
|
||||
typescriptPlugin: true,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
3. Run `nuxt prepare` and restart the tsserver.
|
||||
|
||||
## Features
|
||||
|
||||
### 1. components
|
||||
|
||||
Update references when renaming auto imported component files.
|
||||
|
||||
For example, when renaming `components/foo/bar.vue` to `components/foo/baz.vue`, all usages of `<FooBar />` will be updated to `<FooBaz />`.
|
||||
|
||||
It only works when the dev server is active.
|
||||
|
||||
### 2. importGlob
|
||||
|
||||
Go to definition for dynamic imports with glob patterns.
|
||||
|
||||
```ts
|
||||
import(`~/assets/${name}.webp`);
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
import.meta.glob("~/assets/*.webp");
|
||||
// ^^^^^^^^^^^^^^^^^
|
||||
```
|
||||
|
||||
### 3. nitroRoutes
|
||||
|
||||
Go to definition for nitro routes in data fetching methods.
|
||||
|
||||
```ts
|
||||
useFetch("/api/foo");
|
||||
// ^^^^^^^^^^
|
||||
// Also `$fetch` and `useLazyFetch`.
|
||||
```
|
||||
|
||||
### 4. pageMeta
|
||||
|
||||
Go to definition for page metadata.
|
||||
|
||||
```ts
|
||||
definePageMeta({
|
||||
layout: "admin",
|
||||
// ^^^^^^^
|
||||
middleware: ["auth"],
|
||||
// ^^^^^^
|
||||
});
|
||||
```
|
||||
|
||||
It will fallback to resolve the URL from your `public` directory when no nitro routes match.
|
||||
|
||||
### 5. runtimeConfig
|
||||
|
||||
Go to definition for runtime config.
|
||||
|
||||
```vue
|
||||
<template>
|
||||
{{ $config.public.domain }}
|
||||
<!-- ^^^^^^ -->
|
||||
</template>
|
||||
```
|
||||
|
||||
### 6. typedPages
|
||||
|
||||
Go to definition for typed pages.
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<nuxt-link :to="{ name: `about` }"/>
|
||||
<!-- ^^^^^^^ -->
|
||||
</template>
|
||||
```
|
||||
|
||||
It can be triggered on the `name` property of an object literal constrained by the `RouteLocationRaw` type.
|
||||
|
||||
### 7. unimport
|
||||
|
||||
Find references for SFC on `<template>`.
|
||||
|
||||
```vue
|
||||
....<template>
|
||||
<!-- ^^^^^^^^ -->
|
||||
</template>
|
||||
```
|
||||
|
||||
Please refer to the [@dxup/unimport](/packages/unimport) package for more details.
|
||||
60
node_modules/@dxup/nuxt/dist/module.d.mts
generated
vendored
Normal file
60
node_modules/@dxup/nuxt/dist/module.d.mts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import * as _nuxt_schema0 from "@nuxt/schema";
|
||||
|
||||
//#region src/module/index.d.ts
|
||||
interface ModuleOptions {
|
||||
features?: {
|
||||
/**
|
||||
* Whether to update references when renaming auto imported component files.
|
||||
* @default true
|
||||
*/
|
||||
components?: boolean;
|
||||
/**
|
||||
* Whether to enable Go to Definition for dynamic imports with glob patterns.
|
||||
* @default true
|
||||
*/
|
||||
importGlob?: boolean;
|
||||
/**
|
||||
* Whether to enable Go to Definition for nitro routes in data fetching methods.
|
||||
* @default true
|
||||
*/
|
||||
nitroRoutes?: boolean;
|
||||
/**
|
||||
* Whether to enable Go to Definition for page metadata.
|
||||
* @default true
|
||||
*/
|
||||
pageMeta?: boolean;
|
||||
/**
|
||||
* Whether to enable Go to Definition for runtime config.
|
||||
* @default true
|
||||
*/
|
||||
runtimeConfig?: boolean;
|
||||
/**
|
||||
* Whether to enable Go to Definition for typed pages.
|
||||
* @default true
|
||||
*/
|
||||
typedPages?: boolean;
|
||||
/**
|
||||
* Whether to enable enhanced navigation for auto imported APIs.
|
||||
* @default true
|
||||
*/
|
||||
unimport?: boolean | {
|
||||
/**
|
||||
* Whether to enable Find References for SFC on `<template>`.
|
||||
*/
|
||||
componentReferences: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, {
|
||||
features: {
|
||||
components: true;
|
||||
importGlob: true;
|
||||
nitroRoutes: true;
|
||||
pageMeta: true;
|
||||
runtimeConfig: true;
|
||||
typedPages: true;
|
||||
unimport: true;
|
||||
};
|
||||
}, true>;
|
||||
//#endregion
|
||||
export { ModuleOptions, _default as default };
|
||||
131
node_modules/@dxup/nuxt/dist/module.mjs
generated
vendored
Normal file
131
node_modules/@dxup/nuxt/dist/module.mjs
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
import { addTemplate, defineNuxtModule, useNitro } from "@nuxt/kit";
|
||||
import { Buffer } from "node:buffer";
|
||||
import EventEmitter from "node:events";
|
||||
import { mkdir, open, readFile, writeFile } from "node:fs/promises";
|
||||
import { watch } from "chokidar";
|
||||
import { dirname, join } from "pathe";
|
||||
|
||||
//#region package.json
|
||||
var name = "@dxup/nuxt";
|
||||
|
||||
//#endregion
|
||||
//#region src/event/client.ts
|
||||
const responseRE = /^```json \{(?<key>.*)\}\n(?<value>[\s\S]*?)\n```$/;
|
||||
async function createEventClient(nuxt) {
|
||||
const path = join(nuxt.options.buildDir, "dxup/events.md");
|
||||
await mkdir(dirname(path), { recursive: true });
|
||||
await writeFile(path, "");
|
||||
const fd = await open(path, "r");
|
||||
const watcher = watch(path, { ignoreInitial: true });
|
||||
nuxt.hook("close", async () => {
|
||||
await fd.close();
|
||||
await watcher.close();
|
||||
});
|
||||
const client = new EventEmitter();
|
||||
let offset = 0;
|
||||
watcher.on("change", async (path$1, stats) => {
|
||||
if (!stats || stats.size <= offset) return;
|
||||
const pos = offset;
|
||||
offset = stats.size;
|
||||
const buffer = Buffer.alloc(offset - pos);
|
||||
await fd.read(buffer, 0, buffer.length, pos);
|
||||
const match = buffer.toString("utf-8").trim().match(responseRE);
|
||||
if (match) {
|
||||
const { key, value } = match.groups;
|
||||
client.emit(key, JSON.parse(value));
|
||||
}
|
||||
});
|
||||
return client;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/module/events.ts
|
||||
const uppercaseRE = /[A-Z]/;
|
||||
async function onComponentsRename(nuxt, { fileName, references }) {
|
||||
const component = Object.values(nuxt.apps).flatMap((app) => app.components).find((c) => c.filePath === fileName);
|
||||
if (!component) return;
|
||||
const tasks = Object.entries(references).map(async ([fileName$1, references$1]) => {
|
||||
const code = await readFile(fileName$1, "utf-8");
|
||||
const chunks = [];
|
||||
let offset = 0;
|
||||
for (const { textSpan, lazy } of references$1) {
|
||||
const start = textSpan.start;
|
||||
const end = start + textSpan.length;
|
||||
const oldName = code.slice(start, end);
|
||||
const newName = uppercaseRE.test(oldName) ? lazy ? "Lazy" + component.pascalName : component.pascalName : lazy ? "lazy-" + component.kebabName : component.kebabName;
|
||||
chunks.push(code.slice(offset, start), newName);
|
||||
offset = end;
|
||||
}
|
||||
chunks.push(code.slice(offset));
|
||||
await writeFile(fileName$1, chunks.join(""));
|
||||
});
|
||||
await Promise.all(tasks);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/module/index.ts
|
||||
var module_default = defineNuxtModule().with({
|
||||
meta: {
|
||||
name,
|
||||
configKey: "dxup"
|
||||
},
|
||||
defaults: { features: {
|
||||
components: true,
|
||||
importGlob: true,
|
||||
nitroRoutes: true,
|
||||
pageMeta: true,
|
||||
runtimeConfig: true,
|
||||
typedPages: true,
|
||||
unimport: true
|
||||
} },
|
||||
async setup(options, nuxt) {
|
||||
const pluginsTs = [{ name: "@dxup/nuxt" }];
|
||||
if (options.features?.unimport) pluginsTs.unshift({ name: "@dxup/unimport" });
|
||||
append(pluginsTs, nuxt.options, "typescript", "tsConfig", "compilerOptions");
|
||||
append(pluginsTs, nuxt.options.nitro, "typescript", "tsConfig", "compilerOptions");
|
||||
append(pluginsTs, nuxt.options, "typescript", "sharedTsConfig", "compilerOptions");
|
||||
append(pluginsTs, nuxt.options, "typescript", "nodeTsConfig", "compilerOptions");
|
||||
addTemplate({
|
||||
filename: "dxup/data.json",
|
||||
write: true,
|
||||
getContents({ nuxt: nuxt$1, app }) {
|
||||
const layouts = Object.fromEntries(Object.values(app.layouts).map((item) => [item.name, item.file]));
|
||||
const middleware = app.middleware.reduce((acc, item) => {
|
||||
if (!item.global) acc[item.name] = item.path;
|
||||
return acc;
|
||||
}, {});
|
||||
const nitroRoutes = useNitro().scannedHandlers.reduce((acc, item) => {
|
||||
if (item.route && item.method) (acc[item.route] ??= {})[item.method] = item.handler;
|
||||
return acc;
|
||||
}, {});
|
||||
const typedPages = app.pages?.reduce(function reducer(acc, page) {
|
||||
if (page.name && page.file) acc[page.name] = page.file;
|
||||
if (page.children) for (const child of page.children) reducer(acc, child);
|
||||
return acc;
|
||||
}, {});
|
||||
const data = {
|
||||
buildDir: nuxt$1.options.buildDir,
|
||||
publicDir: nuxt$1.options.dir.public,
|
||||
configFiles: [...nuxt$1.options._nuxtConfigFiles, ...nuxt$1.options._layers.map((layer) => layer._configFile).filter(Boolean)],
|
||||
layouts,
|
||||
middleware,
|
||||
nitroRoutes,
|
||||
typedPages,
|
||||
features: {
|
||||
...options.features,
|
||||
unimport: { componentReferences: typeof options.features.unimport === "object" ? options.features.unimport.componentReferences : options.features.unimport }
|
||||
}
|
||||
};
|
||||
return JSON.stringify(data, null, 2);
|
||||
}
|
||||
});
|
||||
if (nuxt.options.dev) (await createEventClient(nuxt)).on("components:rename", (data) => onComponentsRename(nuxt, data));
|
||||
}
|
||||
});
|
||||
function append(plugins, target, ...keys) {
|
||||
for (const key of keys) target = target[key] ??= {};
|
||||
(target.plugins ??= []).push(...plugins);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
export { module_default as default };
|
||||
540
node_modules/@dxup/nuxt/dist/typescript.cjs
generated
vendored
Normal file
540
node_modules/@dxup/nuxt/dist/typescript.cjs
generated
vendored
Normal file
@@ -0,0 +1,540 @@
|
||||
//#region rolldown:runtime
|
||||
var __defProp = Object.defineProperty;
|
||||
var __export = (all, symbols) => {
|
||||
let target = {};
|
||||
for (var name in all) {
|
||||
__defProp(target, name, {
|
||||
get: all[name],
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
if (symbols) {
|
||||
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
//#endregion
|
||||
let node_fs_promises = require("node:fs/promises");
|
||||
let pathe = require("pathe");
|
||||
let tinyglobby = require("tinyglobby");
|
||||
|
||||
//#region src/event/server.ts
|
||||
function createEventServer(info) {
|
||||
const path = (0, pathe.join)(info.project.getCurrentDirectory(), "dxup/events.md");
|
||||
async function write(key, data) {
|
||||
try {
|
||||
await (0, node_fs_promises.appendFile)(path, `\`\`\`json {${key}}\n${JSON.stringify(data, null, 2)}\n\`\`\`\n`);
|
||||
} catch {}
|
||||
}
|
||||
return { write };
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/data.ts
|
||||
const initialValue = {
|
||||
buildDir: "",
|
||||
publicDir: "",
|
||||
configFiles: [],
|
||||
layouts: {},
|
||||
middleware: {},
|
||||
nitroRoutes: {},
|
||||
typedPages: {},
|
||||
features: {
|
||||
components: true,
|
||||
importGlob: true,
|
||||
nitroRoutes: true,
|
||||
pageMeta: true,
|
||||
runtimeConfig: true,
|
||||
typedPages: true,
|
||||
unimport: { componentReferences: true }
|
||||
}
|
||||
};
|
||||
const callbacks = {};
|
||||
function createData(ts, info) {
|
||||
const path = (0, pathe.join)(info.languageServiceHost.getCurrentDirectory(), "dxup/data.json");
|
||||
const data = {};
|
||||
const updates = callbacks[path] ??= (ts.sys.watchFile?.(path, () => {
|
||||
const text$1 = ts.sys.readFile(path);
|
||||
for (const update of updates) update(text$1);
|
||||
}), []);
|
||||
updates.push((text$1) => {
|
||||
Object.assign(data, {
|
||||
...initialValue,
|
||||
...text$1 ? JSON.parse(text$1) : {}
|
||||
});
|
||||
});
|
||||
const text = ts.sys.readFile(path);
|
||||
updates.at(-1)(text);
|
||||
return data;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/utils.ts
|
||||
function createModuleDefinition(ts, path) {
|
||||
return {
|
||||
fileName: path,
|
||||
textSpan: {
|
||||
start: 0,
|
||||
length: 0
|
||||
},
|
||||
kind: ts.ScriptElementKind.moduleElement,
|
||||
name: `"${path}"`,
|
||||
containerKind: ts.ScriptElementKind.unknown,
|
||||
containerName: ""
|
||||
};
|
||||
}
|
||||
function isVueVirtualCode(code) {
|
||||
return code?.languageId === "vue";
|
||||
}
|
||||
function withVirtualOffset(language, sourceScript, position, method) {
|
||||
const serviceScript = sourceScript.generated.languagePlugin.typescript?.getServiceScript(sourceScript.generated.root);
|
||||
if (!serviceScript) return;
|
||||
const map = language.maps.get(serviceScript.code, sourceScript);
|
||||
const leadingOffset = sourceScript.snapshot.getLength();
|
||||
const offset = 1145141919810;
|
||||
const mapping = {
|
||||
sourceOffsets: [offset],
|
||||
generatedOffsets: [position - leadingOffset],
|
||||
lengths: [0],
|
||||
data: {
|
||||
completion: true,
|
||||
navigation: true,
|
||||
semantic: true,
|
||||
verification: true
|
||||
}
|
||||
};
|
||||
const original = map.toGeneratedLocation;
|
||||
map.toGeneratedLocation = function* (sourceOffset, ...args) {
|
||||
if (sourceOffset === offset) yield [mapping.generatedOffsets[0], mapping];
|
||||
yield* original.call(this, sourceOffset, ...args);
|
||||
};
|
||||
try {
|
||||
return method(offset);
|
||||
} finally {
|
||||
map.toGeneratedLocation = original;
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/features/findReferences.ts
|
||||
var findReferences_exports = /* @__PURE__ */ __export({ postprocess: () => postprocess$1 });
|
||||
function postprocess$1(context, language, findReferences) {
|
||||
const { ts, info } = context;
|
||||
return (...args) => {
|
||||
const result = findReferences(...args);
|
||||
if (!result?.length) {
|
||||
const sourceScript = language.scripts.get(args[0]);
|
||||
const root = sourceScript?.generated?.root;
|
||||
if (!isVueVirtualCode(root)) return;
|
||||
const start = (root.sfc.template?.start ?? Infinity) + 1;
|
||||
if (args[1] < start || args[1] > start + 8) return;
|
||||
const sourceFile = info.languageService.getProgram().getSourceFile(args[0]);
|
||||
if (!sourceFile) return;
|
||||
for (const statement of sourceFile.statements) if (ts.isExportAssignment(statement)) return withVirtualOffset(language, sourceScript, statement.getChildAt(1).getStart(sourceFile), (position) => findReferences(args[0], position));
|
||||
return;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/features/findRenameLocations.ts
|
||||
var findRenameLocations_exports = /* @__PURE__ */ __export({ preprocess: () => preprocess$2 });
|
||||
function preprocess$2(context, findRenameLocations) {
|
||||
const { data } = context;
|
||||
return (...args) => {
|
||||
return findRenameLocations(...args)?.filter((edit) => {
|
||||
return !edit.fileName.startsWith(data.buildDir);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region ../shared/src/index.ts
|
||||
function* forEachTouchingNode(ts, sourceFile, position) {
|
||||
yield* binaryVisit(ts, sourceFile, sourceFile, position);
|
||||
}
|
||||
function* binaryVisit(ts, sourceFile, node, position) {
|
||||
const nodes = [];
|
||||
ts.forEachChild(node, (child) => {
|
||||
nodes.push(child);
|
||||
});
|
||||
let left = 0;
|
||||
let right = nodes.length - 1;
|
||||
while (left <= right) {
|
||||
const mid = Math.floor((left + right) / 2);
|
||||
const node$1 = nodes[mid];
|
||||
if (position > node$1.getEnd()) left = mid + 1;
|
||||
else if (position < node$1.getStart(sourceFile)) right = mid - 1;
|
||||
else {
|
||||
yield node$1;
|
||||
yield* binaryVisit(ts, sourceFile, node$1, position);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
function isTextSpanWithin(node, textSpan, sourceFile) {
|
||||
return textSpan.start + textSpan.length <= node.getEnd() && textSpan.start >= node.getStart(sourceFile);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/features/getDefinitionAndBoundSpan.ts
|
||||
var getDefinitionAndBoundSpan_exports = /* @__PURE__ */ __export({
|
||||
postprocess: () => postprocess,
|
||||
preprocess: () => preprocess$1
|
||||
});
|
||||
const fetchFunctions = new Set([
|
||||
"$fetch",
|
||||
"useFetch",
|
||||
"useLazyFetch"
|
||||
]);
|
||||
const pageMetaKeys = new Set(["layout", "middleware"]);
|
||||
function postprocess(context, language, getDefinitionAndBoundSpan) {
|
||||
const { ts } = context;
|
||||
return (...args) => {
|
||||
const result = getDefinitionAndBoundSpan(...args);
|
||||
if (!result?.definitions?.length) {
|
||||
const root = language.scripts.get(args[0])?.generated?.root;
|
||||
if (!isVueVirtualCode(root)) return result;
|
||||
const textSpan = {
|
||||
start: (root.sfc.template?.start ?? Infinity) + 1,
|
||||
length: 8
|
||||
};
|
||||
if (args[1] >= textSpan.start && args[1] <= textSpan.start + textSpan.length) return {
|
||||
textSpan,
|
||||
definitions: [{
|
||||
fileName: args[0],
|
||||
textSpan,
|
||||
kind: ts.ScriptElementKind.memberVariableElement,
|
||||
name: "default",
|
||||
containerKind: ts.ScriptElementKind.unknown,
|
||||
containerName: args[0]
|
||||
}]
|
||||
};
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
function preprocess$1(context, getDefinitionAndBoundSpan) {
|
||||
const { ts, info, data } = context;
|
||||
return (...args) => {
|
||||
const result = getDefinitionAndBoundSpan(...args);
|
||||
if (!result) {
|
||||
const program$1 = info.languageService.getProgram();
|
||||
const sourceFile = program$1.getSourceFile(args[0]);
|
||||
if (!sourceFile) return;
|
||||
const checker = program$1.getTypeChecker();
|
||||
let result$1;
|
||||
for (const node of forEachTouchingNode(ts, sourceFile, args[1])) {
|
||||
if (data.features.importGlob) result$1 ??= visitImportGlob(ts, info, sourceFile, node, args[1]);
|
||||
if (data.features.nitroRoutes) result$1 ??= visitNitroRoutes(ts, data, checker, sourceFile, node, args[1]);
|
||||
if (data.features.pageMeta) result$1 ??= visitPageMeta(ts, data, sourceFile, node, args[1]);
|
||||
if (data.features.typedPages) result$1 ??= visitTypedPages(ts, data, checker, sourceFile, node, args[1]);
|
||||
}
|
||||
if (result$1) return result$1;
|
||||
}
|
||||
if (!result?.definitions?.length) return result;
|
||||
const program = info.languageService.getProgram();
|
||||
const definitions = new Set(result.definitions);
|
||||
for (const definition of result.definitions) {
|
||||
const sourceFile = program.getSourceFile(definition.fileName);
|
||||
if (!sourceFile) continue;
|
||||
let result$1;
|
||||
if (data.features.runtimeConfig && definition.fileName.endsWith("runtime-config.d.ts")) result$1 = visitRuntimeConfig(context, sourceFile, definition);
|
||||
if (result$1?.length) {
|
||||
for (const definition$1 of result$1) definitions.add(definition$1);
|
||||
definitions.delete(definition);
|
||||
}
|
||||
}
|
||||
return {
|
||||
definitions: [...definitions],
|
||||
textSpan: result.textSpan
|
||||
};
|
||||
};
|
||||
}
|
||||
function visitImportGlob(ts, info, sourceFile, node, position) {
|
||||
if (!ts.isCallExpression(node) || !node.arguments.length) return;
|
||||
const firstArg = node.arguments[0];
|
||||
const start = firstArg.getStart(sourceFile);
|
||||
const end = firstArg.getEnd();
|
||||
if (position < start || position > end) return;
|
||||
let pattern;
|
||||
const callText = node.expression.getText(sourceFile);
|
||||
if (callText === "import" && ts.isTemplateExpression(firstArg)) pattern = [firstArg.head.text, ...firstArg.templateSpans.map((span) => span.literal.text)].join("*");
|
||||
else if (callText === "import.meta.glob" && ts.isStringLiteral(firstArg)) pattern = firstArg.text;
|
||||
if (pattern === void 0) return;
|
||||
const resolved = ts.resolveModuleName(pattern, sourceFile.fileName, info.languageServiceHost.getCompilationSettings(), {
|
||||
fileExists: () => true,
|
||||
readFile: () => ""
|
||||
});
|
||||
if (!resolved?.resolvedModule) return;
|
||||
const extension = (0, pathe.extname)(pattern);
|
||||
const arbitrary = `.d${extension}.ts`;
|
||||
pattern = resolved.resolvedModule.resolvedFileName;
|
||||
if (resolved.resolvedModule.extension === arbitrary) pattern = pattern.slice(0, -arbitrary.length) + extension;
|
||||
const fileNames = (0, tinyglobby.globSync)(pattern, { absolute: true });
|
||||
return {
|
||||
textSpan: {
|
||||
start,
|
||||
length: end - start
|
||||
},
|
||||
definitions: fileNames.map((fileName) => createModuleDefinition(ts, fileName))
|
||||
};
|
||||
}
|
||||
function visitNitroRoutes(ts, data, checker, sourceFile, node, position) {
|
||||
if (!ts.isCallExpression(node) || !ts.isIdentifier(node.expression) || !fetchFunctions.has(node.expression.text) || !node.arguments.length || !ts.isStringLiteralLike(node.arguments[0])) return;
|
||||
const firstArg = node.arguments[0];
|
||||
const start = firstArg.getStart(sourceFile);
|
||||
const end = firstArg.getEnd();
|
||||
if (position < start || position > end) return;
|
||||
const resolvedSignature = checker.getResolvedSignature(node);
|
||||
if (!resolvedSignature) return;
|
||||
const typeArguments = checker.getTypeArgumentsForResolvedSignature(resolvedSignature);
|
||||
let routeType;
|
||||
let methodType;
|
||||
if (node.expression.text === "$fetch") {
|
||||
routeType = typeArguments?.[1];
|
||||
const symbol = typeArguments?.[2].getProperty("method");
|
||||
methodType = symbol ? checker.getTypeOfSymbol(symbol) : void 0;
|
||||
} else {
|
||||
routeType = typeArguments?.[2];
|
||||
methodType = typeArguments?.[3];
|
||||
}
|
||||
const paths = [];
|
||||
if (routeType?.isStringLiteral()) {
|
||||
const alternatives = data.nitroRoutes[routeType.value] ?? {};
|
||||
const methods = [];
|
||||
for (const type of methodType?.isUnion() ? methodType.types : [methodType]) if (type?.isStringLiteral()) methods.push(type.value);
|
||||
for (const method of methods.length ? methods : Object.keys(alternatives)) {
|
||||
const path = alternatives[method];
|
||||
if (path !== void 0) paths.push(path);
|
||||
}
|
||||
}
|
||||
if (!paths.length && firstArg.text.startsWith("/")) {
|
||||
const fallback = (0, pathe.join)(data.publicDir, firstArg.text);
|
||||
if (ts.sys.fileExists(fallback)) paths.push(fallback);
|
||||
}
|
||||
return {
|
||||
textSpan: {
|
||||
start,
|
||||
length: end - start
|
||||
},
|
||||
definitions: paths.map((path) => createModuleDefinition(ts, path))
|
||||
};
|
||||
}
|
||||
function visitPageMeta(ts, data, sourceFile, node, position) {
|
||||
if (!ts.isPropertyAssignment(node) || !ts.isIdentifier(node.name) || !pageMetaKeys.has(node.name.text) || !ts.isCallExpression(node.parent.parent) || !ts.isIdentifier(node.parent.parent.expression) || node.parent.parent.expression.text !== "definePageMeta") return;
|
||||
switch (node.name.text) {
|
||||
case "layout": {
|
||||
if (!ts.isStringLiteralLike(node.initializer)) return;
|
||||
const start = node.initializer.getStart(sourceFile);
|
||||
const end = node.initializer.getEnd();
|
||||
if (position < start || position > end) return;
|
||||
const path = data.layouts[node.initializer.text];
|
||||
if (path === void 0) return;
|
||||
return {
|
||||
textSpan: {
|
||||
start,
|
||||
length: end - start
|
||||
},
|
||||
definitions: [createModuleDefinition(ts, path)]
|
||||
};
|
||||
}
|
||||
case "middleware": {
|
||||
const literals = ts.isStringLiteralLike(node.initializer) ? [node.initializer] : ts.isArrayLiteralExpression(node.initializer) ? node.initializer.elements.filter(ts.isStringLiteralLike) : [];
|
||||
for (const literal of literals) {
|
||||
const start = literal.getStart(sourceFile);
|
||||
const end = literal.getEnd();
|
||||
if (position < start || position > end) continue;
|
||||
const path = data.middleware[literal.text];
|
||||
if (path === void 0) continue;
|
||||
return {
|
||||
textSpan: {
|
||||
start,
|
||||
length: end - start
|
||||
},
|
||||
definitions: [createModuleDefinition(ts, path)]
|
||||
};
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
function visitTypedPages(ts, data, checker, sourceFile, node, position) {
|
||||
if (!ts.isPropertyAssignment(node) || !ts.isIdentifier(node.name) || node.name.text !== "name" || !ts.isStringLiteralLike(node.initializer)) return;
|
||||
const start = node.initializer.getStart(sourceFile);
|
||||
const end = node.initializer.getEnd();
|
||||
if (position < start || position > end) return;
|
||||
const contextualType = checker.getContextualType(node.parent)?.getNonNullableType();
|
||||
if (contextualType?.aliasSymbol?.name !== "RouteLocationRaw" && (!contextualType?.isUnion() || contextualType.types.every((type) => type.symbol?.name !== "RouteLocationAsPathTyped"))) return;
|
||||
const path = data.typedPages[node.initializer.text];
|
||||
if (path === void 0) return;
|
||||
return {
|
||||
textSpan: {
|
||||
start,
|
||||
length: end - start
|
||||
},
|
||||
definitions: [createModuleDefinition(ts, path)]
|
||||
};
|
||||
}
|
||||
function visitRuntimeConfig(context, sourceFile, definition) {
|
||||
const { ts } = context;
|
||||
let definitions = [];
|
||||
const path = [];
|
||||
for (const node of forEachTouchingNode(ts, sourceFile, definition.textSpan.start)) {
|
||||
let key;
|
||||
if (ts.isInterfaceDeclaration(node) && ts.isIdentifier(node.name)) key = node.name.text;
|
||||
else if (ts.isPropertySignature(node) && ts.isIdentifier(node.name)) {
|
||||
key = node.name.text;
|
||||
if (isTextSpanWithin(node.name, definition.textSpan, sourceFile)) {
|
||||
path.push(key);
|
||||
definitions = [...forwardRuntimeConfig(context, definition, path)];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (key !== void 0) path.push(key);
|
||||
}
|
||||
return definitions;
|
||||
}
|
||||
function* forwardRuntimeConfig(context, definition, path) {
|
||||
const { ts, info, data } = context;
|
||||
switch (path[0]) {
|
||||
case "SharedRuntimeConfig":
|
||||
path.shift();
|
||||
break;
|
||||
case "SharedPublicRuntimeConfig":
|
||||
path[0] = "public";
|
||||
break;
|
||||
default: return;
|
||||
}
|
||||
const configFile = data.configFiles[0];
|
||||
if (configFile === void 0) return;
|
||||
const { configFileName } = info.project.projectService.openClientFile(configFile);
|
||||
if (configFileName === void 0) return;
|
||||
const nodeProject = info.project.projectService.findProject(configFileName);
|
||||
if (!nodeProject) return;
|
||||
const nodeProgram = nodeProject.getLanguageService().getProgram();
|
||||
if (!nodeProgram) return;
|
||||
const checker = nodeProgram.getTypeChecker();
|
||||
for (const configFile$1 of data.configFiles) {
|
||||
const sourceFile = nodeProgram.getSourceFile(configFile$1);
|
||||
if (!sourceFile) continue;
|
||||
outer: for (const node of sourceFile.statements) {
|
||||
if (!ts.isExportAssignment(node) || !ts.isCallExpression(node.expression) || !node.expression.arguments.length) continue;
|
||||
const arg = node.expression.arguments[0];
|
||||
let currentSymbol;
|
||||
let currentType = checker.getTypeAtLocation(arg);
|
||||
for (const key of ["runtimeConfig", ...path]) {
|
||||
const symbol = currentType.getProperties().find((s) => s.name === key);
|
||||
if (!symbol) break outer;
|
||||
currentSymbol = symbol;
|
||||
currentType = checker.getTypeOfSymbol(symbol);
|
||||
}
|
||||
for (const decl of currentSymbol?.declarations ?? []) {
|
||||
const sourceFile$1 = decl.getSourceFile();
|
||||
const contextSpan = {
|
||||
start: decl.getStart(sourceFile$1),
|
||||
length: decl.getWidth(sourceFile$1)
|
||||
};
|
||||
let textSpan = contextSpan;
|
||||
if (ts.isPropertyAssignment(decl) || ts.isPropertySignature(decl)) textSpan = {
|
||||
start: decl.name.getStart(sourceFile$1),
|
||||
length: decl.name.getWidth(sourceFile$1)
|
||||
};
|
||||
yield {
|
||||
...definition,
|
||||
fileName: sourceFile$1.fileName,
|
||||
textSpan,
|
||||
contextSpan
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/features/getEditsForFileRename.ts
|
||||
var getEditsForFileRename_exports = /* @__PURE__ */ __export({ preprocess: () => preprocess });
|
||||
function preprocess(context, getEditsForFileRename) {
|
||||
const { ts, info, data, server } = context;
|
||||
return (...args) => {
|
||||
const result = getEditsForFileRename(...args);
|
||||
if (!result?.length) return result;
|
||||
const languageService = info.project.getLanguageService();
|
||||
const program = languageService.getProgram();
|
||||
const references = {};
|
||||
for (const change of result) {
|
||||
const { fileName, textChanges } = change;
|
||||
if (data.features.components && fileName.endsWith("components.d.ts")) {
|
||||
const sourceFile = program.getSourceFile(fileName);
|
||||
if (!sourceFile) continue;
|
||||
for (const { span } of textChanges) for (const node of forEachTouchingNode(ts, sourceFile, span.start)) {
|
||||
if (!ts.isPropertySignature(node) && !ts.isVariableDeclaration(node)) continue;
|
||||
const position = node.name.getStart(sourceFile);
|
||||
const res = languageService.getReferencesAtPosition(fileName, position)?.filter((entry) => !entry.fileName.startsWith(data.buildDir))?.sort((a, b) => a.textSpan.start - b.textSpan.start);
|
||||
const lazy = node.type && ts.isTypeReferenceNode(node.type) && ts.isIdentifier(node.type.typeName) && node.type.typeName.text === "LazyComponent";
|
||||
for (const { fileName: fileName$1, textSpan } of res ?? []) (references[fileName$1] ??= []).push({
|
||||
textSpan,
|
||||
lazy: lazy || void 0
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Object.keys(references).length) server.write("components:rename", {
|
||||
fileName: args[1],
|
||||
references
|
||||
});
|
||||
return result.filter((change) => {
|
||||
return !change.fileName.startsWith(data.buildDir);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
//#endregion
|
||||
//#region src/typescript/index.ts
|
||||
const plugin = (module$1) => {
|
||||
const { typescript: ts } = module$1;
|
||||
return { create(info) {
|
||||
const data = createData(ts, info);
|
||||
const context = {
|
||||
ts,
|
||||
info,
|
||||
data,
|
||||
server: createEventServer(info)
|
||||
};
|
||||
queueMicrotask(() => {
|
||||
context.language = info.project.__vue__?.language;
|
||||
if (!context.language || !data.features.unimport.componentReferences) return;
|
||||
const languageService = info.project.getLanguageService();
|
||||
const methods = {};
|
||||
for (const [key, method] of [["findReferences", findReferences_exports], ["getDefinitionAndBoundSpan", getDefinitionAndBoundSpan_exports]]) {
|
||||
const original = languageService[key];
|
||||
methods[key] = method.postprocess(context, context.language, original);
|
||||
}
|
||||
info.project["languageService"] = new Proxy(languageService, {
|
||||
get(target, p, receiver) {
|
||||
return methods[p] ?? Reflect.get(target, p, receiver);
|
||||
},
|
||||
set(...args) {
|
||||
return Reflect.set(...args);
|
||||
}
|
||||
});
|
||||
});
|
||||
for (const [key, method] of [
|
||||
["findRenameLocations", findRenameLocations_exports],
|
||||
["getDefinitionAndBoundSpan", getDefinitionAndBoundSpan_exports],
|
||||
["getEditsForFileRename", getEditsForFileRename_exports]
|
||||
]) {
|
||||
const original = info.languageService[key];
|
||||
info.languageService[key] = method.preprocess(context, original);
|
||||
}
|
||||
return info.languageService;
|
||||
} };
|
||||
};
|
||||
var typescript_default = plugin;
|
||||
|
||||
//#endregion
|
||||
module.exports = typescript_default;
|
||||
5
node_modules/@dxup/nuxt/dist/typescript.d.cts
generated
vendored
Normal file
5
node_modules/@dxup/nuxt/dist/typescript.d.cts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import ts from "typescript";
|
||||
|
||||
//#region src/typescript/index.d.ts
|
||||
declare const plugin: ts.server.PluginModuleFactory;
|
||||
export = plugin;
|
||||
21
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/LICENSE
generated
vendored
Normal file
21
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-present - Nuxt Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
119
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/README.md
generated
vendored
Normal file
119
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/README.md
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
[](https://nuxt.com)
|
||||
|
||||
# Nuxt
|
||||
|
||||
<p>
|
||||
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/v/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version"></a>
|
||||
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/dm/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads"></a>
|
||||
<a href="https://github.com/nuxt/nuxt/blob/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
|
||||
<a href="https://nuxt.com/modules"><img src="https://img.shields.io/badge/dynamic/json?url=https://nuxt.com/api/v1/modules&query=$.stats.modules&label=Modules&style=flat&colorA=18181B&colorB=28CF8D" alt="Modules"></a>
|
||||
<a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt%20Docs-18181B?logo=nuxt" alt="Website"></a>
|
||||
<a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
|
||||
<a href="https://securityscorecards.dev/"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
|
||||
<a href="https://deepwiki.com/nuxt/nuxt"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
||||
</p>
|
||||
|
||||
Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.
|
||||
|
||||
It provides a number of features that make it easy to build fast, SEO-friendly, and scalable web applications, including:
|
||||
- Server-side rendering, static site generation, hybrid rendering and edge-side rendering
|
||||
- Automatic routing with code-splitting and pre-fetching
|
||||
- Data fetching and state management
|
||||
- Search engine optimization and defining meta tags
|
||||
- Auto imports of components, composables and utils
|
||||
- TypeScript with zero configuration
|
||||
- Go full-stack with our server/ directory
|
||||
- Extensible with [300+ modules](https://nuxt.com/modules)
|
||||
- Deployment to a variety of [hosting platforms](https://nuxt.com/deploy)
|
||||
- ...[and much more](https://nuxt.com) 🚀
|
||||
|
||||
### Table of Contents
|
||||
|
||||
- 🚀 [Getting Started](#getting-started)
|
||||
- 💻 [Vue Development](#vue-development)
|
||||
- 📖 [Documentation](#documentation)
|
||||
- 🧩 [Modules](#modules)
|
||||
- ❤️ [Contribute](#contribute)
|
||||
- 🏠 [Local Development](#local-development)
|
||||
- 🛟 [Professional Support](#professional-support)
|
||||
- 🔗 [Follow Us](#follow-us)
|
||||
- ⚖️ [License](#license)
|
||||
|
||||
---
|
||||
|
||||
## <a name="getting-started">🚀 Getting Started</a>
|
||||
|
||||
Use the following command to create a new starter project. This will create a starter project with all the necessary files and dependencies:
|
||||
|
||||
```bash
|
||||
npm create nuxt@latest <my-project>
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Discover also [nuxt.new](https://nuxt.new): Open a Nuxt starter on CodeSandbox, StackBlitz or locally to get up and running in a few seconds.
|
||||
|
||||
## <a name="vue-development">💻 Vue Development</a>
|
||||
|
||||
Simple, intuitive and powerful, Nuxt lets you write Vue components in a way that makes sense. Every repetitive task is automated, so you can focus on writing your full-stack Vue application with confidence.
|
||||
|
||||
Example of an `app.vue`:
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
useSeoMeta({
|
||||
title: 'Meet Nuxt',
|
||||
description: 'The Intuitive Vue Framework.',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="app">
|
||||
<AppHeader />
|
||||
<NuxtPage />
|
||||
<AppFooter />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
#app {
|
||||
background-color: #020420;
|
||||
color: #00DC82;
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
## <a name="documentation">📖 Documentation</a>
|
||||
|
||||
We highly recommend you take a look at the [Nuxt documentation](https://nuxt.com/docs) to level up. It’s a great resource for learning more about the framework. It covers everything from getting started to advanced topics.
|
||||
|
||||
## <a name="modules">🧩 Modules</a>
|
||||
|
||||
Discover our [list of modules](https://nuxt.com/modules) to supercharge your Nuxt project, created by the Nuxt team and community.
|
||||
|
||||
## <a name="contribute">❤️ Contribute</a>
|
||||
|
||||
We invite you to contribute and help improve Nuxt 💚
|
||||
|
||||
Here are a few ways you can get involved:
|
||||
- **Reporting Bugs:** If you come across any bugs or issues, please check out the [reporting bugs guide](https://nuxt.com/docs/4.x/community/reporting-bugs) to learn how to submit a bug report.
|
||||
- **Suggestions:** Have ideas to enhance Nuxt? We'd love to hear them! Check out the [contribution guide](https://nuxt.com/docs/4.x/community/contribution) to share your suggestions.
|
||||
- **Questions:** If you have questions or need assistance, the [getting help guide](https://nuxt.com/docs/4.x/community/getting-help) provides resources to help you out.
|
||||
|
||||
## <a name="local-development">🏠 Local Development</a>
|
||||
|
||||
Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/docs/4.x/community/framework-contribution#setup) to contribute to the framework and documentation.
|
||||
|
||||
## <a name="professional-support">🛟 Professional Support</a>
|
||||
|
||||
- Technical audit & consulting: [Nuxt Experts](https://nuxt.com/enterprise/support)
|
||||
- Custom development & more: [Nuxt Agencies Partners](https://nuxt.com/enterprise/agencies)
|
||||
|
||||
## <a name="follow-us">🔗 Follow Us</a>
|
||||
|
||||
<p valign="center">
|
||||
<a href="https://go.nuxt.com/discord"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/discord.svg" alt="Discord"></a> <a href="https://go.nuxt.com/x"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/twitter.svg" alt="Twitter"></a> <a href="https://go.nuxt.com/github"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/github.svg" alt="GitHub"></a> <a href="https://go.nuxt.com/bluesky"><img width="20" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/bluesky.svg" alt="Bluesky"></a>
|
||||
</p>
|
||||
|
||||
## <a name="license">⚖️ License</a>
|
||||
|
||||
[MIT](https://github.com/nuxt/nuxt/blob/main/LICENSE)
|
||||
1129
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/THIRD-PARTY-LICENSES.md
generated
vendored
Normal file
1129
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/THIRD-PARTY-LICENSES.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1300
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@oxc-project/types.d.mts
generated
vendored
Normal file
1300
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@oxc-project/types.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
63
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@rolldown/pluginutils.d.mts
generated
vendored
Normal file
63
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@rolldown/pluginutils.d.mts
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.3/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
|
||||
type StringOrRegExp = string | RegExp;
|
||||
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
||||
type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType | Code | Query;
|
||||
type TopLevelFilterExpression = Include | Exclude;
|
||||
declare class And {
|
||||
kind: 'and';
|
||||
args: FilterExpression[];
|
||||
constructor(...args: FilterExpression[]);
|
||||
}
|
||||
declare class Or {
|
||||
kind: 'or';
|
||||
args: FilterExpression[];
|
||||
constructor(...args: FilterExpression[]);
|
||||
}
|
||||
declare class Not {
|
||||
kind: 'not';
|
||||
expr: FilterExpression;
|
||||
constructor(expr: FilterExpression);
|
||||
}
|
||||
interface IdParams {
|
||||
cleanUrl?: boolean;
|
||||
}
|
||||
declare class Id {
|
||||
kind: 'id';
|
||||
pattern: StringOrRegExp;
|
||||
params: IdParams;
|
||||
constructor(pattern: StringOrRegExp, params?: IdParams);
|
||||
}
|
||||
declare class ImporterId {
|
||||
kind: 'importerId';
|
||||
pattern: StringOrRegExp;
|
||||
params: IdParams;
|
||||
constructor(pattern: StringOrRegExp, params?: IdParams);
|
||||
}
|
||||
declare class ModuleType {
|
||||
kind: 'moduleType';
|
||||
pattern: PluginModuleType;
|
||||
constructor(pattern: PluginModuleType);
|
||||
}
|
||||
declare class Code {
|
||||
kind: 'code';
|
||||
pattern: StringOrRegExp;
|
||||
constructor(expr: StringOrRegExp);
|
||||
}
|
||||
declare class Query {
|
||||
kind: 'query';
|
||||
key: string;
|
||||
pattern: StringOrRegExp | boolean;
|
||||
constructor(key: string, pattern: StringOrRegExp | boolean);
|
||||
}
|
||||
declare class Include {
|
||||
kind: 'include';
|
||||
expr: FilterExpression;
|
||||
constructor(expr: FilterExpression);
|
||||
}
|
||||
declare class Exclude {
|
||||
kind: 'exclude';
|
||||
expr: FilterExpression;
|
||||
constructor(expr: FilterExpression);
|
||||
}
|
||||
//#endregion
|
||||
export { TopLevelFilterExpression as t };
|
||||
1345
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@rollup/plugin-commonjs.d.mts
generated
vendored
Normal file
1345
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@rollup/plugin-commonjs.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
114
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@vercel/nft.d.mts
generated
vendored
Normal file
114
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/@vercel/nft.d.mts
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
//#region ../../node_modules/.pnpm/@vercel+nft@1.2.0_rollup@4.57.1/node_modules/@vercel/nft/out/node-file-trace.d.ts
|
||||
declare class Job {
|
||||
ts: boolean;
|
||||
base: string;
|
||||
cwd: string;
|
||||
conditions: string[];
|
||||
exportsOnly: boolean;
|
||||
paths: Record<string, string>;
|
||||
ignoreFn: (path: string, parent?: string) => boolean;
|
||||
log: boolean;
|
||||
mixedModules: boolean;
|
||||
analysis: {
|
||||
emitGlobs?: boolean;
|
||||
computeFileReferences?: boolean;
|
||||
evaluatePureExpressions?: boolean;
|
||||
};
|
||||
private analysisCache;
|
||||
fileList: Set<string>;
|
||||
esmFileList: Set<string>;
|
||||
processed: Set<string>;
|
||||
warnings: Set<Error>;
|
||||
reasons: NodeFileTraceReasons;
|
||||
private cachedFileSystem;
|
||||
private remappings;
|
||||
constructor({
|
||||
base,
|
||||
processCwd,
|
||||
exports,
|
||||
conditions,
|
||||
exportsOnly,
|
||||
paths,
|
||||
ignore,
|
||||
log,
|
||||
mixedModules,
|
||||
ts,
|
||||
analysis,
|
||||
cache,
|
||||
fileIOConcurrency
|
||||
}: NodeFileTraceOptions);
|
||||
addRemapping(path: string, dep: string): void;
|
||||
readlink(path: string): Promise<string | null>;
|
||||
isFile(path: string): Promise<boolean>;
|
||||
isDir(path: string): Promise<boolean>;
|
||||
stat(path: string): Promise<fs.Stats | null>;
|
||||
private maybeEmitDep;
|
||||
resolve(id: string, parent: string, job: Job, cjsResolve: boolean): Promise<string | string[]>;
|
||||
readFile(path: string): Promise<Buffer | string | null>;
|
||||
realpath(path: string, parent?: string, seen?: Set<unknown>): Promise<string>;
|
||||
emitFile(path: string, reasonType: NodeFileTraceReasonType, parent?: string, isRealpath?: boolean): Promise<boolean>;
|
||||
getPjsonBoundary(path: string): Promise<string | undefined>;
|
||||
emitDependency(path: string, parent?: string): Promise<void>;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/@vercel+nft@1.2.0_rollup@4.57.1/node_modules/@vercel/nft/out/types.d.ts
|
||||
interface Stats {
|
||||
isFile(): boolean;
|
||||
isDirectory(): boolean;
|
||||
isBlockDevice(): boolean;
|
||||
isCharacterDevice(): boolean;
|
||||
isSymbolicLink(): boolean;
|
||||
isFIFO(): boolean;
|
||||
isSocket(): boolean;
|
||||
dev: number;
|
||||
ino: number;
|
||||
mode: number;
|
||||
nlink: number;
|
||||
uid: number;
|
||||
gid: number;
|
||||
rdev: number;
|
||||
size: number;
|
||||
blksize: number;
|
||||
blocks: number;
|
||||
atimeMs: number;
|
||||
mtimeMs: number;
|
||||
ctimeMs: number;
|
||||
birthtimeMs: number;
|
||||
atime: Date;
|
||||
mtime: Date;
|
||||
ctime: Date;
|
||||
birthtime: Date;
|
||||
}
|
||||
interface NodeFileTraceOptions {
|
||||
base?: string;
|
||||
processCwd?: string;
|
||||
exports?: string[];
|
||||
conditions?: string[];
|
||||
exportsOnly?: boolean;
|
||||
ignore?: string | string[] | ((path: string) => boolean);
|
||||
analysis?: boolean | {
|
||||
emitGlobs?: boolean;
|
||||
computeFileReferences?: boolean;
|
||||
evaluatePureExpressions?: boolean;
|
||||
};
|
||||
cache?: any;
|
||||
paths?: Record<string, string>;
|
||||
ts?: boolean;
|
||||
log?: boolean;
|
||||
mixedModules?: boolean;
|
||||
readFile?: (path: string) => Promise<Buffer | string | null>;
|
||||
stat?: (path: string) => Promise<Stats | null>;
|
||||
readlink?: (path: string) => Promise<string | null>;
|
||||
resolve?: (id: string, parent: string, job: Job, cjsResolve: boolean) => Promise<string | string[]>;
|
||||
fileIOConcurrency?: number;
|
||||
}
|
||||
type NodeFileTraceReasonType = 'initial' | 'resolve' | 'dependency' | 'asset' | 'sharedlib';
|
||||
interface NodeFileTraceReasons extends Map<string, {
|
||||
type: NodeFileTraceReasonType[];
|
||||
ignored: boolean;
|
||||
parents: Set<string>;
|
||||
}> {}
|
||||
//#endregion
|
||||
export { NodeFileTraceOptions as t };
|
||||
34
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/chokidar.d.mts
generated
vendored
Normal file
34
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/chokidar.d.mts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Stats } from "node:fs";
|
||||
import { Readable } from "node:stream";
|
||||
import { EventEmitter } from "node:events";
|
||||
|
||||
//#region ../../node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
|
||||
type AWF = {
|
||||
stabilityThreshold: number;
|
||||
pollInterval: number;
|
||||
};
|
||||
type BasicOpts = {
|
||||
persistent: boolean;
|
||||
ignoreInitial: boolean;
|
||||
followSymlinks: boolean;
|
||||
cwd?: string;
|
||||
usePolling: boolean;
|
||||
interval: number;
|
||||
binaryInterval: number;
|
||||
alwaysStat?: boolean;
|
||||
depth?: number;
|
||||
ignorePermissionErrors: boolean;
|
||||
atomic: boolean | number;
|
||||
};
|
||||
type ChokidarOptions = Partial<BasicOpts & {
|
||||
ignored: Matcher | Matcher[];
|
||||
awaitWriteFinish: boolean | Partial<AWF>;
|
||||
}>;
|
||||
type MatchFunction = (val: string, stats?: Stats) => boolean;
|
||||
interface MatcherObject {
|
||||
path: string;
|
||||
recursive?: boolean;
|
||||
}
|
||||
type Matcher = string | RegExp | MatchFunction | MatcherObject;
|
||||
//#endregion
|
||||
export { ChokidarOptions as t };
|
||||
47
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/compatx.d.mts
generated
vendored
Normal file
47
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/compatx.d.mts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
//#region ../../node_modules/.pnpm/compatx@0.2.0/node_modules/compatx/dist/index.d.mts
|
||||
/**
|
||||
* Known platform names
|
||||
*/
|
||||
declare const platforms: readonly ["aws", "azure", "cloudflare", "deno", "firebase", "netlify", "vercel"];
|
||||
/**
|
||||
* Known platform name
|
||||
*/
|
||||
type PlatformName = (typeof platforms)[number] | (string & {});
|
||||
/**
|
||||
* Normalize the compatibility dates from input config and defaults.
|
||||
*/
|
||||
type Year = `${number}${number}${number}${number}`;
|
||||
type Month = `${"0" | "1"}${number}`;
|
||||
type Day = `${"0" | "1" | "2" | "3"}${number}`;
|
||||
/**
|
||||
* Typed date string in `YYYY-MM-DD` format
|
||||
*
|
||||
* Empty string is used to represent an "unspecified" date.
|
||||
*
|
||||
* "latest" is used to represent the latest date available (date of today).
|
||||
*/
|
||||
type DateString = "" | "latest" | `${Year}-${Month}-${Day}`;
|
||||
/**
|
||||
* Last known compatibility dates for platforms
|
||||
*
|
||||
* @example
|
||||
* {
|
||||
* "default": "2024-01-01",
|
||||
* "cloudflare": "2024-03-01",
|
||||
* }
|
||||
*/
|
||||
type CompatibilityDates = {
|
||||
/**
|
||||
* Default compatibility date for all unspecified platforms (required)
|
||||
*/
|
||||
default: DateString;
|
||||
} & Partial<Record<PlatformName, DateString>>;
|
||||
/**
|
||||
* Last known compatibility date for the used platform
|
||||
*/
|
||||
type CompatibilityDateSpec = DateString | Partial<CompatibilityDates>;
|
||||
/**
|
||||
* Get compatibility updates applicable for the user given platform and date range.
|
||||
*/
|
||||
//#endregion
|
||||
export { CompatibilityDates as n, CompatibilityDateSpec as t };
|
||||
7
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/crossws.d.mts
generated
vendored
Normal file
7
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/crossws.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { URL } from "node:url";
|
||||
import { Duplex } from "node:stream";
|
||||
import "node:tls";
|
||||
import "events";
|
||||
import "node:http";
|
||||
import "node:https";
|
||||
import "node:zlib";
|
||||
8
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/db0.d.mts
generated
vendored
Normal file
8
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/db0.d.mts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import "node:sqlite";
|
||||
|
||||
//#region ../../node_modules/.pnpm/db0@0.3.4/node_modules/db0/dist/index.d.mts
|
||||
//#endregion
|
||||
//#region src/_connectors.d.ts
|
||||
type ConnectorName = "better-sqlite3" | "bun-sqlite" | "bun" | "cloudflare-d1" | "cloudflare-hyperdrive-mysql" | "cloudflare-hyperdrive-postgresql" | "libsql-core" | "libsql-http" | "libsql-node" | "libsql" | "libsql-web" | "mysql2" | "node-sqlite" | "sqlite" | "pglite" | "planetscale" | "postgresql" | "sqlite3";
|
||||
//#endregion
|
||||
export { ConnectorName as t };
|
||||
137
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/esbuild.d.mts
generated
vendored
Normal file
137
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/esbuild.d.mts
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
//#region ../../node_modules/.pnpm/esbuild@0.27.3/node_modules/esbuild/lib/main.d.ts
|
||||
type Platform = 'browser' | 'node' | 'neutral';
|
||||
type Format = 'iife' | 'cjs' | 'esm';
|
||||
type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx';
|
||||
type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
|
||||
type Charset = 'ascii' | 'utf8';
|
||||
type Drop = 'console' | 'debugger';
|
||||
type AbsPaths = 'code' | 'log' | 'metafile';
|
||||
interface CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#sourcemap */
|
||||
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
|
||||
/** Documentation: https://esbuild.github.io/api/#legal-comments */
|
||||
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
|
||||
/** Documentation: https://esbuild.github.io/api/#source-root */
|
||||
sourceRoot?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#sources-content */
|
||||
sourcesContent?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#format */
|
||||
format?: Format;
|
||||
/** Documentation: https://esbuild.github.io/api/#global-name */
|
||||
globalName?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#target */
|
||||
target?: string | string[];
|
||||
/** Documentation: https://esbuild.github.io/api/#supported */
|
||||
supported?: Record<string, boolean>;
|
||||
/** Documentation: https://esbuild.github.io/api/#platform */
|
||||
platform?: Platform;
|
||||
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||
mangleProps?: RegExp;
|
||||
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||
reserveProps?: RegExp;
|
||||
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||
mangleQuoted?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
||||
mangleCache?: Record<string, string | false>;
|
||||
/** Documentation: https://esbuild.github.io/api/#drop */
|
||||
drop?: Drop[];
|
||||
/** Documentation: https://esbuild.github.io/api/#drop-labels */
|
||||
dropLabels?: string[];
|
||||
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||
minify?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||
minifyWhitespace?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||
minifyIdentifiers?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#minify */
|
||||
minifySyntax?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#line-limit */
|
||||
lineLimit?: number;
|
||||
/** Documentation: https://esbuild.github.io/api/#charset */
|
||||
charset?: Charset;
|
||||
/** Documentation: https://esbuild.github.io/api/#tree-shaking */
|
||||
treeShaking?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#ignore-annotations */
|
||||
ignoreAnnotations?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx */
|
||||
jsx?: 'transform' | 'preserve' | 'automatic';
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx-factory */
|
||||
jsxFactory?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */
|
||||
jsxFragment?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx-import-source */
|
||||
jsxImportSource?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx-development */
|
||||
jsxDev?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
|
||||
jsxSideEffects?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#define */
|
||||
define?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/** Documentation: https://esbuild.github.io/api/#pure */
|
||||
pure?: string[];
|
||||
/** Documentation: https://esbuild.github.io/api/#keep-names */
|
||||
keepNames?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#abs-paths */
|
||||
absPaths?: AbsPaths[];
|
||||
/** Documentation: https://esbuild.github.io/api/#color */
|
||||
color?: boolean;
|
||||
/** Documentation: https://esbuild.github.io/api/#log-level */
|
||||
logLevel?: LogLevel;
|
||||
/** Documentation: https://esbuild.github.io/api/#log-limit */
|
||||
logLimit?: number;
|
||||
/** Documentation: https://esbuild.github.io/api/#log-override */
|
||||
logOverride?: Record<string, LogLevel>;
|
||||
/** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
|
||||
tsconfigRaw?: string | TsconfigRaw;
|
||||
}
|
||||
interface TsconfigRaw {
|
||||
compilerOptions?: {
|
||||
alwaysStrict?: boolean;
|
||||
baseUrl?: string;
|
||||
experimentalDecorators?: boolean;
|
||||
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error';
|
||||
jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev';
|
||||
jsxFactory?: string;
|
||||
jsxFragmentFactory?: string;
|
||||
jsxImportSource?: string;
|
||||
paths?: Record<string, string[]>;
|
||||
preserveValueImports?: boolean;
|
||||
strict?: boolean;
|
||||
target?: string;
|
||||
useDefineForClassFields?: boolean;
|
||||
verbatimModuleSyntax?: boolean;
|
||||
};
|
||||
}
|
||||
interface TransformOptions extends CommonOptions {
|
||||
/** Documentation: https://esbuild.github.io/api/#sourcefile */
|
||||
sourcefile?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#loader */
|
||||
loader?: Loader;
|
||||
/** Documentation: https://esbuild.github.io/api/#banner */
|
||||
banner?: string;
|
||||
/** Documentation: https://esbuild.github.io/api/#footer */
|
||||
footer?: string;
|
||||
}
|
||||
// Note: These declarations exist to avoid type errors when you omit "dom" from
|
||||
// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
|
||||
// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
|
||||
// with the browser DOM and is present in many non-browser JavaScript runtimes
|
||||
// (e.g. node and deno). Declaring it here allows esbuild's API to be used in
|
||||
// these scenarios.
|
||||
//
|
||||
// There's an open issue about getting this problem corrected (although these
|
||||
// declarations will need to remain even if this is fixed for backward
|
||||
// compatibility with older TypeScript versions):
|
||||
//
|
||||
// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
|
||||
//
|
||||
declare global {
|
||||
namespace WebAssembly {
|
||||
interface Module {}
|
||||
}
|
||||
interface URL {}
|
||||
}
|
||||
//#endregion
|
||||
export { TransformOptions as n, Loader as t };
|
||||
79
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/httpxy.d.mts
generated
vendored
Normal file
79
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/httpxy.d.mts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import * as stream from "node:stream";
|
||||
import { EventEmitter } from "node:events";
|
||||
import "node:http";
|
||||
|
||||
//#region ../../node_modules/.pnpm/httpxy@0.1.7/node_modules/httpxy/dist/index.d.ts
|
||||
interface ProxyTargetDetailed {
|
||||
host: string;
|
||||
port: number;
|
||||
protocol?: string;
|
||||
hostname?: string;
|
||||
socketPath?: string;
|
||||
key?: string;
|
||||
passphrase?: string;
|
||||
pfx?: Buffer | string;
|
||||
cert?: string;
|
||||
ca?: string;
|
||||
ciphers?: string;
|
||||
secureProtocol?: string;
|
||||
}
|
||||
type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed;
|
||||
type ProxyTargetUrl = string | Partial<URL>;
|
||||
interface ProxyServerOptions {
|
||||
/** URL string to be parsed with the url module. */
|
||||
target?: ProxyTarget;
|
||||
/** URL string to be parsed with the url module. */
|
||||
forward?: ProxyTargetUrl;
|
||||
/** Object to be passed to http(s).request. */
|
||||
agent?: any;
|
||||
/** Object to be passed to https.createServer(). */
|
||||
ssl?: any;
|
||||
/** If you want to proxy websockets. */
|
||||
ws?: boolean;
|
||||
/** Adds x- forward headers. */
|
||||
xfwd?: boolean;
|
||||
/** Verify SSL certificate. */
|
||||
secure?: boolean;
|
||||
/** Explicitly specify if we are proxying to another proxy. */
|
||||
toProxy?: boolean;
|
||||
/** Specify whether you want to prepend the target's path to the proxy path. */
|
||||
prependPath?: boolean;
|
||||
/** Specify whether you want to ignore the proxy path of the incoming request. */
|
||||
ignorePath?: boolean;
|
||||
/** Local interface string to bind for outgoing connections. */
|
||||
localAddress?: string;
|
||||
/** Changes the origin of the host header to the target URL. */
|
||||
changeOrigin?: boolean;
|
||||
/** specify whether you want to keep letter case of response header key */
|
||||
preserveHeaderKeyCase?: boolean;
|
||||
/** Basic authentication i.e. 'user:password' to compute an Authorization header. */
|
||||
auth?: string;
|
||||
/** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
|
||||
hostRewrite?: string;
|
||||
/** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
|
||||
autoRewrite?: boolean;
|
||||
/** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
|
||||
protocolRewrite?: string;
|
||||
/** Rewrites domain of set-cookie headers. */
|
||||
cookieDomainRewrite?: false | string | {
|
||||
[oldDomain: string]: string;
|
||||
};
|
||||
/** Rewrites path of set-cookie headers. Default: false */
|
||||
cookiePathRewrite?: false | string | {
|
||||
[oldPath: string]: string;
|
||||
};
|
||||
/** Object with extra headers to be added to target requests. */
|
||||
headers?: {
|
||||
[header: string]: string;
|
||||
};
|
||||
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
|
||||
proxyTimeout?: number;
|
||||
/** Timeout (in milliseconds) for incoming requests */
|
||||
timeout?: number;
|
||||
/** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
|
||||
selfHandleResponse?: boolean;
|
||||
/** Buffer */
|
||||
buffer?: stream.Stream;
|
||||
}
|
||||
//#endregion
|
||||
export { ProxyServerOptions as t };
|
||||
6
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/ioredis.d.mts
generated
vendored
Normal file
6
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/ioredis.d.mts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="node" />
|
||||
import "events";
|
||||
import "net";
|
||||
import "tls";
|
||||
import "stream";
|
||||
import "dns";
|
||||
7
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/listhen.d.mts
generated
vendored
Normal file
7
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/listhen.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { ConsolaInstance } from "consola";
|
||||
import "h3";
|
||||
import "node:net";
|
||||
import "node:http";
|
||||
import "node:https";
|
||||
import "http";
|
||||
import "jiti/lib/types";
|
||||
220
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/magic-string.d.mts
generated
vendored
Normal file
220
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/magic-string.d.mts
generated
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
//#region ../../node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.d.mts
|
||||
interface SourceMapOptions {
|
||||
/**
|
||||
* Whether the mapping should be high-resolution.
|
||||
* Hi-res mappings map every single character, meaning (for example) your devtools will always
|
||||
* be able to pinpoint the exact location of function calls and so on.
|
||||
* With lo-res mappings, devtools may only be able to identify the correct
|
||||
* line - but they're quicker to generate and less bulky.
|
||||
* You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
|
||||
* instead of per character, suitable for string semantics that are separated by words.
|
||||
* If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
|
||||
*/
|
||||
hires?: boolean | 'boundary';
|
||||
/**
|
||||
* The filename where you plan to write the sourcemap.
|
||||
*/
|
||||
file?: string;
|
||||
/**
|
||||
* The filename of the file containing the original source.
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
* Whether to include the original content in the map's sourcesContent array.
|
||||
*/
|
||||
includeContent?: boolean;
|
||||
}
|
||||
type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
|
||||
interface DecodedSourceMap {
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: SourceMapSegment[][];
|
||||
x_google_ignoreList?: number[];
|
||||
}
|
||||
declare class SourceMap {
|
||||
constructor(properties: DecodedSourceMap);
|
||||
version: number;
|
||||
file: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
names: string[];
|
||||
mappings: string;
|
||||
x_google_ignoreList?: number[];
|
||||
debugId?: string;
|
||||
/**
|
||||
* Returns the equivalent of `JSON.stringify(map)`
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
|
||||
* `generateMap(options?: SourceMapOptions): SourceMap;`
|
||||
*/
|
||||
toUrl(): string;
|
||||
}
|
||||
type ExclusionRange = [number, number];
|
||||
interface MagicStringOptions {
|
||||
filename?: string;
|
||||
indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
|
||||
offset?: number;
|
||||
}
|
||||
interface IndentOptions {
|
||||
exclude?: ExclusionRange | Array<ExclusionRange>;
|
||||
indentStart?: boolean;
|
||||
}
|
||||
interface OverwriteOptions {
|
||||
storeName?: boolean;
|
||||
contentOnly?: boolean;
|
||||
}
|
||||
interface UpdateOptions {
|
||||
storeName?: boolean;
|
||||
overwrite?: boolean;
|
||||
}
|
||||
declare class MagicString {
|
||||
constructor(str: string, options?: MagicStringOptions);
|
||||
/**
|
||||
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
|
||||
*/
|
||||
addSourcemapLocation(char: number): void;
|
||||
/**
|
||||
* Appends the specified content to the end of the string.
|
||||
*/
|
||||
append(content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependLeft(...)`.
|
||||
*/
|
||||
appendLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Appends the specified content at the index in the original string.
|
||||
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
|
||||
* See also `s.prependRight(...)`.
|
||||
*/
|
||||
appendRight(index: number, content: string): this;
|
||||
/**
|
||||
* Does what you'd expect.
|
||||
*/
|
||||
clone(): this;
|
||||
/**
|
||||
* Generates a version 3 sourcemap.
|
||||
*/
|
||||
generateMap(options?: SourceMapOptions): SourceMap;
|
||||
/**
|
||||
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
|
||||
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
|
||||
*/
|
||||
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
|
||||
getIndentString(): string;
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*/
|
||||
indent(options?: IndentOptions): this;
|
||||
/**
|
||||
* Prefixes each line of the string with prefix.
|
||||
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
|
||||
*
|
||||
* The options argument can have an exclude property, which is an array of [start, end] character ranges.
|
||||
* These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
|
||||
*/
|
||||
indent(indentStr?: string, options?: IndentOptions): this;
|
||||
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
|
||||
/**
|
||||
* Moves the characters from `start` and `end` to `index`.
|
||||
*/
|
||||
move(start: number, end: number, index: number): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
|
||||
* that range. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*
|
||||
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
|
||||
*/
|
||||
overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): this;
|
||||
/**
|
||||
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
|
||||
*
|
||||
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
|
||||
* for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
|
||||
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
||||
*/
|
||||
update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
|
||||
/**
|
||||
* Prepends the string with the specified content.
|
||||
*/
|
||||
prepend(content: string): this;
|
||||
/**
|
||||
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
|
||||
*/
|
||||
prependLeft(index: number, content: string): this;
|
||||
/**
|
||||
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
|
||||
*/
|
||||
prependRight(index: number, content: string): this;
|
||||
/**
|
||||
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
* Removing the same content twice, or making removals that partially overlap, will cause an error.
|
||||
*/
|
||||
remove(start: number, end: number): this;
|
||||
/**
|
||||
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
|
||||
*/
|
||||
reset(start: number, end: number): this;
|
||||
/**
|
||||
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
|
||||
* Throws error if the indices are for characters that were already removed.
|
||||
*/
|
||||
slice(start: number, end: number): string;
|
||||
/**
|
||||
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
|
||||
*/
|
||||
snip(start: number, end: number): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
|
||||
*/
|
||||
trim(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
|
||||
*/
|
||||
trimStart(charType?: string): this;
|
||||
/**
|
||||
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
|
||||
*/
|
||||
trimEnd(charType?: string): this;
|
||||
/**
|
||||
* Removes empty lines from the start and end.
|
||||
*/
|
||||
trimLines(): this;
|
||||
/**
|
||||
* String replacement with RegExp or string.
|
||||
*/
|
||||
replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
|
||||
/**
|
||||
* Same as `s.replace`, but replace all matched strings instead of just one.
|
||||
*/
|
||||
replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
|
||||
lastChar(): string;
|
||||
lastLine(): string;
|
||||
/**
|
||||
* Returns true if the resulting source is empty (disregarding white space).
|
||||
*/
|
||||
isEmpty(): boolean;
|
||||
length(): number;
|
||||
/**
|
||||
* Indicates if the string has been changed.
|
||||
*/
|
||||
hasChanged(): boolean;
|
||||
original: string;
|
||||
/**
|
||||
* Returns the generated string.
|
||||
*/
|
||||
toString(): string;
|
||||
offset: number;
|
||||
}
|
||||
//#endregion
|
||||
export { MagicString as t };
|
||||
9879
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/nitro.d.mts
generated
vendored
Normal file
9879
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/nitro.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3343
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/nitropack.d.mts
generated
vendored
Normal file
3343
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/_chunks/libs/nitropack.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
594
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/index.d.mts
generated
vendored
Normal file
594
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,594 @@
|
||||
import { i as NitroRouteConfig$1, n as NitroDevEventHandler$1, r as NitroEventHandler$1, t as Nitro$1 } from "./_chunks/libs/nitro.mjs";
|
||||
import { i as NitroRouteConfig$2, n as NitroDevEventHandler$2, r as NitroEventHandler$2, t as Nitro$2 } from "./_chunks/libs/nitropack.mjs";
|
||||
import "./_chunks/libs/db0.mjs";
|
||||
import "./_chunks/libs/chokidar.mjs";
|
||||
import "./_chunks/libs/ioredis.mjs";
|
||||
import "./_chunks/libs/@rollup/plugin-commonjs.mjs";
|
||||
import "./_chunks/libs/httpxy.mjs";
|
||||
import "./_chunks/libs/esbuild.mjs";
|
||||
import "./_chunks/libs/crossws.mjs";
|
||||
import "./_chunks/libs/listhen.mjs";
|
||||
import "./_chunks/libs/@vercel/nft.mjs";
|
||||
import { ConsolaInstance, ConsolaOptions } from "consola";
|
||||
import { UseContext } from "unctx";
|
||||
import { TSConfig } from "pkg-types";
|
||||
import { GlobOptions } from "tinyglobby";
|
||||
import { LoadConfigOptions } from "c12";
|
||||
import { Component, ComponentsDir, ModuleDefinition, ModuleMeta, ModuleOptions, Nuxt, NuxtAppConfig, NuxtCompatibility, NuxtCompatibilityIssues, NuxtConfig, NuxtHooks, NuxtMiddleware, NuxtModule, NuxtOptions, NuxtPlugin, NuxtPluginTemplate, NuxtServerTemplate, NuxtTemplate, NuxtTypeTemplate, ResolvedNuxtTemplate, SchemaDefinition } from "@nuxt/schema";
|
||||
import { Import, InlinePreset } from "unimport";
|
||||
import { Configuration, WebpackPluginInstance } from "webpack";
|
||||
import { RspackPluginInstance } from "@rspack/core";
|
||||
import { Plugin, UserConfig } from "vite";
|
||||
|
||||
//#region src/module/define.d.ts
|
||||
/**
|
||||
* Define a Nuxt module, automatically merging defaults with user provided options, installing
|
||||
* any hooks that are provided, and calling an optional setup function for full control.
|
||||
*/
|
||||
declare function defineNuxtModule<TOptions extends ModuleOptions>(definition: ModuleDefinition<TOptions, Partial<TOptions>, false> | NuxtModule<TOptions, Partial<TOptions>, false>): NuxtModule<TOptions, TOptions, false>;
|
||||
declare function defineNuxtModule<TOptions extends ModuleOptions>(): {
|
||||
with: <TOptionsDefaults extends Partial<TOptions>>(definition: ModuleDefinition<TOptions, TOptionsDefaults, true> | NuxtModule<TOptions, TOptionsDefaults, true>) => NuxtModule<TOptions, TOptionsDefaults, true>;
|
||||
};
|
||||
//#endregion
|
||||
//#region src/module/install.d.ts
|
||||
type ModuleToInstall = string | NuxtModule<ModuleOptions, Partial<ModuleOptions>, false>;
|
||||
/**
|
||||
* Installs a set of modules on a Nuxt instance.
|
||||
* @internal
|
||||
*/
|
||||
declare function installModules(modulesToInstall: Map<ModuleToInstall, Record<string, any>>, resolvedModulePaths: Set<string>, nuxt?: Nuxt): Promise<void>;
|
||||
/**
|
||||
* Installs a module on a Nuxt instance.
|
||||
* @deprecated Use module dependencies.
|
||||
*/
|
||||
declare function installModule<T extends string | NuxtModule, Config extends Extract<NonNullable<NuxtConfig["modules"]>[number], [T, any]>>(moduleToInstall: T, inlineOptions?: [Config] extends [never] ? any : Config[1], nuxt?: Nuxt): Promise<void>;
|
||||
declare function resolveModuleWithOptions(definition: NuxtModule<any> | string | false | undefined | null | [(NuxtModule | string)?, Record<string, any>?], nuxt: Nuxt): {
|
||||
resolvedPath?: string;
|
||||
module: string | NuxtModule<any>;
|
||||
options: Record<string, any>;
|
||||
} | undefined;
|
||||
declare function loadNuxtModuleInstance(nuxtModule: string | NuxtModule, nuxt?: Nuxt): Promise<{
|
||||
nuxtModule: NuxtModule<any>;
|
||||
buildTimeModuleMeta: ModuleMeta;
|
||||
resolvedModulePath?: string;
|
||||
}>;
|
||||
declare function getDirectory(p: string): string;
|
||||
declare const normalizeModuleTranspilePath: (p: string) => string;
|
||||
//#endregion
|
||||
//#region src/module/compatibility.d.ts
|
||||
/**
|
||||
* Check if a Nuxt module is installed by name.
|
||||
*
|
||||
* This will check both the installed modules and the modules to be installed. Note
|
||||
* that it cannot detect if a module is _going to be_ installed programmatically by another module.
|
||||
*/
|
||||
declare function hasNuxtModule(moduleName: string, nuxt?: Nuxt): boolean;
|
||||
/**
|
||||
* Checks if a Nuxt module is compatible with a given semver version.
|
||||
*/
|
||||
declare function hasNuxtModuleCompatibility(module: string | NuxtModule, semverVersion: string, nuxt?: Nuxt): Promise<boolean>;
|
||||
/**
|
||||
* Get the version of a Nuxt module.
|
||||
*
|
||||
* Scans installed modules for the version, if it's not found it will attempt to load the module instance and get the version from there.
|
||||
*/
|
||||
declare function getNuxtModuleVersion(module: string | NuxtModule, nuxt?: Nuxt | any): Promise<string | false>;
|
||||
//#endregion
|
||||
//#region src/loader/config.d.ts
|
||||
interface LoadNuxtConfigOptions extends Omit<LoadConfigOptions<NuxtConfig>, "overrides"> {
|
||||
overrides?: Exclude<LoadConfigOptions<NuxtConfig>["overrides"], Promise<any> | Function>;
|
||||
}
|
||||
declare function loadNuxtConfig(opts: LoadNuxtConfigOptions): Promise<NuxtOptions>;
|
||||
//#endregion
|
||||
//#region src/loader/schema.d.ts
|
||||
declare function extendNuxtSchema(def: SchemaDefinition | (() => SchemaDefinition)): void;
|
||||
//#endregion
|
||||
//#region src/loader/nuxt.d.ts
|
||||
interface LoadNuxtOptions extends LoadNuxtConfigOptions {
|
||||
/** Load nuxt with development mode */
|
||||
dev?: boolean;
|
||||
/** Use lazy initialization of nuxt if set to false */
|
||||
ready?: boolean;
|
||||
}
|
||||
declare function loadNuxt(opts: LoadNuxtOptions): Promise<Nuxt>;
|
||||
declare function buildNuxt(nuxt: Nuxt): Promise<any>;
|
||||
//#endregion
|
||||
//#region src/layers.d.ts
|
||||
interface LayerDirectories {
|
||||
/** Nuxt rootDir (`/` by default) */
|
||||
readonly root: string;
|
||||
/** Nitro source directory (`/server` by default) */
|
||||
readonly server: string;
|
||||
/** Local modules directory (`/modules` by default) */
|
||||
readonly modules: string;
|
||||
/** Shared directory (`/shared` by default) */
|
||||
readonly shared: string;
|
||||
/** Public directory (`/public` by default) */
|
||||
readonly public: string;
|
||||
/** Nuxt srcDir (`/app/` by default) */
|
||||
readonly app: string;
|
||||
/** Layouts directory (`/app/layouts` by default) */
|
||||
readonly appLayouts: string;
|
||||
/** Middleware directory (`/app/middleware` by default) */
|
||||
readonly appMiddleware: string;
|
||||
/** Pages directory (`/app/pages` by default) */
|
||||
readonly appPages: string;
|
||||
/** Plugins directory (`/app/plugins` by default) */
|
||||
readonly appPlugins: string;
|
||||
}
|
||||
/**
|
||||
* Get the resolved directory paths for all layers in a Nuxt application.
|
||||
*
|
||||
* Returns an array of LayerDirectories objects, ordered by layer priority:
|
||||
* - The first layer is the user/project layer (highest priority)
|
||||
* - Earlier layers override later layers in the array
|
||||
* - Base layers appear last in the array (lowest priority)
|
||||
*
|
||||
* @param nuxt - The Nuxt instance to get layers from. Defaults to the current Nuxt context.
|
||||
* @returns Array of LayerDirectories objects, ordered by priority (user layer first)
|
||||
*/
|
||||
declare function getLayerDirectories(nuxt?: Nuxt): LayerDirectories[];
|
||||
//#endregion
|
||||
//#region src/head.d.ts
|
||||
declare function setGlobalHead(head: NuxtAppConfig["head"]): void;
|
||||
//#endregion
|
||||
//#region src/imports.d.ts
|
||||
declare function addImports(imports: Import | Import[]): void;
|
||||
declare function addImportsDir(dirs: string | string[], opts?: {
|
||||
prepend?: boolean;
|
||||
}): void;
|
||||
declare function addImportsSources(presets: InlinePreset | InlinePreset[]): void;
|
||||
//#endregion
|
||||
//#region src/runtime-config.d.ts
|
||||
/**
|
||||
* Access 'resolved' Nuxt runtime configuration, with values updated from environment.
|
||||
*
|
||||
* This mirrors the runtime behavior of Nitro.
|
||||
*/
|
||||
declare function useRuntimeConfig(): Record<string, any>;
|
||||
/**
|
||||
* Update Nuxt runtime configuration.
|
||||
*/
|
||||
declare function updateRuntimeConfig(runtimeConfig: Record<string, unknown>): void | Promise<void>;
|
||||
//#endregion
|
||||
//#region src/build.d.ts
|
||||
type Arrayable<T> = T | T[];
|
||||
type Thenable<T> = T | Promise<T>;
|
||||
interface ExtendConfigOptions {
|
||||
/**
|
||||
* Install plugin on dev
|
||||
* @default true
|
||||
*/
|
||||
dev?: boolean;
|
||||
/**
|
||||
* Install plugin on build
|
||||
* @default true
|
||||
*/
|
||||
build?: boolean;
|
||||
/**
|
||||
* Install plugin on server side
|
||||
* @default true
|
||||
*/
|
||||
server?: boolean;
|
||||
/**
|
||||
* Install plugin on client side
|
||||
* @default true
|
||||
*/
|
||||
client?: boolean;
|
||||
/**
|
||||
* Prepends the plugin to the array with `unshift()` instead of `push()`.
|
||||
*/
|
||||
prepend?: boolean;
|
||||
}
|
||||
interface ExtendWebpackConfigOptions extends ExtendConfigOptions {}
|
||||
interface ExtendViteConfigOptions extends Omit<ExtendConfigOptions, "server" | "client"> {
|
||||
/**
|
||||
* Extend server Vite configuration
|
||||
* @default true
|
||||
* @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
|
||||
* Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
|
||||
* You can likely use a Vite plugin to achieve the same result.
|
||||
*/
|
||||
server?: boolean;
|
||||
/**
|
||||
* Extend client Vite configuration
|
||||
* @default true
|
||||
* @deprecated calling \`extendViteConfig\` with only server/client environment is deprecated.
|
||||
* Nuxt 5+ uses the Vite Environment API which shares a configuration between environments.
|
||||
* You can likely use a Vite plugin to achieve the same result.
|
||||
*/
|
||||
client?: boolean;
|
||||
}
|
||||
type ExtendWebpacklikeConfig = (fn: (config: Configuration) => void, options?: ExtendWebpackConfigOptions) => void;
|
||||
/**
|
||||
* Extend webpack config
|
||||
*
|
||||
* The fallback function might be called multiple times
|
||||
* when applying to both client and server builds.
|
||||
*/
|
||||
declare const extendWebpackConfig: ExtendWebpacklikeConfig;
|
||||
/**
|
||||
* Extend rspack config
|
||||
*
|
||||
* The fallback function might be called multiple times
|
||||
* when applying to both client and server builds.
|
||||
*/
|
||||
declare const extendRspackConfig: ExtendWebpacklikeConfig;
|
||||
/**
|
||||
* Extend Vite config
|
||||
*/
|
||||
declare function extendViteConfig(fn: ((config: UserConfig) => Thenable<void>), options?: ExtendViteConfigOptions): (() => void) | undefined;
|
||||
/**
|
||||
* Append webpack plugin to the config.
|
||||
*/
|
||||
declare function addWebpackPlugin(pluginOrGetter: Arrayable<WebpackPluginInstance> | (() => Thenable<Arrayable<WebpackPluginInstance>>), options?: ExtendWebpackConfigOptions): void;
|
||||
/**
|
||||
* Append rspack plugin to the config.
|
||||
*/
|
||||
declare function addRspackPlugin(pluginOrGetter: Arrayable<RspackPluginInstance> | (() => Thenable<Arrayable<RspackPluginInstance>>), options?: ExtendWebpackConfigOptions): void;
|
||||
/**
|
||||
* Append Vite plugin to the config.
|
||||
*/
|
||||
declare function addVitePlugin(pluginOrGetter: Arrayable<Plugin> | (() => Thenable<Arrayable<Plugin>>), options?: ExtendConfigOptions): void;
|
||||
interface AddBuildPluginFactory {
|
||||
vite?: () => Thenable<Arrayable<Plugin>>;
|
||||
webpack?: () => Thenable<Arrayable<WebpackPluginInstance>>;
|
||||
rspack?: () => Thenable<Arrayable<RspackPluginInstance>>;
|
||||
}
|
||||
declare function addBuildPlugin(pluginFactory: AddBuildPluginFactory, options?: ExtendConfigOptions): void;
|
||||
//#endregion
|
||||
//#region src/compatibility.d.ts
|
||||
declare function normalizeSemanticVersion(version: string): string;
|
||||
/**
|
||||
* Check version constraints and return incompatibility issues as an array
|
||||
*/
|
||||
declare function checkNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<NuxtCompatibilityIssues>;
|
||||
/**
|
||||
* Check version constraints and throw a detailed error if has any, otherwise returns true
|
||||
*/
|
||||
declare function assertNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<true>;
|
||||
/**
|
||||
* Check version constraints and return true if passed, otherwise returns false
|
||||
*/
|
||||
declare function hasNuxtCompatibility(constraints: NuxtCompatibility, nuxt?: Nuxt): Promise<boolean>;
|
||||
type NuxtMajorVersion = 2 | 3 | 4;
|
||||
/**
|
||||
* Check if current Nuxt instance is of specified major version
|
||||
*/
|
||||
declare function isNuxtMajorVersion(majorVersion: NuxtMajorVersion, nuxt?: Nuxt): boolean;
|
||||
/**
|
||||
* @deprecated Use `isNuxtMajorVersion(2, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
|
||||
*/
|
||||
declare function isNuxt2(nuxt?: Nuxt): boolean;
|
||||
/**
|
||||
* @deprecated Use `isNuxtMajorVersion(3, nuxt)` instead. This may be removed in \@nuxt/kit v5 or a future major version.
|
||||
*/
|
||||
declare function isNuxt3(nuxt?: Nuxt): boolean;
|
||||
/**
|
||||
* Get nuxt version
|
||||
*/
|
||||
declare function getNuxtVersion(nuxt?: Nuxt | any): string;
|
||||
//#endregion
|
||||
//#region src/components.d.ts
|
||||
/**
|
||||
* Register a directory to be scanned for components and imported only when used.
|
||||
*/
|
||||
declare function addComponentsDir(dir: ComponentsDir, opts?: {
|
||||
prepend?: boolean;
|
||||
}): void;
|
||||
type AddComponentOptions = {
|
||||
name: string;
|
||||
filePath: string;
|
||||
} & Partial<Exclude<Component, "shortPath" | "async" | "level" | "import" | "asyncImport">>;
|
||||
/**
|
||||
* This utility takes a file path or npm package that is scanned for named exports, which are get added automatically
|
||||
*/
|
||||
declare function addComponentExports(opts: Omit<AddComponentOptions, "name"> & {
|
||||
prefix?: string;
|
||||
}): void;
|
||||
/**
|
||||
* Register a component by its name and filePath.
|
||||
*/
|
||||
declare function addComponent(opts: AddComponentOptions): void;
|
||||
//#endregion
|
||||
//#region src/context.d.ts
|
||||
/**
|
||||
* Direct access to the Nuxt global context - see https://github.com/unjs/unctx.
|
||||
* @deprecated Use `getNuxtCtx` instead
|
||||
*/
|
||||
declare const nuxtCtx: UseContext<Nuxt>;
|
||||
/** Direct access to the Nuxt context with asyncLocalStorage - see https://github.com/unjs/unctx. */
|
||||
declare const getNuxtCtx: () => Nuxt | null;
|
||||
/**
|
||||
* Get access to Nuxt instance.
|
||||
*
|
||||
* Throws an error if Nuxt instance is unavailable.
|
||||
* @example
|
||||
* ```js
|
||||
* const nuxt = useNuxt()
|
||||
* ```
|
||||
*/
|
||||
declare function useNuxt(): Nuxt;
|
||||
/**
|
||||
* Get access to Nuxt instance.
|
||||
*
|
||||
* Returns null if Nuxt instance is unavailable.
|
||||
* @example
|
||||
* ```js
|
||||
* const nuxt = tryUseNuxt()
|
||||
* if (nuxt) {
|
||||
* // Do something
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
declare function tryUseNuxt(): Nuxt | null;
|
||||
declare function runWithNuxtContext<T extends (...args: any[]) => any>(nuxt: Nuxt, fn: T): ReturnType<T>;
|
||||
//#endregion
|
||||
//#region src/ignore.d.ts
|
||||
declare function createIsIgnored(nuxt?: Nuxt | null | undefined): (pathname: string, stats?: unknown) => boolean;
|
||||
/**
|
||||
* Return a filter function to filter an array of paths
|
||||
*/
|
||||
declare function isIgnored(pathname: string, _stats?: unknown, nuxt?: Nuxt | null | undefined): boolean;
|
||||
declare function resolveIgnorePatterns(relativePath?: string): string[];
|
||||
//#endregion
|
||||
//#region src/layout.d.ts
|
||||
declare function addLayout(template: NuxtTemplate | string, name?: string): void;
|
||||
//#endregion
|
||||
//#region src/nitro-types.d.ts
|
||||
type isNitroV2 = "options" extends keyof Nitro$2 ? "___INVALID" extends keyof Nitro$2 ? false : true : false;
|
||||
type isNitroV3 = "options" extends keyof Nitro$1 ? "___INVALID" extends keyof Nitro$1 ? false : true : false;
|
||||
type Nitro = isNitroV2 extends true ? isNitroV3 extends true ? Nitro$2 | Nitro$1 : Nitro$2 : Nitro$1;
|
||||
type NitroDevEventHandler = isNitroV2 extends true ? isNitroV3 extends true ? NitroDevEventHandler$2 | NitroDevEventHandler$1 : NitroDevEventHandler$2 : NitroDevEventHandler$1;
|
||||
type NitroEventHandler = isNitroV2 extends true ? isNitroV3 extends true ? NitroEventHandler$2 | NitroEventHandler$1 : NitroEventHandler$2 : NitroEventHandler$1;
|
||||
type NitroRouteConfig = isNitroV2 extends true ? isNitroV3 extends true ? NitroRouteConfig$2 | NitroRouteConfig$1 : NitroRouteConfig$2 : NitroRouteConfig$1;
|
||||
//#endregion
|
||||
//#region src/pages.d.ts
|
||||
declare function extendPages(cb: NuxtHooks["pages:extend"]): void;
|
||||
interface ExtendRouteRulesOptions {
|
||||
/**
|
||||
* Override route rule config
|
||||
* @default false
|
||||
*/
|
||||
override?: boolean;
|
||||
}
|
||||
declare function extendRouteRules(route: string, rule: NitroRouteConfig, options?: ExtendRouteRulesOptions): void;
|
||||
interface AddRouteMiddlewareOptions {
|
||||
/**
|
||||
* Override existing middleware with the same name, if it exists
|
||||
* @default false
|
||||
*/
|
||||
override?: boolean;
|
||||
/**
|
||||
* Prepend middleware to the list
|
||||
* @default false
|
||||
*/
|
||||
prepend?: boolean;
|
||||
}
|
||||
declare function addRouteMiddleware(input: NuxtMiddleware | NuxtMiddleware[], options?: AddRouteMiddlewareOptions): void;
|
||||
//#endregion
|
||||
//#region src/plugin.d.ts
|
||||
declare function normalizePlugin(plugin: NuxtPlugin | string): NuxtPlugin;
|
||||
/**
|
||||
* Registers a nuxt plugin and to the plugins array.
|
||||
*
|
||||
* Note: You can use mode or .client and .server modifiers with fileName option
|
||||
* to use plugin only in client or server side.
|
||||
*
|
||||
* Note: By default plugin is prepended to the plugins array. You can use second argument to append (push) instead.
|
||||
* @example
|
||||
* ```js
|
||||
* import { createResolver } from '@nuxt/kit'
|
||||
* const resolver = createResolver(import.meta.url)
|
||||
*
|
||||
* addPlugin({
|
||||
* src: resolver.resolve('templates/foo.js'),
|
||||
* filename: 'foo.server.js' // [optional] only include in server bundle
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
interface AddPluginOptions {
|
||||
append?: boolean;
|
||||
}
|
||||
declare function addPlugin(_plugin: NuxtPlugin | string, opts?: AddPluginOptions): NuxtPlugin;
|
||||
/**
|
||||
* Adds a template and registers as a nuxt plugin.
|
||||
*/
|
||||
declare function addPluginTemplate(plugin: NuxtPluginTemplate | string, opts?: AddPluginOptions): NuxtPlugin;
|
||||
//#endregion
|
||||
//#region src/resolve.d.ts
|
||||
interface ResolvePathOptions {
|
||||
/** Base for resolving paths from. Default is Nuxt rootDir. */
|
||||
cwd?: string;
|
||||
/** An object of aliases. Default is Nuxt configured aliases. */
|
||||
alias?: Record<string, string>;
|
||||
/**
|
||||
* The file extensions to try.
|
||||
* Default is Nuxt configured extensions.
|
||||
*
|
||||
* Isn't considered when `type` is set to `'dir'`.
|
||||
*/
|
||||
extensions?: string[];
|
||||
/**
|
||||
* Whether to resolve files that exist in the Nuxt VFS (for example, as a Nuxt template).
|
||||
* @default false
|
||||
*/
|
||||
virtual?: boolean;
|
||||
/**
|
||||
* Whether to fallback to the original path if the resolved path does not exist instead of returning the normalized input path.
|
||||
* @default false
|
||||
*/
|
||||
fallbackToOriginal?: boolean;
|
||||
/**
|
||||
* The type of the path to be resolved.
|
||||
* @default 'file'
|
||||
*/
|
||||
type?: PathType;
|
||||
}
|
||||
/**
|
||||
* Resolve the full path to a file or a directory (based on the provided type), respecting Nuxt alias and extensions options.
|
||||
*
|
||||
* If a path cannot be resolved, normalized input will be returned unless the `fallbackToOriginal` option is set to `true`,
|
||||
* in which case the original input path will be returned.
|
||||
*/
|
||||
declare function resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>;
|
||||
/**
|
||||
* Try to resolve first existing file in paths
|
||||
*/
|
||||
declare function findPath(paths: string | string[], opts?: ResolvePathOptions, pathType?: PathType): Promise<string | null>;
|
||||
/**
|
||||
* Resolve path aliases respecting Nuxt alias options
|
||||
*/
|
||||
declare function resolveAlias(path: string, alias?: Record<string, string>): string;
|
||||
interface Resolver {
|
||||
resolve(...path: string[]): string;
|
||||
resolvePath(path: string, opts?: ResolvePathOptions): Promise<string>;
|
||||
}
|
||||
/**
|
||||
* Create a relative resolver
|
||||
*/
|
||||
declare function createResolver(base: string | URL): Resolver;
|
||||
declare function resolveNuxtModule(base: string, paths: string[]): Promise<string[]>;
|
||||
type PathType = "file" | "dir";
|
||||
/**
|
||||
* Resolve absolute file paths in the provided directory with respect to `.nuxtignore` and return them sorted.
|
||||
* @param path path to the directory to resolve files in
|
||||
* @param pattern glob pattern or an array of glob patterns to match files
|
||||
* @param opts options for globbing
|
||||
* @param opts.followSymbolicLinks whether to follow symbolic links, default is `true`
|
||||
* @param opts.ignore additional glob patterns to ignore
|
||||
* @returns sorted array of absolute file paths
|
||||
*/
|
||||
declare function resolveFiles(path: string, pattern: string | string[], opts?: {
|
||||
followSymbolicLinks?: boolean;
|
||||
ignore?: GlobOptions["ignore"];
|
||||
}): Promise<string[]>;
|
||||
//#endregion
|
||||
//#region src/nitro.d.ts
|
||||
/**
|
||||
* Adds a nitro server handler
|
||||
*
|
||||
*/
|
||||
declare function addServerHandler(handler: NitroEventHandler): void;
|
||||
/**
|
||||
* Adds a nitro server handler for development-only
|
||||
*
|
||||
*/
|
||||
declare function addDevServerHandler(handler: NitroDevEventHandler): void;
|
||||
/**
|
||||
* Adds a Nitro plugin
|
||||
*/
|
||||
declare function addServerPlugin(plugin: string): void;
|
||||
/**
|
||||
* Adds routes to be prerendered
|
||||
*/
|
||||
declare function addPrerenderRoutes(routes: string | string[]): void;
|
||||
/**
|
||||
* Access to the Nitro instance
|
||||
*
|
||||
* **Note:** You can call `useNitro()` only after `ready` hook.
|
||||
*
|
||||
* **Note:** Changes to the Nitro instance configuration are not applied.
|
||||
* @example
|
||||
*
|
||||
* ```ts
|
||||
* nuxt.hook('ready', () => {
|
||||
* console.log(useNitro())
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
declare function useNitro(): Nitro;
|
||||
/**
|
||||
* Add server imports to be auto-imported by Nitro
|
||||
*/
|
||||
declare function addServerImports(imports: Import | Import[]): void;
|
||||
/**
|
||||
* Add directories to be scanned for auto-imports by Nitro
|
||||
*/
|
||||
declare function addServerImportsDir(dirs: string | string[], opts?: {
|
||||
prepend?: boolean;
|
||||
}): void;
|
||||
/**
|
||||
* Add directories to be scanned by Nitro. It will check for subdirectories,
|
||||
* which will be registered just like the `~~/server` folder is.
|
||||
*/
|
||||
declare function addServerScanDir(dirs: string | string[], opts?: {
|
||||
prepend?: boolean;
|
||||
}): void;
|
||||
//#endregion
|
||||
//#region src/template.d.ts
|
||||
/**
|
||||
* Renders given template during build into the virtual file system (and optionally to disk in the project `buildDir`)
|
||||
*/
|
||||
declare function addTemplate<T>(_template: NuxtTemplate<T> | string): ResolvedNuxtTemplate<T>;
|
||||
/**
|
||||
* Adds a virtual file that can be used within the Nuxt Nitro server build.
|
||||
*/
|
||||
declare function addServerTemplate(template: NuxtServerTemplate): NuxtServerTemplate;
|
||||
/**
|
||||
* Renders given types during build to disk in the project `buildDir`
|
||||
* and register them as types.
|
||||
*
|
||||
* You can pass a second context object to specify in which context the type should be added.
|
||||
*
|
||||
* If no context object is passed, then it will only be added to the nuxt context.
|
||||
*/
|
||||
declare function addTypeTemplate<T>(_template: NuxtTypeTemplate<T>, context?: {
|
||||
nitro?: boolean;
|
||||
nuxt?: boolean;
|
||||
node?: boolean;
|
||||
shared?: boolean;
|
||||
}): ResolvedNuxtTemplate<T>;
|
||||
/**
|
||||
* Normalize a nuxt template object
|
||||
*/
|
||||
declare function normalizeTemplate<T>(template: NuxtTemplate<T> | string, buildDir?: string): ResolvedNuxtTemplate<T>;
|
||||
/**
|
||||
* Trigger rebuilding Nuxt templates
|
||||
*
|
||||
* You can pass a filter within the options to selectively regenerate a subset of templates.
|
||||
*/
|
||||
declare function updateTemplates(options?: {
|
||||
filter?: (template: ResolvedNuxtTemplate<any>) => boolean;
|
||||
}): Promise<void>;
|
||||
declare function writeTypes(nuxt: Nuxt): Promise<void>;
|
||||
//#endregion
|
||||
//#region src/logger.d.ts
|
||||
declare const logger: ConsolaInstance;
|
||||
declare function useLogger(tag?: string, options?: Partial<ConsolaOptions>): ConsolaInstance;
|
||||
//#endregion
|
||||
//#region src/internal/esm.d.ts
|
||||
interface ResolveModuleOptions {
|
||||
/** @deprecated use `url` with URLs pointing at a file - never a directory */
|
||||
paths?: string | string[];
|
||||
url?: URL | URL[];
|
||||
/** @default ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'] */
|
||||
extensions?: string[];
|
||||
}
|
||||
declare function directoryToURL(dir: string): URL;
|
||||
/**
|
||||
* Resolve a module from a given root path using an algorithm patterned on
|
||||
* the upcoming `import.meta.resolve`. It returns a file URL
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
declare function tryResolveModule(id: string, url: URL | URL[]): Promise<string | undefined>;
|
||||
/** @deprecated pass URLs pointing at files */
|
||||
declare function tryResolveModule(id: string, url: string | string[]): Promise<string | undefined>;
|
||||
declare function resolveModule(id: string, options?: ResolveModuleOptions): string;
|
||||
interface ImportModuleOptions extends ResolveModuleOptions {
|
||||
/** Automatically de-default the result of requiring the module. */
|
||||
interopDefault?: boolean;
|
||||
}
|
||||
declare function importModule<T = unknown>(id: string, opts?: ImportModuleOptions): Promise<T>;
|
||||
declare function tryImportModule<T = unknown>(id: string, opts?: ImportModuleOptions): Promise<T | undefined> | undefined;
|
||||
/**
|
||||
* @deprecated Please use `importModule` instead.
|
||||
*/
|
||||
declare function requireModule<T = unknown>(id: string, opts?: ImportModuleOptions): T;
|
||||
/**
|
||||
* @deprecated Please use `tryImportModule` instead.
|
||||
*/
|
||||
declare function tryRequireModule<T = unknown>(id: string, opts?: ImportModuleOptions): T | undefined;
|
||||
//#endregion
|
||||
export { type AddComponentOptions, type AddPluginOptions, type AddRouteMiddlewareOptions, type ExtendConfigOptions, type ExtendRouteRulesOptions, type ExtendViteConfigOptions, type ExtendWebpackConfigOptions, type ImportModuleOptions, type LayerDirectories, type LoadNuxtConfigOptions, type LoadNuxtOptions, type NuxtMajorVersion, type ResolveModuleOptions, type ResolvePathOptions, type Resolver, addBuildPlugin, addComponent, addComponentExports, addComponentsDir, addDevServerHandler, addImports, addImportsDir, addImportsSources, addLayout, addPlugin, addPluginTemplate, addPrerenderRoutes, addRouteMiddleware, addRspackPlugin, addServerHandler, addServerImports, addServerImportsDir, addServerPlugin, addServerScanDir, addServerTemplate, addTemplate, addTypeTemplate, addVitePlugin, addWebpackPlugin, assertNuxtCompatibility, buildNuxt, checkNuxtCompatibility, createIsIgnored, createResolver, defineNuxtModule, directoryToURL, extendNuxtSchema, extendPages, extendRouteRules, extendRspackConfig, extendViteConfig, extendWebpackConfig, findPath, getDirectory, getLayerDirectories, getNuxtCtx, getNuxtModuleVersion, getNuxtVersion, hasNuxtCompatibility, hasNuxtModule, hasNuxtModuleCompatibility, importModule, installModule, installModules, isIgnored, isNuxt2, isNuxt3, isNuxtMajorVersion, loadNuxt, loadNuxtConfig, loadNuxtModuleInstance, logger, normalizeModuleTranspilePath, normalizePlugin, normalizeSemanticVersion, normalizeTemplate, nuxtCtx, requireModule, resolveAlias, resolveFiles, resolveIgnorePatterns, resolveModule, resolveModuleWithOptions, resolveNuxtModule, resolvePath, runWithNuxtContext, setGlobalHead, tryImportModule, tryRequireModule, tryResolveModule, tryUseNuxt, updateRuntimeConfig, updateTemplates, useLogger, useNitro, useNuxt, useRuntimeConfig, writeTypes };
|
||||
1685
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/index.mjs
generated
vendored
Normal file
1685
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
63
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/package.json
generated
vendored
Normal file
63
node_modules/@dxup/nuxt/node_modules/@nuxt/kit/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "@nuxt/kit",
|
||||
"version": "4.3.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/nuxt/nuxt.git",
|
||||
"directory": "packages/kit"
|
||||
},
|
||||
"homepage": "https://nuxt.com/docs/4.x/api/kit",
|
||||
"description": "Toolkit for authoring modules and interacting with Nuxt",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.mts",
|
||||
"exports": {
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"c12": "^3.3.3",
|
||||
"consola": "^3.4.2",
|
||||
"defu": "^6.1.4",
|
||||
"destr": "^2.0.5",
|
||||
"errx": "^0.1.0",
|
||||
"exsolve": "^1.0.8",
|
||||
"ignore": "^7.0.5",
|
||||
"jiti": "^2.6.1",
|
||||
"klona": "^2.0.6",
|
||||
"mlly": "^1.8.0",
|
||||
"ohash": "^2.0.11",
|
||||
"pathe": "^2.0.3",
|
||||
"pkg-types": "^2.3.0",
|
||||
"rc9": "^3.0.0",
|
||||
"scule": "^1.3.0",
|
||||
"semver": "^7.7.4",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"ufo": "^1.6.3",
|
||||
"unctx": "^2.5.0",
|
||||
"untyped": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rspack/core": "1.7.5",
|
||||
"@types/semver": "7.7.1",
|
||||
"hookable": "5.5.3",
|
||||
"nitro": "3.0.1-alpha.2",
|
||||
"nitropack": "2.13.1",
|
||||
"obuild": "0.4.27",
|
||||
"unimport": "5.6.0",
|
||||
"vite": "7.3.1",
|
||||
"vitest": "4.0.18",
|
||||
"webpack": "5.104.1",
|
||||
"@nuxt/schema": "4.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build:stub": "obuild --stub",
|
||||
"test:attw": "attw --pack"
|
||||
}
|
||||
}
|
||||
70
node_modules/@dxup/nuxt/node_modules/pathe/LICENSE
generated
vendored
Normal file
70
node_modules/@dxup/nuxt/node_modules/pathe/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Pooya Parsa <pooya@pi0.io> - Daniel Roe <daniel@roe.dev>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Copyright Joyent, Inc. and other Node contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023-present Fabio Spampinato
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
73
node_modules/@dxup/nuxt/node_modules/pathe/README.md
generated
vendored
Normal file
73
node_modules/@dxup/nuxt/node_modules/pathe/README.md
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
# 🛣️ pathe
|
||||
|
||||
> Universal filesystem path utils
|
||||
|
||||
[![version][npm-v-src]][npm-v-href]
|
||||
[![downloads][npm-d-src]][npm-d-href]
|
||||
[![size][size-src]][size-href]
|
||||
|
||||
## ❓ Why
|
||||
|
||||
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS and used backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths. [Node.js's built-in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
|
||||
|
||||
Compared to popular [upath](https://github.com/anodynos/upath), pathe provides **identical exports** of Node.js with normalization on **all operations** and is written in modern **ESM/TypeScript** and has **no dependency on Node.js**!
|
||||
|
||||
This package is a drop-in replacement of the Node.js's [path module](https://nodejs.org/api/path.html) module and ensures paths are normalized with slash `/` and work in environments including Node.js.
|
||||
|
||||
## 💿 Usage
|
||||
|
||||
Install using npm or yarn:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm i pathe
|
||||
|
||||
# yarn
|
||||
yarn add pathe
|
||||
|
||||
# pnpm
|
||||
pnpm i pathe
|
||||
```
|
||||
|
||||
Import:
|
||||
|
||||
```js
|
||||
// ESM / Typescript
|
||||
import { resolve, matchesGlob } from "pathe";
|
||||
|
||||
// CommonJS
|
||||
const { resolve, matchesGlob } = require("pathe");
|
||||
```
|
||||
|
||||
Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is consistently like POSIX regardless of your input paths format and running platform (the only exception is `delimiter` constant export, it will be set to `;` on windows platform).
|
||||
|
||||
### Extra utilities
|
||||
|
||||
Pathe exports some extra utilities that do not exist in standard Node.js [path module](https://nodejs.org/api/path.html).
|
||||
In order to use them, you can import from `pathe/utils` subpath:
|
||||
|
||||
```js
|
||||
import {
|
||||
filename,
|
||||
normalizeAliases,
|
||||
resolveAlias,
|
||||
reverseResolveAlias,
|
||||
} from "pathe/utils";
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Made with 💛 Published under the [MIT](./LICENSE) license.
|
||||
|
||||
Some code was used from the Node.js project. Glob supported is powered by [zeptomatch](https://github.com/fabiospampinato/zeptomatch).
|
||||
|
||||
<!-- Refs -->
|
||||
|
||||
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
|
||||
[npm-v-href]: https://npmjs.com/package/pathe
|
||||
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
|
||||
[npm-d-href]: https://npmjs.com/package/pathe
|
||||
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
|
||||
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
|
||||
[size-src]: https://packagephobia.now.sh/badge?p=pathe
|
||||
[size-href]: https://packagephobia.now.sh/result?p=pathe
|
||||
39
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.cjs
generated
vendored
Normal file
39
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
const _path = require('./shared/pathe.BSlhyZSM.cjs');
|
||||
|
||||
const delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
|
||||
const _platforms = { posix: void 0, win32: void 0 };
|
||||
const mix = (del = delimiter) => {
|
||||
return new Proxy(_path._path, {
|
||||
get(_, prop) {
|
||||
if (prop === "delimiter") return del;
|
||||
if (prop === "posix") return posix;
|
||||
if (prop === "win32") return win32;
|
||||
return _platforms[prop] || _path._path[prop];
|
||||
}
|
||||
});
|
||||
};
|
||||
const posix = /* @__PURE__ */ mix(":");
|
||||
const win32 = /* @__PURE__ */ mix(";");
|
||||
|
||||
exports.basename = _path.basename;
|
||||
exports.dirname = _path.dirname;
|
||||
exports.extname = _path.extname;
|
||||
exports.format = _path.format;
|
||||
exports.isAbsolute = _path.isAbsolute;
|
||||
exports.join = _path.join;
|
||||
exports.matchesGlob = _path.matchesGlob;
|
||||
exports.normalize = _path.normalize;
|
||||
exports.normalizeString = _path.normalizeString;
|
||||
exports.parse = _path.parse;
|
||||
exports.relative = _path.relative;
|
||||
exports.resolve = _path.resolve;
|
||||
exports.sep = _path.sep;
|
||||
exports.toNamespacedPath = _path.toNamespacedPath;
|
||||
exports.default = posix;
|
||||
exports.delimiter = delimiter;
|
||||
exports.posix = posix;
|
||||
exports.win32 = win32;
|
||||
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.cts
generated
vendored
Normal file
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import * as path from 'node:path';
|
||||
import path__default from 'node:path';
|
||||
|
||||
/**
|
||||
* Constant for path separator.
|
||||
*
|
||||
* Always equals to `"/"`.
|
||||
*/
|
||||
declare const sep = "/";
|
||||
declare const normalize: typeof path__default.normalize;
|
||||
declare const join: typeof path__default.join;
|
||||
declare const resolve: typeof path__default.resolve;
|
||||
/**
|
||||
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
||||
*
|
||||
* @param path - The path to normalise.
|
||||
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
||||
* @returns the normalised path string.
|
||||
*/
|
||||
declare function normalizeString(path: string, allowAboveRoot: boolean): string;
|
||||
declare const isAbsolute: typeof path__default.isAbsolute;
|
||||
declare const toNamespacedPath: typeof path__default.toNamespacedPath;
|
||||
declare const extname: typeof path__default.extname;
|
||||
declare const relative: typeof path__default.relative;
|
||||
declare const dirname: typeof path__default.dirname;
|
||||
declare const format: typeof path__default.format;
|
||||
declare const basename: typeof path__default.basename;
|
||||
declare const parse: typeof path__default.parse;
|
||||
/**
|
||||
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
||||
* @param path The path to glob-match against.
|
||||
* @param pattern The glob to check the path against.
|
||||
*/
|
||||
declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
|
||||
|
||||
type NodePath = typeof path;
|
||||
/**
|
||||
* The platform-specific file delimiter.
|
||||
*
|
||||
* Equals to `";"` in windows and `":"` in all other platforms.
|
||||
*/
|
||||
declare const delimiter: ";" | ":";
|
||||
declare const posix: NodePath["posix"];
|
||||
declare const win32: NodePath["win32"];
|
||||
declare const _default: NodePath;
|
||||
|
||||
export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
|
||||
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.mts
generated
vendored
Normal file
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import * as path from 'node:path';
|
||||
import path__default from 'node:path';
|
||||
|
||||
/**
|
||||
* Constant for path separator.
|
||||
*
|
||||
* Always equals to `"/"`.
|
||||
*/
|
||||
declare const sep = "/";
|
||||
declare const normalize: typeof path__default.normalize;
|
||||
declare const join: typeof path__default.join;
|
||||
declare const resolve: typeof path__default.resolve;
|
||||
/**
|
||||
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
||||
*
|
||||
* @param path - The path to normalise.
|
||||
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
||||
* @returns the normalised path string.
|
||||
*/
|
||||
declare function normalizeString(path: string, allowAboveRoot: boolean): string;
|
||||
declare const isAbsolute: typeof path__default.isAbsolute;
|
||||
declare const toNamespacedPath: typeof path__default.toNamespacedPath;
|
||||
declare const extname: typeof path__default.extname;
|
||||
declare const relative: typeof path__default.relative;
|
||||
declare const dirname: typeof path__default.dirname;
|
||||
declare const format: typeof path__default.format;
|
||||
declare const basename: typeof path__default.basename;
|
||||
declare const parse: typeof path__default.parse;
|
||||
/**
|
||||
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
||||
* @param path The path to glob-match against.
|
||||
* @param pattern The glob to check the path against.
|
||||
*/
|
||||
declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
|
||||
|
||||
type NodePath = typeof path;
|
||||
/**
|
||||
* The platform-specific file delimiter.
|
||||
*
|
||||
* Equals to `";"` in windows and `":"` in all other platforms.
|
||||
*/
|
||||
declare const delimiter: ";" | ":";
|
||||
declare const posix: NodePath["posix"];
|
||||
declare const win32: NodePath["win32"];
|
||||
declare const _default: NodePath;
|
||||
|
||||
export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
|
||||
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.ts
generated
vendored
Normal file
47
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import * as path from 'node:path';
|
||||
import path__default from 'node:path';
|
||||
|
||||
/**
|
||||
* Constant for path separator.
|
||||
*
|
||||
* Always equals to `"/"`.
|
||||
*/
|
||||
declare const sep = "/";
|
||||
declare const normalize: typeof path__default.normalize;
|
||||
declare const join: typeof path__default.join;
|
||||
declare const resolve: typeof path__default.resolve;
|
||||
/**
|
||||
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
||||
*
|
||||
* @param path - The path to normalise.
|
||||
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
||||
* @returns the normalised path string.
|
||||
*/
|
||||
declare function normalizeString(path: string, allowAboveRoot: boolean): string;
|
||||
declare const isAbsolute: typeof path__default.isAbsolute;
|
||||
declare const toNamespacedPath: typeof path__default.toNamespacedPath;
|
||||
declare const extname: typeof path__default.extname;
|
||||
declare const relative: typeof path__default.relative;
|
||||
declare const dirname: typeof path__default.dirname;
|
||||
declare const format: typeof path__default.format;
|
||||
declare const basename: typeof path__default.basename;
|
||||
declare const parse: typeof path__default.parse;
|
||||
/**
|
||||
* The `path.matchesGlob()` method determines if `path` matches the `pattern`.
|
||||
* @param path The path to glob-match against.
|
||||
* @param pattern The glob to check the path against.
|
||||
*/
|
||||
declare const matchesGlob: (path: string, pattern: string | string[]) => boolean;
|
||||
|
||||
type NodePath = typeof path;
|
||||
/**
|
||||
* The platform-specific file delimiter.
|
||||
*
|
||||
* Equals to `";"` in windows and `":"` in all other platforms.
|
||||
*/
|
||||
declare const delimiter: ";" | ":";
|
||||
declare const posix: NodePath["posix"];
|
||||
declare const win32: NodePath["win32"];
|
||||
declare const _default: NodePath;
|
||||
|
||||
export { basename, _default as default, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, normalizeString, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
|
||||
19
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.mjs
generated
vendored
Normal file
19
node_modules/@dxup/nuxt/node_modules/pathe/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { _ as _path } from './shared/pathe.M-eThtNZ.mjs';
|
||||
export { c as basename, d as dirname, e as extname, f as format, i as isAbsolute, j as join, m as matchesGlob, n as normalize, a as normalizeString, p as parse, b as relative, r as resolve, s as sep, t as toNamespacedPath } from './shared/pathe.M-eThtNZ.mjs';
|
||||
|
||||
const delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
|
||||
const _platforms = { posix: void 0, win32: void 0 };
|
||||
const mix = (del = delimiter) => {
|
||||
return new Proxy(_path, {
|
||||
get(_, prop) {
|
||||
if (prop === "delimiter") return del;
|
||||
if (prop === "posix") return posix;
|
||||
if (prop === "win32") return win32;
|
||||
return _platforms[prop] || _path[prop];
|
||||
}
|
||||
});
|
||||
};
|
||||
const posix = /* @__PURE__ */ mix(":");
|
||||
const win32 = /* @__PURE__ */ mix(";");
|
||||
|
||||
export { posix as default, delimiter, posix, win32 };
|
||||
266
node_modules/@dxup/nuxt/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs
generated
vendored
Normal file
266
node_modules/@dxup/nuxt/node_modules/pathe/dist/shared/pathe.BSlhyZSM.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
249
node_modules/@dxup/nuxt/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
generated
vendored
Normal file
249
node_modules/@dxup/nuxt/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
82
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.cjs
generated
vendored
Normal file
82
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.cjs
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
'use strict';
|
||||
|
||||
const _path = require('./shared/pathe.BSlhyZSM.cjs');
|
||||
|
||||
const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
|
||||
const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
|
||||
const SLASH_RE = /[/\\]/;
|
||||
function normalizeAliases(_aliases) {
|
||||
if (_aliases[normalizedAliasSymbol]) {
|
||||
return _aliases;
|
||||
}
|
||||
const aliases = Object.fromEntries(
|
||||
Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
|
||||
);
|
||||
for (const key in aliases) {
|
||||
for (const alias in aliases) {
|
||||
if (alias === key || key.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
if (aliases[key]?.startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
|
||||
aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Object.defineProperty(aliases, normalizedAliasSymbol, {
|
||||
value: true,
|
||||
enumerable: false
|
||||
});
|
||||
return aliases;
|
||||
}
|
||||
function resolveAlias(path, aliases) {
|
||||
const _path$1 = _path.normalizeWindowsPath(path);
|
||||
aliases = normalizeAliases(aliases);
|
||||
for (const [alias, to] of Object.entries(aliases)) {
|
||||
if (!_path$1.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
||||
if (hasTrailingSlash(_path$1[_alias.length])) {
|
||||
return _path.join(to, _path$1.slice(alias.length));
|
||||
}
|
||||
}
|
||||
return _path$1;
|
||||
}
|
||||
function reverseResolveAlias(path, aliases) {
|
||||
const _path$1 = _path.normalizeWindowsPath(path);
|
||||
aliases = normalizeAliases(aliases);
|
||||
const matches = [];
|
||||
for (const [to, alias] of Object.entries(aliases)) {
|
||||
if (!_path$1.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
||||
if (hasTrailingSlash(_path$1[_alias.length])) {
|
||||
matches.push(_path.join(to, _path$1.slice(alias.length)));
|
||||
}
|
||||
}
|
||||
return matches.sort((a, b) => b.length - a.length);
|
||||
}
|
||||
function filename(path) {
|
||||
const base = path.split(SLASH_RE).pop();
|
||||
if (!base) {
|
||||
return void 0;
|
||||
}
|
||||
const separatorIndex = base.lastIndexOf(".");
|
||||
if (separatorIndex <= 0) {
|
||||
return base;
|
||||
}
|
||||
return base.slice(0, separatorIndex);
|
||||
}
|
||||
function _compareAliases(a, b) {
|
||||
return b.split("/").length - a.split("/").length;
|
||||
}
|
||||
function hasTrailingSlash(path = "/") {
|
||||
const lastChar = path[path.length - 1];
|
||||
return lastChar === "/" || lastChar === "\\";
|
||||
}
|
||||
|
||||
exports.filename = filename;
|
||||
exports.normalizeAliases = normalizeAliases;
|
||||
exports.resolveAlias = resolveAlias;
|
||||
exports.reverseResolveAlias = reverseResolveAlias;
|
||||
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.cts
generated
vendored
Normal file
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.cts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
|
||||
* This function also ensures that aliases do not resolve to themselves cyclically.
|
||||
*
|
||||
* @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
|
||||
* @returns a set of normalised alias mappings.
|
||||
*/
|
||||
declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
|
||||
/**
|
||||
* Resolves a path string to its alias if applicable, otherwise returns the original path.
|
||||
* This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
|
||||
*
|
||||
* @param path - The path string to resolve.
|
||||
* @param aliases - A set of alias mappings to use for resolution.
|
||||
* @returns the resolved path as a string.
|
||||
*/
|
||||
declare function resolveAlias(path: string, aliases: Record<string, string>): string;
|
||||
/**
|
||||
* Resolves a path string to its possible alias.
|
||||
*
|
||||
* Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
|
||||
*/
|
||||
declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
|
||||
/**
|
||||
* Extracts the filename from a given path, excluding any directory paths and the file extension.
|
||||
*
|
||||
* @param path - The full path of the file from which to extract the filename.
|
||||
* @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
|
||||
*/
|
||||
declare function filename(path: string): string | undefined;
|
||||
|
||||
export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
|
||||
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.mts
generated
vendored
Normal file
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.mts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
|
||||
* This function also ensures that aliases do not resolve to themselves cyclically.
|
||||
*
|
||||
* @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
|
||||
* @returns a set of normalised alias mappings.
|
||||
*/
|
||||
declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
|
||||
/**
|
||||
* Resolves a path string to its alias if applicable, otherwise returns the original path.
|
||||
* This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
|
||||
*
|
||||
* @param path - The path string to resolve.
|
||||
* @param aliases - A set of alias mappings to use for resolution.
|
||||
* @returns the resolved path as a string.
|
||||
*/
|
||||
declare function resolveAlias(path: string, aliases: Record<string, string>): string;
|
||||
/**
|
||||
* Resolves a path string to its possible alias.
|
||||
*
|
||||
* Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
|
||||
*/
|
||||
declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
|
||||
/**
|
||||
* Extracts the filename from a given path, excluding any directory paths and the file extension.
|
||||
*
|
||||
* @param path - The full path of the file from which to extract the filename.
|
||||
* @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
|
||||
*/
|
||||
declare function filename(path: string): string | undefined;
|
||||
|
||||
export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
|
||||
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.ts
generated
vendored
Normal file
32
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Normalises alias mappings, ensuring that more specific aliases are resolved before less specific ones.
|
||||
* This function also ensures that aliases do not resolve to themselves cyclically.
|
||||
*
|
||||
* @param _aliases - A set of alias mappings where each key is an alias and its value is the actual path it points to.
|
||||
* @returns a set of normalised alias mappings.
|
||||
*/
|
||||
declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
|
||||
/**
|
||||
* Resolves a path string to its alias if applicable, otherwise returns the original path.
|
||||
* This function normalises the path, resolves the alias and then joins it to the alias target if necessary.
|
||||
*
|
||||
* @param path - The path string to resolve.
|
||||
* @param aliases - A set of alias mappings to use for resolution.
|
||||
* @returns the resolved path as a string.
|
||||
*/
|
||||
declare function resolveAlias(path: string, aliases: Record<string, string>): string;
|
||||
/**
|
||||
* Resolves a path string to its possible alias.
|
||||
*
|
||||
* Returns an array of possible alias resolutions (could be empty), sorted by specificity (longest first).
|
||||
*/
|
||||
declare function reverseResolveAlias(path: string, aliases: Record<string, string>): string[];
|
||||
/**
|
||||
* Extracts the filename from a given path, excluding any directory paths and the file extension.
|
||||
*
|
||||
* @param path - The full path of the file from which to extract the filename.
|
||||
* @returns the filename without the extension, or `undefined` if the filename cannot be extracted.
|
||||
*/
|
||||
declare function filename(path: string): string | undefined;
|
||||
|
||||
export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
|
||||
77
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.mjs
generated
vendored
Normal file
77
node_modules/@dxup/nuxt/node_modules/pathe/dist/utils.mjs
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
import { g as normalizeWindowsPath, j as join } from './shared/pathe.M-eThtNZ.mjs';
|
||||
|
||||
const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
|
||||
const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
|
||||
const SLASH_RE = /[/\\]/;
|
||||
function normalizeAliases(_aliases) {
|
||||
if (_aliases[normalizedAliasSymbol]) {
|
||||
return _aliases;
|
||||
}
|
||||
const aliases = Object.fromEntries(
|
||||
Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
|
||||
);
|
||||
for (const key in aliases) {
|
||||
for (const alias in aliases) {
|
||||
if (alias === key || key.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
if (aliases[key]?.startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
|
||||
aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Object.defineProperty(aliases, normalizedAliasSymbol, {
|
||||
value: true,
|
||||
enumerable: false
|
||||
});
|
||||
return aliases;
|
||||
}
|
||||
function resolveAlias(path, aliases) {
|
||||
const _path = normalizeWindowsPath(path);
|
||||
aliases = normalizeAliases(aliases);
|
||||
for (const [alias, to] of Object.entries(aliases)) {
|
||||
if (!_path.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
||||
if (hasTrailingSlash(_path[_alias.length])) {
|
||||
return join(to, _path.slice(alias.length));
|
||||
}
|
||||
}
|
||||
return _path;
|
||||
}
|
||||
function reverseResolveAlias(path, aliases) {
|
||||
const _path = normalizeWindowsPath(path);
|
||||
aliases = normalizeAliases(aliases);
|
||||
const matches = [];
|
||||
for (const [to, alias] of Object.entries(aliases)) {
|
||||
if (!_path.startsWith(alias)) {
|
||||
continue;
|
||||
}
|
||||
const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
|
||||
if (hasTrailingSlash(_path[_alias.length])) {
|
||||
matches.push(join(to, _path.slice(alias.length)));
|
||||
}
|
||||
}
|
||||
return matches.sort((a, b) => b.length - a.length);
|
||||
}
|
||||
function filename(path) {
|
||||
const base = path.split(SLASH_RE).pop();
|
||||
if (!base) {
|
||||
return void 0;
|
||||
}
|
||||
const separatorIndex = base.lastIndexOf(".");
|
||||
if (separatorIndex <= 0) {
|
||||
return base;
|
||||
}
|
||||
return base.slice(0, separatorIndex);
|
||||
}
|
||||
function _compareAliases(a, b) {
|
||||
return b.split("/").length - a.split("/").length;
|
||||
}
|
||||
function hasTrailingSlash(path = "/") {
|
||||
const lastChar = path[path.length - 1];
|
||||
return lastChar === "/" || lastChar === "\\";
|
||||
}
|
||||
|
||||
export { filename, normalizeAliases, resolveAlias, reverseResolveAlias };
|
||||
61
node_modules/@dxup/nuxt/node_modules/pathe/package.json
generated
vendored
Normal file
61
node_modules/@dxup/nuxt/node_modules/pathe/package.json
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "pathe",
|
||||
"version": "2.0.3",
|
||||
"description": "Universal filesystem path utils",
|
||||
"repository": "unjs/pathe",
|
||||
"license": "MIT",
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.cts",
|
||||
"default": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"./utils": {
|
||||
"import": {
|
||||
"types": "./dist/utils.d.mts",
|
||||
"default": "./dist/utils.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/utils.d.cts",
|
||||
"default": "./dist/utils.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"utils.d.ts"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.13.1",
|
||||
"@vitest/coverage-v8": "^3.0.5",
|
||||
"changelogen": "^0.5.7",
|
||||
"esbuild": "^0.25.0",
|
||||
"eslint": "^9.20.1",
|
||||
"eslint-config-unjs": "^0.4.2",
|
||||
"jiti": "^2.4.2",
|
||||
"prettier": "^3.5.0",
|
||||
"typescript": "^5.7.3",
|
||||
"unbuild": "^3.3.1",
|
||||
"vitest": "^3.0.5",
|
||||
"zeptomatch": "^2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "vitest",
|
||||
"lint": "eslint . && prettier -c src test",
|
||||
"lint:fix": "eslint . --fix && prettier -w src test",
|
||||
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
|
||||
"test": "pnpm lint && vitest run --coverage",
|
||||
"test:types": "tsc --noEmit"
|
||||
}
|
||||
}
|
||||
1
node_modules/@dxup/nuxt/node_modules/pathe/utils.d.ts
generated
vendored
Normal file
1
node_modules/@dxup/nuxt/node_modules/pathe/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./dist/utils";
|
||||
38
node_modules/@dxup/nuxt/package.json
generated
vendored
Normal file
38
node_modules/@dxup/nuxt/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "@dxup/nuxt",
|
||||
"type": "module",
|
||||
"version": "0.3.2",
|
||||
"description": "TypeScript plugin for Nuxt",
|
||||
"author": "KazariEX",
|
||||
"license": "MIT",
|
||||
"repository": "KazariEX/dxup",
|
||||
"exports": {
|
||||
".": "./dist/module.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "./dist/typescript.cjs",
|
||||
"types": "./dist/typescript.d.cts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@nuxt/kit": "^4.2.2",
|
||||
"chokidar": "^5.0.0",
|
||||
"pathe": "^2.0.3",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"@dxup/unimport": "^0.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dxup/shared": "",
|
||||
"@volar/language-core": "^2.4.26",
|
||||
"@volar/typescript": "^2.4.26",
|
||||
"@vue/language-core": "^3.1.8",
|
||||
"nuxt": "^4.2.2",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsdown",
|
||||
"dev": "tsdown -w --sourcemap",
|
||||
"release": "node ../../scripts/release.ts"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user