build-firewall-plugin 0.0.8 → 0.1.0

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.
Files changed (2) hide show
  1. package/README.md +54 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -0,0 +1,54 @@
1
+ ## build-firewall-plugin
2
+
3
+ Build-time **Rspack plugin** for enforcing architectural dependency rules between project layers.
4
+
5
+ The plugin analyzes the **actual module graph**, not raw `import` statements, and reports violations only for **real, used dependencies**.
6
+
7
+ ---
8
+
9
+ ## 📦 Installation
10
+
11
+ ```bash
12
+ npm install build-firewall-plugin --save-dev
13
+
14
+ ```
15
+
16
+ ```bash
17
+ yarn add build-firewall-plugin -D
18
+ ```
19
+
20
+ ---
21
+
22
+ ## 🛠️ Config Example
23
+
24
+ ```ts
25
+ // rspack.config.ts
26
+ import { BuildFirewallPlugin } from "build-firewall-plugin";
27
+
28
+ module.exports = {
29
+ // ...your config,
30
+
31
+ plugins: [
32
+ new BuildFirewallPlugin({
33
+ path: 'my-project-rules.json',
34
+ }),
35
+ ],
36
+ };
37
+
38
+ ```
39
+
40
+ ## 💾 Output Example
41
+
42
+ ```bash
43
+ [Build Firewall Plugin] Starting...
44
+ [Build Firewall Plugin] Your build-firewall-plugin.rules.json file is valid!
45
+
46
+ [Build Firewall Plugin] Module /src/services/api.ts imports forbidden module /src/ui/icon.tsx
47
+
48
+ [Build Firewall Plugin] Module /src/router/index.ts imports forbidden module /src/models/api.ts
49
+
50
+ ```
51
+
52
+ ## License
53
+
54
+ [MIT license](https://github.com/AliakseiMalinouski/build-firewall-plugin?tab=MIT-1-ov-file)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-firewall-plugin",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "main": "build/index.js",