@rsbuild/shared
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -18,2 +18,3 @@ import type { ChainIdentifier } from '../chain'; | ||
isFirstCompile: boolean; | ||
stats: Stats | MultiStats; | ||
}) => PromiseOrNot<void>; | ||
@@ -20,0 +21,0 @@ export type OnBeforeStartDevServerFn = () => PromiseOrNot<void>; |
@@ -1,15 +0,4 @@ | ||
interface StatsOptionsObj { | ||
all?: boolean; | ||
preset?: 'normal' | 'none' | 'verbose' | 'errors-only' | 'errors-warnings'; | ||
assets?: boolean; | ||
chunks?: boolean; | ||
modules?: boolean; | ||
entrypoints?: boolean; | ||
warnings?: boolean; | ||
warningsCount?: boolean; | ||
errors?: boolean; | ||
errorsCount?: boolean; | ||
colors?: boolean; | ||
logging?: boolean | 'none' | 'error' | 'warn' | 'info' | 'log' | 'verbose'; | ||
loggingTrace?: boolean; | ||
import type { StatsOptions as RspackStatsOptions, StatsCompilation } from '@rspack/core'; | ||
export type { StatsError, StatsAsset } from '@rspack/core'; | ||
type StatsOptions = RspackStatsOptions & { | ||
/** Rspack not support below opts */ | ||
@@ -22,48 +11,3 @@ cachedAssets?: boolean; | ||
groupAssetsByEmitStatus?: boolean; | ||
} | ||
/** webpack not support boolean or string */ | ||
type StatsOptions = StatsOptionsObj; | ||
interface StatsAssetInfo { | ||
development?: boolean; | ||
} | ||
export interface StatsAsset { | ||
type: string; | ||
name: string; | ||
size: number; | ||
chunks?: Array<string | undefined | null>; | ||
chunkNames?: Array<string | number>; | ||
info: StatsAssetInfo; | ||
} | ||
export interface StatsError { | ||
message: string; | ||
formatted?: string; | ||
} | ||
interface StatsModule { | ||
type?: string; | ||
moduleType?: string; | ||
identifier?: string; | ||
name?: string; | ||
id?: string; | ||
chunks?: Array<string | undefined | null>; | ||
size?: number; | ||
} | ||
interface StatsCompilation { | ||
assets?: Array<StatsAsset>; | ||
hash?: string; | ||
modules?: Array<StatsModule>; | ||
chunks?: Array<StatsChunk>; | ||
errors?: Array<StatsError>; | ||
errorsCount?: number; | ||
warnings?: Array<StatsError>; | ||
warningsCount?: number; | ||
} | ||
interface StatsChunk { | ||
type?: string; | ||
files?: Array<string>; | ||
id?: string | number; | ||
entry: boolean; | ||
initial: boolean; | ||
names?: Array<string>; | ||
size: number; | ||
} | ||
}; | ||
export declare class Stats { | ||
@@ -82,3 +26,2 @@ constructor(statsJson: any); | ||
toString(options?: StatsOptions): string; | ||
} | ||
export {}; | ||
} |
@@ -38,3 +38,3 @@ "use strict"; | ||
var import_url = require("url"); | ||
var import_posix = require("path/posix"); | ||
var import_path = require("path"); | ||
var import_constants = require("./constants"); | ||
@@ -44,3 +44,3 @@ const normalizeUrl = (url) => url.replace(/([^:]\/)\/+/g, "$1"); | ||
const fullUrl = new import_url.URL(base); | ||
fullUrl.pathname = (0, import_posix.join)(fullUrl.pathname, path); | ||
fullUrl.pathname = import_path.posix.join(fullUrl.pathname, path); | ||
return fullUrl.toString(); | ||
@@ -63,3 +63,3 @@ }; | ||
} | ||
return (0, import_posix.join)(base, str); | ||
return import_path.posix.join(base, str); | ||
}; | ||
@@ -66,0 +66,0 @@ const getIpv4Interfaces = () => { |
{ | ||
"name": "@rsbuild/shared", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "The internal shared modules and dependencies of Rsbuild.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://rsbuild.dev", |
7222882
21507