Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-lee committed Oct 17, 2024
1 parent dc6b114 commit dc757d1
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 456 deletions.
2 changes: 1 addition & 1 deletion docs/articles/step-3-add-api-key-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ this authentication method is considered one of the easiest to use by developers
but hard for API developers to get right. We also support JWT tokens and other
authentication methods.

:::info{title="What's a Policy?}
:::info{title="What's a Policy?"}

[Policies](./policies.md) are modules that can intercept and transform an
incoming request or outgoing response. Zuplo offers a wide range of policies
Expand Down
2 changes: 1 addition & 1 deletion docs/handlers/url-rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The Rewrite Handler can be added to any route using the Route Designer. Open the
**routes.oas.json**. Inside any route, select **URL Rewrite** from the **Request
Handlers** drop-down.

![Url Rewrite Handler selection](../../public/media/url-rewrite-handler-selection.png)
![Url Rewrite Handler selection](/media/url-rewrite-handler-selection.png)

In the text box enter the URL to rewrite the request. Values can be mixed into
the URL string using Javascript string interpolation syntax. For example:
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"scripts": {
"dev": "zudoku dev",
"build": "zudoku build",
"build:scripts": "node ./scripts/build.mjs",
"format": "prettier --write .",
"typecheck": "tsc",
"postinstall": "pnpm policies:get && pnpm policies:generate",
"postinstall": "npm run policies:get && npm run policies:generate",
"policies:get": "sh ./scripts/get-policies.sh",
"policies:generate": "tsx scripts/generate-policies.ts",
"policies:ci": "node ./scripts/build.mjs && node --enable-source-maps ./scripts/update-policies.main.mjs"
Expand All @@ -24,7 +23,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.6.3",
"zudoku": "0.0.0-d99ad45"
"zudoku": "0.0.0-740d272"
},
"devDependencies": {
"@types/json-schema": "7.0.15",
Expand Down
13 changes: 0 additions & 13 deletions scripts/build.mjs

This file was deleted.

12 changes: 7 additions & 5 deletions scripts/fix-markdown.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
export const fixMarkdown = (content: string) =>
content
.replaceAll(/\.mdx?(#.*?)?\)/gm, "$1)") // replace paths like `../../public` without the `public` prefix
.replaceAll(/\.mdx?(#.*?)?\)/gm, "$1)")
// replace paths like `../../public` without the `public` prefix
.replaceAll(/\((\.\.\/)+public/gm, "(")
// replace local gifs and pngs with webm and webp
.replaceAll(/(]\(\.*\/.+?)(\.gif\))/gm, "$1.webm)")
.replaceAll(/(]\(\.*\/.+?)(\.png\))/gm, "$1.webp)")
// replace outdated directives with correct syntax
.replaceAll(/:::\s([^\n]+)/gm, ":::$1")
// /^(.*?)\s*{#([\w-]+)}$
// replace custom slug ids:
.replaceAll(/^(#+.*?)\s*{#([\w-]+)}/gm, "$1")
.replaceAll(
/:::(tip|info|note|caution|warning|danger)\s([^\n]+)/gm,
':::$1{title="$2"}',
);
)
.replaceAll(/:::\w+{title="[^"]*"}/g, (m) => m.replaceAll(/\n/g, ""));
5 changes: 0 additions & 5 deletions scripts/update-policies.main.mjs

This file was deleted.

Loading

0 comments on commit dc757d1

Please sign in to comment.