Add comprehensive development roadmap via GitHub Issues
Created 10 detailed GitHub issues covering: - Project activation and management UI (#1-2) - Worker node coordination and visualization (#3-4) - Automated GitHub repository scanning (#5) - Intelligent model-to-issue matching (#6) - Multi-model task execution system (#7) - N8N workflow integration (#8) - Hive-Bzzz P2P bridge (#9) - Peer assistance protocol (#10) Each issue includes detailed specifications, acceptance criteria, technical implementation notes, and dependency mapping. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
201
frontend/node_modules/unplugin/dist/index.d.mts
generated
vendored
Normal file
201
frontend/node_modules/unplugin/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
import * as _farmfe_core from '@farmfe/core';
|
||||
import { JsPlugin, CompilationContext } from '@farmfe/core';
|
||||
import * as _rspack_core_dist_config_types from '@rspack/core/dist/config/types';
|
||||
import * as webpack from 'webpack';
|
||||
import { Compiler, Compilation, LoaderContext, WebpackPluginInstance } from 'webpack';
|
||||
export { Compiler as WebpackCompiler, WebpackPluginInstance } from 'webpack';
|
||||
import * as rolldown_dist_types_plugin from 'rolldown/dist/types/plugin';
|
||||
import * as vite from 'vite';
|
||||
import { Plugin as Plugin$1 } from 'vite';
|
||||
export { Plugin as VitePlugin } from 'vite';
|
||||
import * as rollup from 'rollup';
|
||||
import { SourceMapInput, EmittedAsset, AstNode, Plugin, PluginContextMeta } from 'rollup';
|
||||
export { Plugin as RollupPlugin } from 'rollup';
|
||||
import { Compiler as Compiler$1, Compilation as Compilation$1, LoaderContext as LoaderContext$1, RspackPluginInstance } from '@rspack/core';
|
||||
export { Compiler as RspackCompiler, RspackPluginInstance } from '@rspack/core';
|
||||
import * as esbuild from 'esbuild';
|
||||
import { PluginBuild, OnLoadResult, Loader, BuildOptions, Plugin as Plugin$3 } from 'esbuild';
|
||||
export { Plugin as EsbuildPlugin } from 'esbuild';
|
||||
import { Plugin as Plugin$2 } from 'rolldown';
|
||||
export { Plugin as RolldownPlugin } from 'rolldown';
|
||||
import VirtualModulesPlugin from 'webpack-virtual-modules';
|
||||
|
||||
interface OnTransformOptions {
|
||||
filter: RegExp;
|
||||
namespace?: string;
|
||||
}
|
||||
interface OnTransformArgs {
|
||||
getContents: () => Promise<string>;
|
||||
path: string;
|
||||
namespace: string;
|
||||
suffix: string;
|
||||
pluginData: any;
|
||||
with: Record<string, string>;
|
||||
}
|
||||
type OnTransformCallback = (args: OnTransformArgs) => (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>);
|
||||
interface EsbuildPluginBuild extends PluginBuild {
|
||||
onTransform: (options: OnTransformOptions, callback: OnTransformCallback) => void;
|
||||
}
|
||||
|
||||
type Thenable<T> = T | Promise<T>;
|
||||
interface SourceMapCompact {
|
||||
file?: string;
|
||||
mappings: string;
|
||||
names: string[];
|
||||
sourceRoot?: string;
|
||||
sources: string[];
|
||||
sourcesContent?: (string | null)[];
|
||||
version: number;
|
||||
}
|
||||
interface JsPluginExtended extends JsPlugin {
|
||||
[key: string]: any;
|
||||
}
|
||||
type TransformResult = string | {
|
||||
code: string;
|
||||
map?: SourceMapInput | SourceMapCompact | null;
|
||||
} | null | undefined | void;
|
||||
interface ExternalIdResult {
|
||||
id: string;
|
||||
external?: boolean;
|
||||
}
|
||||
type NativeBuildContext = {
|
||||
framework: 'webpack';
|
||||
compiler: Compiler;
|
||||
compilation?: Compilation;
|
||||
loaderContext?: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>;
|
||||
} | {
|
||||
framework: 'esbuild';
|
||||
build: EsbuildPluginBuild;
|
||||
} | {
|
||||
framework: 'rspack';
|
||||
compiler: Compiler$1;
|
||||
compilation: Compilation$1;
|
||||
loaderContext?: LoaderContext$1;
|
||||
} | {
|
||||
framework: 'farm';
|
||||
context: CompilationContext;
|
||||
};
|
||||
interface UnpluginBuildContext {
|
||||
addWatchFile: (id: string) => void;
|
||||
emitFile: (emittedFile: EmittedAsset) => void;
|
||||
getWatchFiles: () => string[];
|
||||
parse: (input: string, options?: any) => AstNode;
|
||||
getNativeBuildContext?: () => NativeBuildContext;
|
||||
}
|
||||
interface UnpluginOptions {
|
||||
name: string;
|
||||
enforce?: 'post' | 'pre' | undefined;
|
||||
buildStart?: (this: UnpluginBuildContext) => Promise<void> | void;
|
||||
buildEnd?: (this: UnpluginBuildContext) => Promise<void> | void;
|
||||
transform?: (this: UnpluginBuildContext & UnpluginContext, code: string, id: string) => Thenable<TransformResult>;
|
||||
load?: (this: UnpluginBuildContext & UnpluginContext, id: string) => Thenable<TransformResult>;
|
||||
resolveId?: (this: UnpluginBuildContext & UnpluginContext, id: string, importer: string | undefined, options: {
|
||||
isEntry: boolean;
|
||||
}) => Thenable<string | ExternalIdResult | null | undefined>;
|
||||
watchChange?: (this: UnpluginBuildContext, id: string, change: {
|
||||
event: 'create' | 'update' | 'delete';
|
||||
}) => void;
|
||||
writeBundle?: (this: void) => Promise<void> | void;
|
||||
/**
|
||||
* Custom predicate function to filter modules to be loaded.
|
||||
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
||||
*/
|
||||
loadInclude?: (id: string) => boolean | null | undefined;
|
||||
/**
|
||||
* Custom predicate function to filter modules to be transformed.
|
||||
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
||||
*/
|
||||
transformInclude?: (id: string) => boolean | null | undefined;
|
||||
rollup?: Partial<Plugin>;
|
||||
webpack?: (compiler: Compiler) => void;
|
||||
rspack?: (compiler: Compiler$1) => void;
|
||||
vite?: Partial<Plugin$1>;
|
||||
rolldown?: Partial<Plugin$2>;
|
||||
esbuild?: {
|
||||
onResolveFilter?: RegExp;
|
||||
onLoadFilter?: RegExp;
|
||||
setup?: (build: PluginBuild) => void | Promise<void>;
|
||||
loader?: Loader | ((code: string, id: string) => Loader);
|
||||
config?: (options: BuildOptions) => void;
|
||||
};
|
||||
farm?: Partial<JsPlugin>;
|
||||
}
|
||||
interface ResolvedUnpluginOptions extends UnpluginOptions {
|
||||
__vfs?: VirtualModulesPlugin;
|
||||
__vfsModules?: Set<string>;
|
||||
__virtualModulePrefix: string;
|
||||
}
|
||||
type UnpluginFactory<UserOptions, Nested extends boolean = boolean> = (options: UserOptions, meta: UnpluginContextMeta) => Nested extends true ? Array<UnpluginOptions> : UnpluginOptions;
|
||||
type UnpluginFactoryOutput<UserOptions, Return> = undefined extends UserOptions ? (options?: UserOptions) => Return : (options: UserOptions) => Return;
|
||||
interface UnpluginInstance<UserOptions, Nested extends boolean = boolean> {
|
||||
rollup: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin> : Plugin>;
|
||||
vite: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin$1> : Plugin$1>;
|
||||
rolldown: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin$2> : Plugin$2>;
|
||||
webpack: UnpluginFactoryOutput<UserOptions, WebpackPluginInstance>;
|
||||
rspack: UnpluginFactoryOutput<UserOptions, RspackPluginInstance>;
|
||||
esbuild: UnpluginFactoryOutput<UserOptions, Plugin$3>;
|
||||
farm: UnpluginFactoryOutput<UserOptions, JsPlugin>;
|
||||
raw: UnpluginFactory<UserOptions, Nested>;
|
||||
}
|
||||
type UnpluginContextMeta = Partial<PluginContextMeta> & ({
|
||||
framework: 'rollup' | 'vite' | 'rolldown' | 'farm';
|
||||
} | {
|
||||
framework: 'webpack';
|
||||
webpack: {
|
||||
compiler: Compiler;
|
||||
};
|
||||
} | {
|
||||
framework: 'esbuild';
|
||||
/** @deprecated {getNativeBuildContext} */
|
||||
build?: EsbuildPluginBuild;
|
||||
/** Set the host plugin name of esbuild when returning multiple plugins */
|
||||
esbuildHostName?: string;
|
||||
} | {
|
||||
framework: 'rspack';
|
||||
rspack: {
|
||||
compiler: Compiler$1;
|
||||
};
|
||||
});
|
||||
interface UnpluginMessage {
|
||||
name?: string;
|
||||
id?: string;
|
||||
message: string;
|
||||
stack?: string;
|
||||
code?: string;
|
||||
plugin?: string;
|
||||
pluginCode?: unknown;
|
||||
loc?: {
|
||||
column: number;
|
||||
file?: string;
|
||||
line: number;
|
||||
};
|
||||
meta?: any;
|
||||
}
|
||||
interface UnpluginContext {
|
||||
error: (message: string | UnpluginMessage) => void;
|
||||
warn: (message: string | UnpluginMessage) => void;
|
||||
}
|
||||
declare module 'webpack' {
|
||||
interface Compiler {
|
||||
$unpluginContext: Record<string, ResolvedUnpluginOptions>;
|
||||
}
|
||||
}
|
||||
declare module '@rspack/core' {
|
||||
interface Compiler {
|
||||
$unpluginContext: Record<string, ResolvedUnpluginOptions>;
|
||||
}
|
||||
}
|
||||
|
||||
declare function createUnplugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions, Nested>;
|
||||
declare function createEsbuildPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, esbuild.Plugin>;
|
||||
declare function createRollupPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? rollup.Plugin<any>[] : rollup.Plugin<any>>;
|
||||
declare function createVitePlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? vite.Plugin<any>[] : vite.Plugin<any>>;
|
||||
/** @experimental do not use it in production */
|
||||
declare function createRolldownPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? rolldown_dist_types_plugin.Plugin<any>[] : rolldown_dist_types_plugin.Plugin<any>>;
|
||||
declare function createWebpackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, webpack.WebpackPluginInstance>;
|
||||
declare function createRspackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, _rspack_core_dist_config_types.RspackPluginInstance>;
|
||||
declare function createFarmPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, _farmfe_core.JsPlugin>;
|
||||
|
||||
export { type ExternalIdResult, type JsPluginExtended, type NativeBuildContext, type ResolvedUnpluginOptions, type SourceMapCompact, type Thenable, type TransformResult, type UnpluginBuildContext, type UnpluginContext, type UnpluginContextMeta, type UnpluginFactory, type UnpluginFactoryOutput, type UnpluginInstance, type UnpluginMessage, type UnpluginOptions, createEsbuildPlugin, createFarmPlugin, createRolldownPlugin, createRollupPlugin, createRspackPlugin, createUnplugin, createVitePlugin, createWebpackPlugin };
|
||||
201
frontend/node_modules/unplugin/dist/index.d.ts
generated
vendored
Normal file
201
frontend/node_modules/unplugin/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
import * as _farmfe_core from '@farmfe/core';
|
||||
import { JsPlugin, CompilationContext } from '@farmfe/core';
|
||||
import * as _rspack_core_dist_config_types from '@rspack/core/dist/config/types';
|
||||
import * as webpack from 'webpack';
|
||||
import { Compiler, Compilation, LoaderContext, WebpackPluginInstance } from 'webpack';
|
||||
export { Compiler as WebpackCompiler, WebpackPluginInstance } from 'webpack';
|
||||
import * as rolldown_dist_types_plugin from 'rolldown/dist/types/plugin';
|
||||
import * as vite from 'vite';
|
||||
import { Plugin as Plugin$1 } from 'vite';
|
||||
export { Plugin as VitePlugin } from 'vite';
|
||||
import * as rollup from 'rollup';
|
||||
import { SourceMapInput, EmittedAsset, AstNode, Plugin, PluginContextMeta } from 'rollup';
|
||||
export { Plugin as RollupPlugin } from 'rollup';
|
||||
import { Compiler as Compiler$1, Compilation as Compilation$1, LoaderContext as LoaderContext$1, RspackPluginInstance } from '@rspack/core';
|
||||
export { Compiler as RspackCompiler, RspackPluginInstance } from '@rspack/core';
|
||||
import * as esbuild from 'esbuild';
|
||||
import { PluginBuild, OnLoadResult, Loader, BuildOptions, Plugin as Plugin$3 } from 'esbuild';
|
||||
export { Plugin as EsbuildPlugin } from 'esbuild';
|
||||
import { Plugin as Plugin$2 } from 'rolldown';
|
||||
export { Plugin as RolldownPlugin } from 'rolldown';
|
||||
import VirtualModulesPlugin from 'webpack-virtual-modules';
|
||||
|
||||
interface OnTransformOptions {
|
||||
filter: RegExp;
|
||||
namespace?: string;
|
||||
}
|
||||
interface OnTransformArgs {
|
||||
getContents: () => Promise<string>;
|
||||
path: string;
|
||||
namespace: string;
|
||||
suffix: string;
|
||||
pluginData: any;
|
||||
with: Record<string, string>;
|
||||
}
|
||||
type OnTransformCallback = (args: OnTransformArgs) => (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>);
|
||||
interface EsbuildPluginBuild extends PluginBuild {
|
||||
onTransform: (options: OnTransformOptions, callback: OnTransformCallback) => void;
|
||||
}
|
||||
|
||||
type Thenable<T> = T | Promise<T>;
|
||||
interface SourceMapCompact {
|
||||
file?: string;
|
||||
mappings: string;
|
||||
names: string[];
|
||||
sourceRoot?: string;
|
||||
sources: string[];
|
||||
sourcesContent?: (string | null)[];
|
||||
version: number;
|
||||
}
|
||||
interface JsPluginExtended extends JsPlugin {
|
||||
[key: string]: any;
|
||||
}
|
||||
type TransformResult = string | {
|
||||
code: string;
|
||||
map?: SourceMapInput | SourceMapCompact | null;
|
||||
} | null | undefined | void;
|
||||
interface ExternalIdResult {
|
||||
id: string;
|
||||
external?: boolean;
|
||||
}
|
||||
type NativeBuildContext = {
|
||||
framework: 'webpack';
|
||||
compiler: Compiler;
|
||||
compilation?: Compilation;
|
||||
loaderContext?: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>;
|
||||
} | {
|
||||
framework: 'esbuild';
|
||||
build: EsbuildPluginBuild;
|
||||
} | {
|
||||
framework: 'rspack';
|
||||
compiler: Compiler$1;
|
||||
compilation: Compilation$1;
|
||||
loaderContext?: LoaderContext$1;
|
||||
} | {
|
||||
framework: 'farm';
|
||||
context: CompilationContext;
|
||||
};
|
||||
interface UnpluginBuildContext {
|
||||
addWatchFile: (id: string) => void;
|
||||
emitFile: (emittedFile: EmittedAsset) => void;
|
||||
getWatchFiles: () => string[];
|
||||
parse: (input: string, options?: any) => AstNode;
|
||||
getNativeBuildContext?: () => NativeBuildContext;
|
||||
}
|
||||
interface UnpluginOptions {
|
||||
name: string;
|
||||
enforce?: 'post' | 'pre' | undefined;
|
||||
buildStart?: (this: UnpluginBuildContext) => Promise<void> | void;
|
||||
buildEnd?: (this: UnpluginBuildContext) => Promise<void> | void;
|
||||
transform?: (this: UnpluginBuildContext & UnpluginContext, code: string, id: string) => Thenable<TransformResult>;
|
||||
load?: (this: UnpluginBuildContext & UnpluginContext, id: string) => Thenable<TransformResult>;
|
||||
resolveId?: (this: UnpluginBuildContext & UnpluginContext, id: string, importer: string | undefined, options: {
|
||||
isEntry: boolean;
|
||||
}) => Thenable<string | ExternalIdResult | null | undefined>;
|
||||
watchChange?: (this: UnpluginBuildContext, id: string, change: {
|
||||
event: 'create' | 'update' | 'delete';
|
||||
}) => void;
|
||||
writeBundle?: (this: void) => Promise<void> | void;
|
||||
/**
|
||||
* Custom predicate function to filter modules to be loaded.
|
||||
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
||||
*/
|
||||
loadInclude?: (id: string) => boolean | null | undefined;
|
||||
/**
|
||||
* Custom predicate function to filter modules to be transformed.
|
||||
* When omitted, all modules will be included (might have potential perf impact on Webpack).
|
||||
*/
|
||||
transformInclude?: (id: string) => boolean | null | undefined;
|
||||
rollup?: Partial<Plugin>;
|
||||
webpack?: (compiler: Compiler) => void;
|
||||
rspack?: (compiler: Compiler$1) => void;
|
||||
vite?: Partial<Plugin$1>;
|
||||
rolldown?: Partial<Plugin$2>;
|
||||
esbuild?: {
|
||||
onResolveFilter?: RegExp;
|
||||
onLoadFilter?: RegExp;
|
||||
setup?: (build: PluginBuild) => void | Promise<void>;
|
||||
loader?: Loader | ((code: string, id: string) => Loader);
|
||||
config?: (options: BuildOptions) => void;
|
||||
};
|
||||
farm?: Partial<JsPlugin>;
|
||||
}
|
||||
interface ResolvedUnpluginOptions extends UnpluginOptions {
|
||||
__vfs?: VirtualModulesPlugin;
|
||||
__vfsModules?: Set<string>;
|
||||
__virtualModulePrefix: string;
|
||||
}
|
||||
type UnpluginFactory<UserOptions, Nested extends boolean = boolean> = (options: UserOptions, meta: UnpluginContextMeta) => Nested extends true ? Array<UnpluginOptions> : UnpluginOptions;
|
||||
type UnpluginFactoryOutput<UserOptions, Return> = undefined extends UserOptions ? (options?: UserOptions) => Return : (options: UserOptions) => Return;
|
||||
interface UnpluginInstance<UserOptions, Nested extends boolean = boolean> {
|
||||
rollup: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin> : Plugin>;
|
||||
vite: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin$1> : Plugin$1>;
|
||||
rolldown: UnpluginFactoryOutput<UserOptions, Nested extends true ? Array<Plugin$2> : Plugin$2>;
|
||||
webpack: UnpluginFactoryOutput<UserOptions, WebpackPluginInstance>;
|
||||
rspack: UnpluginFactoryOutput<UserOptions, RspackPluginInstance>;
|
||||
esbuild: UnpluginFactoryOutput<UserOptions, Plugin$3>;
|
||||
farm: UnpluginFactoryOutput<UserOptions, JsPlugin>;
|
||||
raw: UnpluginFactory<UserOptions, Nested>;
|
||||
}
|
||||
type UnpluginContextMeta = Partial<PluginContextMeta> & ({
|
||||
framework: 'rollup' | 'vite' | 'rolldown' | 'farm';
|
||||
} | {
|
||||
framework: 'webpack';
|
||||
webpack: {
|
||||
compiler: Compiler;
|
||||
};
|
||||
} | {
|
||||
framework: 'esbuild';
|
||||
/** @deprecated {getNativeBuildContext} */
|
||||
build?: EsbuildPluginBuild;
|
||||
/** Set the host plugin name of esbuild when returning multiple plugins */
|
||||
esbuildHostName?: string;
|
||||
} | {
|
||||
framework: 'rspack';
|
||||
rspack: {
|
||||
compiler: Compiler$1;
|
||||
};
|
||||
});
|
||||
interface UnpluginMessage {
|
||||
name?: string;
|
||||
id?: string;
|
||||
message: string;
|
||||
stack?: string;
|
||||
code?: string;
|
||||
plugin?: string;
|
||||
pluginCode?: unknown;
|
||||
loc?: {
|
||||
column: number;
|
||||
file?: string;
|
||||
line: number;
|
||||
};
|
||||
meta?: any;
|
||||
}
|
||||
interface UnpluginContext {
|
||||
error: (message: string | UnpluginMessage) => void;
|
||||
warn: (message: string | UnpluginMessage) => void;
|
||||
}
|
||||
declare module 'webpack' {
|
||||
interface Compiler {
|
||||
$unpluginContext: Record<string, ResolvedUnpluginOptions>;
|
||||
}
|
||||
}
|
||||
declare module '@rspack/core' {
|
||||
interface Compiler {
|
||||
$unpluginContext: Record<string, ResolvedUnpluginOptions>;
|
||||
}
|
||||
}
|
||||
|
||||
declare function createUnplugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginInstance<UserOptions, Nested>;
|
||||
declare function createEsbuildPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, esbuild.Plugin>;
|
||||
declare function createRollupPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? rollup.Plugin<any>[] : rollup.Plugin<any>>;
|
||||
declare function createVitePlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? vite.Plugin<any>[] : vite.Plugin<any>>;
|
||||
/** @experimental do not use it in production */
|
||||
declare function createRolldownPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, Nested extends true ? rolldown_dist_types_plugin.Plugin<any>[] : rolldown_dist_types_plugin.Plugin<any>>;
|
||||
declare function createWebpackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, webpack.WebpackPluginInstance>;
|
||||
declare function createRspackPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, _rspack_core_dist_config_types.RspackPluginInstance>;
|
||||
declare function createFarmPlugin<UserOptions, Nested extends boolean = boolean>(factory: UnpluginFactory<UserOptions, Nested>): UnpluginFactoryOutput<UserOptions, _farmfe_core.JsPlugin>;
|
||||
|
||||
export { type ExternalIdResult, type JsPluginExtended, type NativeBuildContext, type ResolvedUnpluginOptions, type SourceMapCompact, type Thenable, type TransformResult, type UnpluginBuildContext, type UnpluginContext, type UnpluginContextMeta, type UnpluginFactory, type UnpluginFactoryOutput, type UnpluginInstance, type UnpluginMessage, type UnpluginOptions, createEsbuildPlugin, createFarmPlugin, createRolldownPlugin, createRollupPlugin, createRspackPlugin, createUnplugin, createVitePlugin, createWebpackPlugin };
|
||||
2146
frontend/node_modules/unplugin/dist/index.js
generated
vendored
Normal file
2146
frontend/node_modules/unplugin/dist/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2116
frontend/node_modules/unplugin/dist/index.mjs
generated
vendored
Normal file
2116
frontend/node_modules/unplugin/dist/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
frontend/node_modules/unplugin/dist/rspack/loaders/load.d.mts
generated
vendored
Normal file
5
frontend/node_modules/unplugin/dist/rspack/loaders/load.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { LoaderContext } from '@rspack/core';
|
||||
|
||||
declare function load(this: LoaderContext, source: string, map: any): Promise<void>;
|
||||
|
||||
export { load as default };
|
||||
5
frontend/node_modules/unplugin/dist/rspack/loaders/load.d.ts
generated
vendored
Normal file
5
frontend/node_modules/unplugin/dist/rspack/loaders/load.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { LoaderContext } from '@rspack/core';
|
||||
|
||||
declare function load(this: LoaderContext, source: string, map: any): Promise<void>;
|
||||
|
||||
export { load as default };
|
||||
128
frontend/node_modules/unplugin/dist/rspack/loaders/load.js
generated
vendored
Normal file
128
frontend/node_modules/unplugin/dist/rspack/loaders/load.js
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/rspack/loaders/load.ts
|
||||
var load_exports = {};
|
||||
__export(load_exports, {
|
||||
default: () => load
|
||||
});
|
||||
module.exports = __toCommonJS(load_exports);
|
||||
|
||||
// src/utils.ts
|
||||
var import_path = require("path");
|
||||
function normalizeAbsolutePath(path) {
|
||||
if ((0, import_path.isAbsolute)(path))
|
||||
return (0, import_path.normalize)(path);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
|
||||
// src/rspack/context.ts
|
||||
var import_buffer = require("buffer");
|
||||
var import_path2 = require("path");
|
||||
var import_acorn = require("acorn");
|
||||
function createBuildContext(compiler, compilation, loaderContext) {
|
||||
return {
|
||||
getNativeBuildContext() {
|
||||
return {
|
||||
framework: "rspack",
|
||||
compiler,
|
||||
compilation,
|
||||
loaderContext
|
||||
};
|
||||
},
|
||||
addWatchFile(file) {
|
||||
compilation.fileDependencies.add((0, import_path2.resolve)(process.cwd(), file));
|
||||
},
|
||||
getWatchFiles() {
|
||||
return Array.from(compilation.fileDependencies);
|
||||
},
|
||||
parse(code, opts = {}) {
|
||||
return import_acorn.Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
const { sources } = compilation.compiler.webpack;
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
new sources.RawSource(
|
||||
typeof emittedFile.source === "string" ? emittedFile.source : import_buffer.Buffer.from(emittedFile.source)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/rspack/utils.ts
|
||||
var import_path3 = require("path");
|
||||
function decodeVirtualModuleId(encoded, _plugin) {
|
||||
return decodeURIComponent((0, import_path3.basename)(encoded));
|
||||
}
|
||||
function isVirtualModuleId(encoded, plugin) {
|
||||
return (0, import_path3.dirname)(encoded) === plugin.__virtualModulePrefix;
|
||||
}
|
||||
|
||||
// src/rspack/loaders/load.ts
|
||||
async function load(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const { unpluginName } = this.query;
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
let id = this.resource;
|
||||
if (!(plugin == null ? void 0 : plugin.load) || !id)
|
||||
return callback(null, source, map);
|
||||
if (isVirtualModuleId(id, plugin))
|
||||
id = decodeVirtualModuleId(id, plugin);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.load.call(
|
||||
Object.assign(
|
||||
{},
|
||||
this._compilation && createBuildContext(this._compiler, this._compilation, this),
|
||||
context
|
||||
),
|
||||
normalizeAbsolutePath(id)
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, res.map ?? map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
105
frontend/node_modules/unplugin/dist/rspack/loaders/load.mjs
generated
vendored
Normal file
105
frontend/node_modules/unplugin/dist/rspack/loaders/load.mjs
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
// src/utils.ts
|
||||
import { isAbsolute, normalize } from "path";
|
||||
function normalizeAbsolutePath(path) {
|
||||
if (isAbsolute(path))
|
||||
return normalize(path);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
|
||||
// src/rspack/context.ts
|
||||
import { Buffer } from "buffer";
|
||||
import { resolve } from "path";
|
||||
import { Parser } from "acorn";
|
||||
function createBuildContext(compiler, compilation, loaderContext) {
|
||||
return {
|
||||
getNativeBuildContext() {
|
||||
return {
|
||||
framework: "rspack",
|
||||
compiler,
|
||||
compilation,
|
||||
loaderContext
|
||||
};
|
||||
},
|
||||
addWatchFile(file) {
|
||||
compilation.fileDependencies.add(resolve(process.cwd(), file));
|
||||
},
|
||||
getWatchFiles() {
|
||||
return Array.from(compilation.fileDependencies);
|
||||
},
|
||||
parse(code, opts = {}) {
|
||||
return Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
const { sources } = compilation.compiler.webpack;
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
new sources.RawSource(
|
||||
typeof emittedFile.source === "string" ? emittedFile.source : Buffer.from(emittedFile.source)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/rspack/utils.ts
|
||||
import { basename, dirname, resolve as resolve2 } from "path";
|
||||
function decodeVirtualModuleId(encoded, _plugin) {
|
||||
return decodeURIComponent(basename(encoded));
|
||||
}
|
||||
function isVirtualModuleId(encoded, plugin) {
|
||||
return dirname(encoded) === plugin.__virtualModulePrefix;
|
||||
}
|
||||
|
||||
// src/rspack/loaders/load.ts
|
||||
async function load(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const { unpluginName } = this.query;
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
let id = this.resource;
|
||||
if (!(plugin == null ? void 0 : plugin.load) || !id)
|
||||
return callback(null, source, map);
|
||||
if (isVirtualModuleId(id, plugin))
|
||||
id = decodeVirtualModuleId(id, plugin);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.load.call(
|
||||
Object.assign(
|
||||
{},
|
||||
this._compilation && createBuildContext(this._compiler, this._compilation, this),
|
||||
context
|
||||
),
|
||||
normalizeAbsolutePath(id)
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, res.map ?? map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
export {
|
||||
load as default
|
||||
};
|
||||
5
frontend/node_modules/unplugin/dist/rspack/loaders/transform.d.mts
generated
vendored
Normal file
5
frontend/node_modules/unplugin/dist/rspack/loaders/transform.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { LoaderContext } from '@rspack/core';
|
||||
|
||||
declare function transform(this: LoaderContext, source: string, map: any): Promise<void>;
|
||||
|
||||
export { transform as default };
|
||||
5
frontend/node_modules/unplugin/dist/rspack/loaders/transform.d.ts
generated
vendored
Normal file
5
frontend/node_modules/unplugin/dist/rspack/loaders/transform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { LoaderContext } from '@rspack/core';
|
||||
|
||||
declare function transform(this: LoaderContext, source: string, map: any): Promise<void>;
|
||||
|
||||
export { transform as default };
|
||||
114
frontend/node_modules/unplugin/dist/rspack/loaders/transform.js
generated
vendored
Normal file
114
frontend/node_modules/unplugin/dist/rspack/loaders/transform.js
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/rspack/loaders/transform.ts
|
||||
var transform_exports = {};
|
||||
__export(transform_exports, {
|
||||
default: () => transform
|
||||
});
|
||||
module.exports = __toCommonJS(transform_exports);
|
||||
|
||||
// src/rspack/context.ts
|
||||
var import_buffer = require("buffer");
|
||||
var import_path = require("path");
|
||||
var import_acorn = require("acorn");
|
||||
function createBuildContext(compiler, compilation, loaderContext) {
|
||||
return {
|
||||
getNativeBuildContext() {
|
||||
return {
|
||||
framework: "rspack",
|
||||
compiler,
|
||||
compilation,
|
||||
loaderContext
|
||||
};
|
||||
},
|
||||
addWatchFile(file) {
|
||||
compilation.fileDependencies.add((0, import_path.resolve)(process.cwd(), file));
|
||||
},
|
||||
getWatchFiles() {
|
||||
return Array.from(compilation.fileDependencies);
|
||||
},
|
||||
parse(code, opts = {}) {
|
||||
return import_acorn.Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
const { sources } = compilation.compiler.webpack;
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
new sources.RawSource(
|
||||
typeof emittedFile.source === "string" ? emittedFile.source : import_buffer.Buffer.from(emittedFile.source)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/rspack/loaders/transform.ts
|
||||
async function transform(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
let unpluginName;
|
||||
if (typeof this.query === "string") {
|
||||
const query = new URLSearchParams(this.query);
|
||||
unpluginName = query.get("unpluginName");
|
||||
} else {
|
||||
unpluginName = this.query.unpluginName;
|
||||
}
|
||||
const id = this.resource;
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
if (!(plugin == null ? void 0 : plugin.transform))
|
||||
return callback(null, source, map);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.transform.call(
|
||||
Object.assign(
|
||||
{},
|
||||
this._compilation && createBuildContext(this._compiler, this._compilation, this),
|
||||
context
|
||||
),
|
||||
source,
|
||||
id
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, map == null ? map : res.map || map);
|
||||
else callback(null, res, map);
|
||||
}
|
||||
91
frontend/node_modules/unplugin/dist/rspack/loaders/transform.mjs
generated
vendored
Normal file
91
frontend/node_modules/unplugin/dist/rspack/loaders/transform.mjs
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
// src/rspack/context.ts
|
||||
import { Buffer } from "buffer";
|
||||
import { resolve } from "path";
|
||||
import { Parser } from "acorn";
|
||||
function createBuildContext(compiler, compilation, loaderContext) {
|
||||
return {
|
||||
getNativeBuildContext() {
|
||||
return {
|
||||
framework: "rspack",
|
||||
compiler,
|
||||
compilation,
|
||||
loaderContext
|
||||
};
|
||||
},
|
||||
addWatchFile(file) {
|
||||
compilation.fileDependencies.add(resolve(process.cwd(), file));
|
||||
},
|
||||
getWatchFiles() {
|
||||
return Array.from(compilation.fileDependencies);
|
||||
},
|
||||
parse(code, opts = {}) {
|
||||
return Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
const { sources } = compilation.compiler.webpack;
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
new sources.RawSource(
|
||||
typeof emittedFile.source === "string" ? emittedFile.source : Buffer.from(emittedFile.source)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/rspack/loaders/transform.ts
|
||||
async function transform(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
let unpluginName;
|
||||
if (typeof this.query === "string") {
|
||||
const query = new URLSearchParams(this.query);
|
||||
unpluginName = query.get("unpluginName");
|
||||
} else {
|
||||
unpluginName = this.query.unpluginName;
|
||||
}
|
||||
const id = this.resource;
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
if (!(plugin == null ? void 0 : plugin.transform))
|
||||
return callback(null, source, map);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.transform.call(
|
||||
Object.assign(
|
||||
{},
|
||||
this._compilation && createBuildContext(this._compiler, this._compilation, this),
|
||||
context
|
||||
),
|
||||
source,
|
||||
id
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, map == null ? map : res.map || map);
|
||||
else callback(null, res, map);
|
||||
}
|
||||
export {
|
||||
transform as default
|
||||
};
|
||||
7
frontend/node_modules/unplugin/dist/webpack/loaders/load.d.mts
generated
vendored
Normal file
7
frontend/node_modules/unplugin/dist/webpack/loaders/load.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { LoaderContext } from 'webpack';
|
||||
|
||||
declare function load(this: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>, source: string, map: any): Promise<void>;
|
||||
|
||||
export { load as default };
|
||||
7
frontend/node_modules/unplugin/dist/webpack/loaders/load.d.ts
generated
vendored
Normal file
7
frontend/node_modules/unplugin/dist/webpack/loaders/load.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { LoaderContext } from 'webpack';
|
||||
|
||||
declare function load(this: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>, source: string, map: any): Promise<void>;
|
||||
|
||||
export { load as default };
|
||||
142
frontend/node_modules/unplugin/dist/webpack/loaders/load.js
generated
vendored
Normal file
142
frontend/node_modules/unplugin/dist/webpack/loaders/load.js
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/webpack/loaders/load.ts
|
||||
var load_exports = {};
|
||||
__export(load_exports, {
|
||||
default: () => load
|
||||
});
|
||||
module.exports = __toCommonJS(load_exports);
|
||||
|
||||
// src/utils.ts
|
||||
var import_path = require("path");
|
||||
function normalizeAbsolutePath(path) {
|
||||
if ((0, import_path.isAbsolute)(path))
|
||||
return (0, import_path.normalize)(path);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
function resolveQuery(query) {
|
||||
if (typeof query === "string") {
|
||||
return new URLSearchParams(query).get("unpluginName");
|
||||
} else {
|
||||
return query.unpluginName;
|
||||
}
|
||||
}
|
||||
|
||||
// src/webpack/context.ts
|
||||
var import_buffer = require("buffer");
|
||||
var import_module = require("module");
|
||||
var import_path2 = require("path");
|
||||
var import_process = __toESM(require("process"));
|
||||
var import_acorn = require("acorn");
|
||||
function getSource(fileSource) {
|
||||
const webpackRequire = (0, import_module.createRequire)(require.resolve("webpack"));
|
||||
const RawSource = webpackRequire("webpack-sources").RawSource;
|
||||
return new RawSource(
|
||||
typeof fileSource === "string" ? fileSource : import_buffer.Buffer.from(fileSource.buffer).toString("utf-8")
|
||||
);
|
||||
}
|
||||
function createBuildContext(options, compiler, compilation, loaderContext) {
|
||||
return {
|
||||
parse(code, opts = {}) {
|
||||
return import_acorn.Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
addWatchFile(id) {
|
||||
options.addWatchFile((0, import_path2.resolve)(import_process.default.cwd(), id));
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
if (!compilation)
|
||||
throw new Error("unplugin/webpack: emitFile outside supported hooks (buildStart, buildEnd, load, transform, watchChange)");
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
getSource(emittedFile.source)
|
||||
);
|
||||
}
|
||||
},
|
||||
getWatchFiles() {
|
||||
return options.getWatchFiles();
|
||||
},
|
||||
getNativeBuildContext() {
|
||||
return { framework: "webpack", compiler, compilation, loaderContext };
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/webpack/loaders/load.ts
|
||||
async function load(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const unpluginName = resolveQuery(this.query);
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
let id = this.resource;
|
||||
if (!(plugin == null ? void 0 : plugin.load) || !id)
|
||||
return callback(null, source, map);
|
||||
if (id.startsWith(plugin.__virtualModulePrefix))
|
||||
id = decodeURIComponent(id.slice(plugin.__virtualModulePrefix.length));
|
||||
const context = createContext(this);
|
||||
const res = await plugin.load.call(
|
||||
Object.assign({}, createBuildContext({
|
||||
addWatchFile: (file) => {
|
||||
this.addDependency(file);
|
||||
},
|
||||
getWatchFiles: () => {
|
||||
return this.getDependencies();
|
||||
}
|
||||
}, this._compiler, this._compilation, this), context),
|
||||
normalizeAbsolutePath(id)
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, res.map ?? map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
116
frontend/node_modules/unplugin/dist/webpack/loaders/load.mjs
generated
vendored
Normal file
116
frontend/node_modules/unplugin/dist/webpack/loaders/load.mjs
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
||||
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
||||
}) : x)(function(x) {
|
||||
if (typeof require !== "undefined") return require.apply(this, arguments);
|
||||
throw Error('Dynamic require of "' + x + '" is not supported');
|
||||
});
|
||||
|
||||
// src/utils.ts
|
||||
import { isAbsolute, normalize } from "path";
|
||||
function normalizeAbsolutePath(path) {
|
||||
if (isAbsolute(path))
|
||||
return normalize(path);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
function resolveQuery(query) {
|
||||
if (typeof query === "string") {
|
||||
return new URLSearchParams(query).get("unpluginName");
|
||||
} else {
|
||||
return query.unpluginName;
|
||||
}
|
||||
}
|
||||
|
||||
// src/webpack/context.ts
|
||||
import { Buffer as Buffer2 } from "buffer";
|
||||
import { createRequire } from "module";
|
||||
import { resolve } from "path";
|
||||
import process from "process";
|
||||
import { Parser } from "acorn";
|
||||
function getSource(fileSource) {
|
||||
const webpackRequire = createRequire(__require.resolve("webpack"));
|
||||
const RawSource = webpackRequire("webpack-sources").RawSource;
|
||||
return new RawSource(
|
||||
typeof fileSource === "string" ? fileSource : Buffer2.from(fileSource.buffer).toString("utf-8")
|
||||
);
|
||||
}
|
||||
function createBuildContext(options, compiler, compilation, loaderContext) {
|
||||
return {
|
||||
parse(code, opts = {}) {
|
||||
return Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
addWatchFile(id) {
|
||||
options.addWatchFile(resolve(process.cwd(), id));
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
if (!compilation)
|
||||
throw new Error("unplugin/webpack: emitFile outside supported hooks (buildStart, buildEnd, load, transform, watchChange)");
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
getSource(emittedFile.source)
|
||||
);
|
||||
}
|
||||
},
|
||||
getWatchFiles() {
|
||||
return options.getWatchFiles();
|
||||
},
|
||||
getNativeBuildContext() {
|
||||
return { framework: "webpack", compiler, compilation, loaderContext };
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/webpack/loaders/load.ts
|
||||
async function load(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const unpluginName = resolveQuery(this.query);
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
let id = this.resource;
|
||||
if (!(plugin == null ? void 0 : plugin.load) || !id)
|
||||
return callback(null, source, map);
|
||||
if (id.startsWith(plugin.__virtualModulePrefix))
|
||||
id = decodeURIComponent(id.slice(plugin.__virtualModulePrefix.length));
|
||||
const context = createContext(this);
|
||||
const res = await plugin.load.call(
|
||||
Object.assign({}, createBuildContext({
|
||||
addWatchFile: (file) => {
|
||||
this.addDependency(file);
|
||||
},
|
||||
getWatchFiles: () => {
|
||||
return this.getDependencies();
|
||||
}
|
||||
}, this._compiler, this._compilation, this), context),
|
||||
normalizeAbsolutePath(id)
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, res.map ?? map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
export {
|
||||
load as default
|
||||
};
|
||||
7
frontend/node_modules/unplugin/dist/webpack/loaders/transform.d.mts
generated
vendored
Normal file
7
frontend/node_modules/unplugin/dist/webpack/loaders/transform.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { LoaderContext } from 'webpack';
|
||||
|
||||
declare function transform(this: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>, source: string, map: any): Promise<void>;
|
||||
|
||||
export { transform as default };
|
||||
7
frontend/node_modules/unplugin/dist/webpack/loaders/transform.d.ts
generated
vendored
Normal file
7
frontend/node_modules/unplugin/dist/webpack/loaders/transform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { LoaderContext } from 'webpack';
|
||||
|
||||
declare function transform(this: LoaderContext<{
|
||||
unpluginName: string;
|
||||
}>, source: string, map: any): Promise<void>;
|
||||
|
||||
export { transform as default };
|
||||
133
frontend/node_modules/unplugin/dist/webpack/loaders/transform.js
generated
vendored
Normal file
133
frontend/node_modules/unplugin/dist/webpack/loaders/transform.js
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/webpack/loaders/transform.ts
|
||||
var transform_exports = {};
|
||||
__export(transform_exports, {
|
||||
default: () => transform
|
||||
});
|
||||
module.exports = __toCommonJS(transform_exports);
|
||||
|
||||
// src/utils.ts
|
||||
function resolveQuery(query) {
|
||||
if (typeof query === "string") {
|
||||
return new URLSearchParams(query).get("unpluginName");
|
||||
} else {
|
||||
return query.unpluginName;
|
||||
}
|
||||
}
|
||||
|
||||
// src/webpack/context.ts
|
||||
var import_buffer = require("buffer");
|
||||
var import_module = require("module");
|
||||
var import_path = require("path");
|
||||
var import_process = __toESM(require("process"));
|
||||
var import_acorn = require("acorn");
|
||||
function getSource(fileSource) {
|
||||
const webpackRequire = (0, import_module.createRequire)(require.resolve("webpack"));
|
||||
const RawSource = webpackRequire("webpack-sources").RawSource;
|
||||
return new RawSource(
|
||||
typeof fileSource === "string" ? fileSource : import_buffer.Buffer.from(fileSource.buffer).toString("utf-8")
|
||||
);
|
||||
}
|
||||
function createBuildContext(options, compiler, compilation, loaderContext) {
|
||||
return {
|
||||
parse(code, opts = {}) {
|
||||
return import_acorn.Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
addWatchFile(id) {
|
||||
options.addWatchFile((0, import_path.resolve)(import_process.default.cwd(), id));
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
if (!compilation)
|
||||
throw new Error("unplugin/webpack: emitFile outside supported hooks (buildStart, buildEnd, load, transform, watchChange)");
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
getSource(emittedFile.source)
|
||||
);
|
||||
}
|
||||
},
|
||||
getWatchFiles() {
|
||||
return options.getWatchFiles();
|
||||
},
|
||||
getNativeBuildContext() {
|
||||
return { framework: "webpack", compiler, compilation, loaderContext };
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/webpack/loaders/transform.ts
|
||||
async function transform(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const unpluginName = resolveQuery(this.query);
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
if (!(plugin == null ? void 0 : plugin.transform))
|
||||
return callback(null, source, map);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.transform.call(
|
||||
Object.assign({}, createBuildContext({
|
||||
addWatchFile: (file) => {
|
||||
this.addDependency(file);
|
||||
},
|
||||
getWatchFiles: () => {
|
||||
return this.getDependencies();
|
||||
}
|
||||
}, this._compiler, this._compilation, this), context),
|
||||
source,
|
||||
this.resource
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, map == null ? map : res.map || map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
107
frontend/node_modules/unplugin/dist/webpack/loaders/transform.mjs
generated
vendored
Normal file
107
frontend/node_modules/unplugin/dist/webpack/loaders/transform.mjs
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
||||
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
||||
}) : x)(function(x) {
|
||||
if (typeof require !== "undefined") return require.apply(this, arguments);
|
||||
throw Error('Dynamic require of "' + x + '" is not supported');
|
||||
});
|
||||
|
||||
// src/utils.ts
|
||||
function resolveQuery(query) {
|
||||
if (typeof query === "string") {
|
||||
return new URLSearchParams(query).get("unpluginName");
|
||||
} else {
|
||||
return query.unpluginName;
|
||||
}
|
||||
}
|
||||
|
||||
// src/webpack/context.ts
|
||||
import { Buffer as Buffer2 } from "buffer";
|
||||
import { createRequire } from "module";
|
||||
import { resolve } from "path";
|
||||
import process from "process";
|
||||
import { Parser } from "acorn";
|
||||
function getSource(fileSource) {
|
||||
const webpackRequire = createRequire(__require.resolve("webpack"));
|
||||
const RawSource = webpackRequire("webpack-sources").RawSource;
|
||||
return new RawSource(
|
||||
typeof fileSource === "string" ? fileSource : Buffer2.from(fileSource.buffer).toString("utf-8")
|
||||
);
|
||||
}
|
||||
function createBuildContext(options, compiler, compilation, loaderContext) {
|
||||
return {
|
||||
parse(code, opts = {}) {
|
||||
return Parser.parse(code, {
|
||||
sourceType: "module",
|
||||
ecmaVersion: "latest",
|
||||
locations: true,
|
||||
...opts
|
||||
});
|
||||
},
|
||||
addWatchFile(id) {
|
||||
options.addWatchFile(resolve(process.cwd(), id));
|
||||
},
|
||||
emitFile(emittedFile) {
|
||||
const outFileName = emittedFile.fileName || emittedFile.name;
|
||||
if (emittedFile.source && outFileName) {
|
||||
if (!compilation)
|
||||
throw new Error("unplugin/webpack: emitFile outside supported hooks (buildStart, buildEnd, load, transform, watchChange)");
|
||||
compilation.emitAsset(
|
||||
outFileName,
|
||||
getSource(emittedFile.source)
|
||||
);
|
||||
}
|
||||
},
|
||||
getWatchFiles() {
|
||||
return options.getWatchFiles();
|
||||
},
|
||||
getNativeBuildContext() {
|
||||
return { framework: "webpack", compiler, compilation, loaderContext };
|
||||
}
|
||||
};
|
||||
}
|
||||
function createContext(loader) {
|
||||
return {
|
||||
error: (error) => loader.emitError(normalizeMessage(error)),
|
||||
warn: (message) => loader.emitWarning(normalizeMessage(message))
|
||||
};
|
||||
}
|
||||
function normalizeMessage(error) {
|
||||
const err = new Error(typeof error === "string" ? error : error.message);
|
||||
if (typeof error === "object") {
|
||||
err.stack = error.stack;
|
||||
err.cause = error.meta;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
// src/webpack/loaders/transform.ts
|
||||
async function transform(source, map) {
|
||||
var _a;
|
||||
const callback = this.async();
|
||||
const unpluginName = resolveQuery(this.query);
|
||||
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
|
||||
if (!(plugin == null ? void 0 : plugin.transform))
|
||||
return callback(null, source, map);
|
||||
const context = createContext(this);
|
||||
const res = await plugin.transform.call(
|
||||
Object.assign({}, createBuildContext({
|
||||
addWatchFile: (file) => {
|
||||
this.addDependency(file);
|
||||
},
|
||||
getWatchFiles: () => {
|
||||
return this.getDependencies();
|
||||
}
|
||||
}, this._compiler, this._compilation, this), context),
|
||||
source,
|
||||
this.resource
|
||||
);
|
||||
if (res == null)
|
||||
callback(null, source, map);
|
||||
else if (typeof res !== "string")
|
||||
callback(null, res.code, map == null ? map : res.map || map);
|
||||
else
|
||||
callback(null, res, map);
|
||||
}
|
||||
export {
|
||||
transform as default
|
||||
};
|
||||
Reference in New Issue
Block a user