From c10e4a906313e39301d08635361c4dbac4bc2ec8 Mon Sep 17 00:00:00 2001 From: Dominic R Date: Tue, 18 Mar 2025 12:02:52 -0400 Subject: [PATCH] website: package.json: copy over schema for npm run watch (#13543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * root: Makefile: copy over schema for website-watch `make website-watch` will fail with the following error if the schema.yml file is not present in the website's static directory. This was tested on a branch up to date with main with the schema file I copied over removed. ``` ➜ authentik git:(sdko/integrations-all/migr-to-wizard) ✗ w cd website && npm run watch > @goauthentik/website-docs@0.0.0 watch > docusaurus gen-api-docs all && docusaurus start (node:102678) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Loading of api failed for "/home/d/Code/authentik/website/static/schema.yml" [ERROR] [Error: ENOENT: no such file or directory, lstat '/home/d/Code/authentik/website/static/schema.yml'] { errno: -2, code: 'ENOENT', syscall: 'lstat', path: '/home/d/Code/authentik/website/static/schema.yml' } [INFO] Docusaurus version: 3.7.0 Node version: v23.6.1 make: *** [Makefile:233: website-watch] Error 1 ``` We should copy over the schema each time in case it changes. Adding it to this Makefile instruction as [official docs](https://docs.goauthentik.io/docs/developer-docs/setup/website-dev-environment) tell users to run `make website-install` which simply `npm ci`s, then this... Signed-off-by: Dominic R * tabs? Signed-off-by: Dominic R * Update Makefile Signed-off-by: Dominic R * Update package.json Signed-off-by: Dominic R * Update package.json Signed-off-by: Dominic R --------- Signed-off-by: Dominic R --- website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/package.json b/website/package.json index 41b17818f1..917dba7929 100644 --- a/website/package.json +++ b/website/package.json @@ -14,7 +14,7 @@ "serve": "docusaurus serve", "swizzle": "docusaurus swizzle", "test": "node --test", - "watch": "docusaurus gen-api-docs all && docusaurus start" + "watch": "cp -f ../schema.yml ./static/schema.yml && docusaurus gen-api-docs all && docusaurus start" }, "dependencies": { "semver": "^7.7.1",