@rspack/binding
Advanced tools
Comparing version 0.0.0-20221026015301 to 0.0.0-20221028024548
@@ -50,2 +50,15 @@ /* tslint:disable */ | ||
} | ||
export interface RawProgressPluginConfig { | ||
prefix?: string | ||
} | ||
export interface RawReactOptions { | ||
runtime?: string | ||
importSource?: string | ||
pragma?: string | ||
pragmaFrag?: string | ||
throwIfNamespace?: boolean | ||
development?: boolean | ||
useBuiltins?: boolean | ||
useSpread?: boolean | ||
} | ||
export interface RawBuiltins { | ||
@@ -59,2 +72,5 @@ html?: Array<RawHtmlPluginConfig> | ||
define?: Record<string, string> | ||
treeShaking?: boolean | ||
progress?: RawProgressPluginConfig | ||
react?: RawReactOptions | ||
} | ||
@@ -99,2 +115,5 @@ /** | ||
} | ||
export interface RawOptimizationOptions { | ||
splitChunks?: RawSplitChunksOptions | ||
} | ||
export interface RawOutputOptions { | ||
@@ -118,2 +137,13 @@ path?: string | ||
} | ||
export interface RawSplitChunksOptions { | ||
cacheGroups: Record<string, RawCacheGroupOptions> | ||
/** What kind of chunks should be selected. */ | ||
chunks?: string | ||
} | ||
export interface RawCacheGroupOptions { | ||
test: string | ||
/** What kind of chunks should be selected. */ | ||
chunks?: string | ||
name: string | ||
} | ||
export interface RawOptions { | ||
@@ -128,5 +158,6 @@ entry?: Record<string, string> | ||
builtins?: RawBuiltins | ||
external?: Record<string, string> | ||
externals?: Record<string, string> | ||
externalType?: string | ||
devtool?: string | ||
optimization?: RawOptimizationOptions | ||
} | ||
@@ -184,2 +215,6 @@ export interface AssetContent { | ||
export function initCustomTraceSubscriber(): void | ||
export class RspackCompilation { | ||
getAssets(): Record<string, Buffer> | ||
emitAsset(options: UpdateAssetOptions): void | ||
} | ||
export class DiffStat { | ||
@@ -191,4 +226,34 @@ content: string | ||
constructor(options: RawOptions, pluginCallbacks?: PluginCallbacks | undefined | null) | ||
build(): Promise<StatsCompilation> | ||
rebuild(changedFiles: Array<string>, removedFiles: Array<string>): Promise<Record<string, {content: string, kind: number}>> | ||
/** | ||
* Build with the given option passed to the constructor | ||
* | ||
* Warning: | ||
* Calling this method recursively might cause a deadlock. | ||
*/ | ||
unsafe_build(): Promise<StatsCompilation> | ||
/** | ||
* Rebuild with the given option passed to the constructor | ||
* | ||
* Warning: | ||
* Calling this method recursively will cause a deadlock. | ||
*/ | ||
unsafe_rebuild(changedFiles: Array<string>, removedFiles: Array<string>): Promise<Record<string, {content: string, kind: number}>> | ||
/** | ||
* Get the last compilation | ||
* | ||
* Warning: | ||
* | ||
* Calling this method under the build or rebuild method might cause a deadlock. | ||
* | ||
* **Note** that this method is not safe if you cache the _RspackCompilation_ on the Node side, as it will be invalidated by the next build and accessing a dangling ptr is a UB. | ||
*/ | ||
unsafe_last_compilation(f: (arg0: RspackCompilation) => void): void | ||
/** | ||
* Destroy the compiler | ||
* | ||
* Warning: | ||
* | ||
* Anything related to this compiler will be invalidated after this method is called. | ||
*/ | ||
unsafe_drop(): void | ||
} |
{ | ||
"name": "@rspack/binding", | ||
"version": "0.0.0-20221026015301", | ||
"version": "0.0.0-20221028024548", | ||
"description": "Node binding for rspack", | ||
@@ -5,0 +5,0 @@ "main": "binding.js", |
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
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
31280918
465