@rspack/binding
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -87,2 +87,5 @@ /* tslint:disable */ | ||
} | ||
export interface RawDevServer { | ||
hot?: boolean | ||
} | ||
/** | ||
@@ -176,15 +179,8 @@ * `loader` is for js side loader, `builtin_loader` is for rust side loader, | ||
stats?: RawStatsOptions | ||
devServer?: RawDevServer | ||
} | ||
export interface AssetContent { | ||
buffer?: Buffer | ||
source?: string | ||
} | ||
export interface UpdateAssetOptions { | ||
asset: AssetContent | ||
filename: string | ||
} | ||
export interface AssetInfoRelated { | ||
export interface JsAssetInfoRelated { | ||
sourceMap?: string | ||
} | ||
export interface AssetInfo { | ||
export interface JsAssetInfo { | ||
/** | ||
@@ -210,15 +206,21 @@ * if the asset can be long term cached forever (contains a hash) | ||
*/ | ||
related: AssetInfoRelated | ||
related: JsAssetInfoRelated | ||
} | ||
export interface Asset { | ||
export interface JsAsset { | ||
name: string | ||
source: JsCompatSource | ||
info: AssetInfo | ||
info: JsAssetInfo | ||
} | ||
export interface PluginCallbacks { | ||
doneCallback: (...args: any[]) => any | ||
processAssetsCallback: (...args: any[]) => any | ||
compilationCallback: (...args: any[]) => any | ||
thisCompilationCallback: (...args: any[]) => any | ||
export interface JsChunk { | ||
files: Array<string> | ||
} | ||
export interface JsChunkGroup { | ||
chunks: Array<JsChunk> | ||
} | ||
export interface JsHooks { | ||
done: (...args: any[]) => any | ||
processAssets: (...args: any[]) => any | ||
compilation: (...args: any[]) => any | ||
thisCompilation: (...args: any[]) => any | ||
} | ||
export interface JsCompatSource { | ||
@@ -232,24 +234,11 @@ /** Whether the underlying data structure is a `RawSource` */ | ||
} | ||
export const enum DiffStatKind { | ||
Changed = 0, | ||
Deleted = 1, | ||
Added = 2 | ||
} | ||
export interface DiffStat { | ||
content: string | ||
kind: DiffStatKind | ||
} | ||
export interface RebuildResult { | ||
diff: Record<string, DiffStat> | ||
stats: StatsCompilation | ||
} | ||
export interface StatsError { | ||
export interface JsStatsError { | ||
message: string | ||
formatted: string | ||
} | ||
export interface StatsWarning { | ||
export interface JsStatsWarning { | ||
message: string | ||
formatted: string | ||
} | ||
export interface StatsAsset { | ||
export interface JsStatsAsset { | ||
type: string | ||
@@ -260,8 +249,8 @@ name: string | ||
chunkNames: Array<string> | ||
info: StatsAssetInfo | ||
info: JsStatsAssetInfo | ||
} | ||
export interface StatsAssetInfo { | ||
export interface JsStatsAssetInfo { | ||
development: boolean | ||
} | ||
export interface StatsModule { | ||
export interface JsStatsModule { | ||
type: string | ||
@@ -275,3 +264,3 @@ moduleType: string | ||
} | ||
export interface StatsChunk { | ||
export interface JsStatsChunk { | ||
type: string | ||
@@ -285,34 +274,32 @@ files: Array<string> | ||
} | ||
export interface StatsEntrypointAsset { | ||
export interface JsStatsEntrypointAsset { | ||
name: string | ||
size: number | ||
} | ||
export interface StatsEntrypoint { | ||
export interface JsStatsEntrypoint { | ||
name: string | ||
assets: Array<StatsEntrypointAsset> | ||
assets: Array<JsStatsEntrypointAsset> | ||
chunks: Array<string> | ||
assetsSize: number | ||
} | ||
export interface StatsCompilation { | ||
assets: Array<StatsAsset> | ||
modules: Array<StatsModule> | ||
chunks: Array<StatsChunk> | ||
entrypoints: Array<StatsEntrypoint> | ||
errors: Array<StatsError> | ||
export interface JsStatsCompilation { | ||
assets: Array<JsStatsAsset> | ||
modules: Array<JsStatsModule> | ||
chunks: Array<JsStatsChunk> | ||
entrypoints: Array<JsStatsEntrypoint> | ||
errors: Array<JsStatsError> | ||
errorsCount: number | ||
warnings: Array<StatsWarning> | ||
warnings: Array<JsStatsWarning> | ||
warningsCount: number | ||
} | ||
export interface OnLoadContext { | ||
id: string | ||
} | ||
export function initCustomTraceSubscriber(): void | ||
export class JsCompilation { | ||
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: AssetInfo | ((assetInfo: AssetInfo) => AssetInfo)): void | ||
getAssets(): Readonly<Asset>[] | ||
emitAsset(filename: string, source: JsCompatSource, assetInfo: AssetInfo): void | ||
updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void | ||
getAssets(): Readonly<JsAsset>[] | ||
emitAsset(filename: string, source: JsCompatSource, assetInfo: JsAssetInfo): void | ||
get assets(): Record<string, JsCompatSource> | ||
get entrypoints(): Record<string, JsChunkGroup> | ||
} | ||
export class Rspack { | ||
constructor(options: RawOptions, pluginCallbacks?: PluginCallbacks | undefined | null) | ||
constructor(options: RawOptions, jsHooks?: JsHooks | undefined | null) | ||
/** | ||
@@ -324,3 +311,3 @@ * Build with the given option passed to the constructor | ||
*/ | ||
unsafe_build(callback: (err: null | Error, result: StatsCompilation) => void): void | ||
unsafe_build(callback: (err: null | Error, result: JsStatsCompilation) => void): void | ||
/** | ||
@@ -327,0 +314,0 @@ * Rebuild with the given option passed to the constructor |
{ | ||
"name": "@rspack/binding", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Node binding for rspack", | ||
@@ -24,5 +24,7 @@ "main": "binding.js", | ||
"build": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json", | ||
"build:release:all": "pnpm build:release && pnpm build:release:x64 && pnpm build:release:linux", | ||
"build:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json", | ||
"build_linux:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --zig --target x86_64-unknown-linux-gnu --zig-abi-suffix=2.17" | ||
"build:release:x64": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --target x86_64-apple-darwin", | ||
"build:release:linux": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --zig --target x86_64-unknown-linux-gnu --zig-abi-suffix=2.17" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111818742
6
543
3