Skip to content

Commit 3715aaa

Browse files
committed
Use separate file.
1 parent 58f7fc6 commit 3715aaa

4 files changed

Lines changed: 19 additions & 27 deletions

File tree

website/docs/developer-docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ When you are creating an enhancement suggestion, please fill in [the template](h
120120

121121
authentik can be run locally, although depending on which part you want to work on, different prerequisites are required.
122122

123-
This is documented in the [developer docs](./setup/frontend-dev-environment.md).
123+
This is documented in the [developer docs](./setup/frontend-dev-environment.mdx).
124124

125125
### Help with the docs
126126

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:::info NPM install scripts are disabled by default
2+
3+
The repository's `.npmrc` sets `ignore-scripts=true` so `preinstall`/`install`/`postinstall` lifecycle scripts do not run during `npm ci`. This neutralizes a dominant NPM supply-chain attack pattern at the cost of skipping a few legitimate native-binary unpacks.
4+
5+
If the watch build fails because a package needs its install script (commonly `esbuild`, `chromedriver`, `tree-sitter`, or `tree-sitter-json`), rebuild only that package:
6+
7+
```shell
8+
npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
9+
```
10+
11+
**Do not** edit `.npmrc` to flip `ignore-scripts` off — that re-introduces the risk repo-wide.
12+
13+
:::

website/docs/developer-docs/setup/frontend-dev-environment.md renamed to website/docs/developer-docs/setup/frontend-dev-environment.mdx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ tags:
88
- docker
99
---
1010

11+
import NPMInstallScriptsAdmonition from "./\_npm-install-scripts-admonition.mdx";
12+
1113
If you're focusing solely on frontend development, you can create a minimal development environment using Docker and Node.js. This setup allows you to make and preview changes to the frontend in real-time, without needing to interact with the backend.
1214

1315
### Prerequisites
@@ -55,19 +57,7 @@ If you're focusing solely on frontend development, you can create a minimal deve
5557
make web-watch
5658
```
5759

58-
:::info npm install scripts are disabled by default
59-
60-
The repository's `.npmrc` sets `ignore-scripts=true` so `preinstall`/`install`/`postinstall` lifecycle scripts do not run during `npm ci`. This is intentional: it neutralizes the dominant npm supply-chain attack pattern (recent examples: "Shai-Hulud" and "Mini Shai-Hulud") at the cost of skipping a few legitimate native-binary unpacks.
61-
62-
If the watch build fails because a package needs its install script (commonly `esbuild`, `chromedriver`, `tree-sitter`, or `tree-sitter-json`), rebuild only that package:
63-
64-
```shell
65-
npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
66-
```
67-
68-
**Do not** edit `.npmrc` to flip `ignore-scripts` off — that re-introduces the risk repo-wide.
69-
70-
:::
60+
<NPMInstallScriptsAdmonition />
7161

7262
5. In a new terminal, navigate to the cloned repository root and start the backend containers with Docker Compose.
7363

website/docs/developer-docs/setup/full-dev-environment.mdx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tags:
1111

1212
import TabItem from "@theme/TabItem";
1313
import Tabs from "@theme/Tabs";
14+
import NPMInstallScriptsAdmonition from "./\_npm-install-scripts-admonition.mdx";
1415

1516
## Prerequisites
1617

@@ -126,19 +127,7 @@ Install all required JavaScript and Python dependencies and create an isolated P
126127
make install
127128
```
128129

129-
:::info npm install scripts are disabled by default
130-
131-
The repository's `.npmrc` sets `ignore-scripts=true`, which prevents `preinstall`/`install`/`postinstall` lifecycle scripts from running during `npm ci`. This neutralizes the most common npm supply-chain attack pattern (recent examples: "Shai-Hulud" and "Mini Shai-Hulud") at the cost of skipping legitimate native-binary unpacking for a few packages.
132-
133-
If a build step fails because a package needs its install script (commonly `esbuild`, `chromedriver`, `tree-sitter`, or `tree-sitter-json`), rebuild it explicitly:
134-
135-
```shell
136-
npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
137-
```
138-
139-
**Do not** edit `.npmrc` to flip `ignore-scripts` off — that re-introduces the risk repo-wide.
140-
141-
:::
130+
<NPMInstallScriptsAdmonition />
142131

143132
### Generate development configuration
144133

0 commit comments

Comments
 (0)