@rspack/binding 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Node binding for rspack",
5
5
  "main": "binding.js",
6
6
  "types": "binding.d.ts",
@@ -12,15 +12,15 @@
12
12
  "binding.d.ts",
13
13
  "*.node"
14
14
  ],
15
- "scripts": {
16
- "build": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
17
- "build:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json"
18
- },
19
15
  "keywords": [],
20
16
  "author": "",
21
17
  "license": "ISC",
22
18
  "devDependencies": {
23
19
  "@napi-rs/cli": "^2.6.2",
24
20
  "why-is-node-running": "2.2.1"
21
+ },
22
+ "scripts": {
23
+ "build": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
24
+ "build:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json"
25
25
  }
26
26
  }
package/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- # @rspack/binding
2
-
3
- ## 0.0.4
4
-
5
- ### Patch Changes
6
-
7
- - 536f6f70: fix broken lib
8
-
9
- ## 0.0.2
10
-
11
- ### Patch Changes
12
-
13
- - bd57e818: first release
package/binding.d.ts DELETED
@@ -1,128 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- /* auto-generated by NAPI-RS */
5
-
6
- export class ExternalObject<T> {
7
- readonly '': {
8
- readonly '': unique symbol
9
- [K: symbol]: T
10
- }
11
- }
12
- export interface RawCssPluginConfig {
13
- /**
14
- * ## Example
15
- * ```rust,ignore
16
- * RawCssOptions {
17
- * preset_env: vec!["Firefox > 10".into(), "chrome >=20".into()],
18
- * }
19
- * ```
20
- * The preset_env will finally pass into [`browserslist::resolve`](https://docs.rs/browserslist-rs/latest/browserslist/fn.resolve.html).
21
- * For detailed configuration, see https://docs.rs/browserslist-rs/latest/browserslist/
22
- */
23
- presetEnv: Array<string>
24
- }
25
- /**
26
- * It seems napi not support enum well
27
- */
28
- export interface RawHtmlPluginConfig {
29
- /** emitted file name in output path */
30
- filename?: string | void
31
- /** template html file */
32
- template?: string
33
- /** `head`, `body` or None */
34
- inject?: string | void
35
- /** path or `auto` */
36
- publicPath?: string
37
- /** `blocking`, `defer`, or `module` */
38
- scriptLoading?: string | void
39
- /** entry_chunk_name (only entry chunks are supported) */
40
- chunks?: Array<string>
41
- excludedChunks?: Array<string>
42
- sri?: string | void
43
- }
44
- export interface RawBuiltins {
45
- html?: Array<RawHtmlPluginConfig>
46
- css?: RawCssPluginConfig
47
- }
48
- /**
49
- * `loader` is for js side loader, `builtin_loader` is for rust side loader,
50
- * which is mapped to real rust side loader by [get_builtin_loader].
51
- *
52
- * `options` is
53
- * - a `None` on rust side and handled by js side `getOptions` when
54
- * using with `loader`.
55
- * - a `Some(string)` on rust side, deserialized by `serde_json::from_str`
56
- * and passed to rust side loader in [get_builtin_loader] when using with
57
- * `builtin_loader`.
58
- */
59
- export interface RawModuleRuleUse {
60
- loader?: (...args: any[]) => any
61
- builtinLoader?: string
62
- options?: string
63
- loaderName?: string
64
- }
65
- export interface RawModuleRule {
66
- test?: string
67
- resource?: string
68
- resourceQuery?: string
69
- func?: (...args: any[]) => any
70
- uses?: Array<RawModuleRuleUse>
71
- type?: "js" | "jsx" | "ts" | "tsx" | "css" | "json" | "asset" | "asset/resource" | "asset/source" | "asset/inline"
72
- }
73
- export interface RawAssetParserDataUrlOption {
74
- maxSize?: number
75
- }
76
- export interface RawAssetParserOptions {
77
- dataUrlCondition?: RawAssetParserDataUrlOption
78
- }
79
- export interface RawParserOptions {
80
- asset?: RawAssetParserOptions
81
- }
82
- export interface RawModuleOptions {
83
- rules: Array<RawModuleRule>
84
- parser?: RawParserOptions
85
- }
86
- export interface RawOutputOptions {
87
- path?: string
88
- publicPath?: string
89
- assetModuleFilename?: string
90
- filename?: string
91
- chunkFilename?: string
92
- uniqueName?: string
93
- }
94
- export interface RawResolveOptions {
95
-
96
- }
97
- export interface RawOptions {
98
- entry?: Record<string, string>
99
- mode?: string
100
- target?: string
101
- context?: string
102
- output?: RawOutputOptions
103
- resolve?: RawResolveOptions
104
- module?: RawModuleOptions
105
- builtins?: RawBuiltins
106
- define?: Record<string, string>
107
- external?: Record<string, string>
108
- }
109
- export interface OnLoadContext {
110
- id: string
111
- }
112
- export function initCustomTraceSubscriber(): void
113
- export interface PluginCallbacks {
114
- doneCallback: (...args: any[]) => any
115
- }
116
- export interface RspackError {
117
- message: string
118
- }
119
- export interface Stats {
120
- errors: Array<RspackError>
121
- }
122
- export function initTraceSubscriber(): void
123
- export function newRspack(options: RawOptions, pluginCallbacks?: PluginCallbacks | undefined | null): ExternalObject<RspackInternal>
124
- export function build(rspack: ExternalObject<RspackInternal>): Promise<Stats>
125
- export function rebuild(rspack: ExternalObject<RspackInternal>): Promise<Record<string, string>>
126
- export interface RspackInternal {
127
-
128
- }
Binary file