File tree 9 files changed +161
-138
lines changed
docs/additional-verification/attack-protection-suite
9 files changed +161
-138
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - " docs/**"
7
+ - " static/**"
8
+ - " src/**"
9
+ - " package-lock.json"
10
+ push :
11
+ branches :
12
+ - master
13
+
14
+ jobs :
15
+ build :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Setup Node.js
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version : " 20"
24
+ cache : " npm"
25
+ cache-dependency-path : " package-lock.json"
26
+
27
+ - name : Install Dependencies
28
+ run : npm install
29
+
30
+ - name : Build Docusaurus Site
31
+ run : npm run build
32
+
33
+ - name : Upload Build Artifacts
34
+ uses : actions/upload-artifact@v4
35
+ with :
36
+ name : docusaurus-build
37
+ path : build
38
+ retention-days : 1
39
+
40
+ trigger :
41
+ needs : build
42
+ if : github.ref == 'refs/heads/master' && github.event_name == 'push'
43
+ runs-on : ubuntu-latest
44
+ steps :
45
+ - name : Trigger Workflow in Different Repository
46
+ uses : actions/github-script@v7
47
+ with :
48
+ github-token : ${{ secrets.BACKEND_WEBSITE_TOKEN }}
49
+ script : |
50
+ github.rest.actions.createWorkflowDispatch({
51
+ owner: 'supertokens',
52
+ repo: 'supertokens-backend-website',
53
+ workflow_id: 'release-documentation-changes.yml',
54
+ ref: 'master',
55
+ inputs: {
56
+ "run-id": `${{ github.run_id }}`,
57
+ }
58
+ })
Original file line number Diff line number Diff line change
1
+ name : Lint Docs
2
+
3
+ on :
4
+ # Need to fix mdx issues that appeared in the latest version of vale
5
+ # pull_request:
6
+ workflow_dispatch :
7
+ # paths:
8
+ # - "docs/**"
9
+ # - ".vale.ini"
10
+
11
+ jobs :
12
+ vale-lint :
13
+ runs-on : ubuntu-latest
14
+ container :
15
+ image : jdkato/vale
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ - run : vale --version
19
+
20
+ - name : Run Vale Linting
21
+ run : vale --minAlertLevel=error --config=.vale.ini ./docs
Original file line number Diff line number Diff line change
1
+ name : Code Type Checking
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ paths :
7
+ - " docs/**"
8
+
9
+ jobs :
10
+ write-code-blocks :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - uses : oven-sh/setup-bun@v2
16
+
17
+ - name : Install Dependencies
18
+ run : bun install
19
+
20
+ - name : Write Code Snippets
21
+ run : bun run write-code-blocks
22
+
23
+ - name : Upload Code Type Checking Scripts
24
+ uses : actions/upload-artifact@v4
25
+ with :
26
+ name : code-blocks
27
+ path : scripts/code-type-checking
28
+ retention-days : 1
29
+
30
+ code-type-checking :
31
+ needs : write-code-blocks
32
+ runs-on : ubuntu-latest
33
+ strategy :
34
+ matrix :
35
+ language :
36
+ - javascript
37
+ - go
38
+ - python
39
+ - swift
40
+ - php
41
+ - java
42
+ - csharp
43
+ # TODO: Check kotlin issues
44
+ # - kotlin
45
+ steps :
46
+ - name : Download Code Blocks
47
+ uses : actions/download-artifact@v4
48
+ with :
49
+ name : code-blocks
50
+ path : ./scripts/code-type-checking
51
+
52
+ - uses : docker/setup-buildx-action@v3
53
+
54
+ - name : Check code snippets for ${{ matrix.language }}
55
+ working-directory : ./scripts/code-type-checking/${{ matrix.language }}
56
+ run : docker build -t code-check-${{ matrix.language }} .
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ scripts/code-type-checking/go/snippets/*
31
31
scripts /code-type-checking /php /snippets /*
32
32
scripts /code-type-checking /csharp /snippets /*
33
33
scripts /code-type-checking /javascript /snippets /*
34
+ scripts /code-type-checking /javascript /node_modules
34
35
scripts /code-type-checking /kotlin /snippets /*
35
36
scripts /code-type-checking /java /snippets /*
36
37
scripts /code-type-checking /python /snippets /*
Original file line number Diff line number Diff line change 2
2
StylesPath = .vale
3
3
MinAlertLevel = suggestion
4
4
5
- Packages = MDX
6
5
Vocab = Authentication
7
6
8
7
9
- [formats]
10
- mdx = md
11
-
12
8
[*.{md,mdx}]
13
9
BasedOnStyles = SuperTokens
14
10
Original file line number Diff line number Diff line change 2
2
sidebar_position : 1
3
3
title : Introduction
4
4
hide_title : true
5
- description : >-
6
- Enhance application security with SuperTokens Attack Protection Suite's
7
- advanced threat detection methods.
5
+ description : Enhance application security with automatic threat detection SuperTokens
8
6
---
9
7
10
8
# Introduction
Original file line number Diff line number Diff line change 17
17
"typecheck" : " tsc" ,
18
18
"write-code-blocks" : " bun run ./scripts/write-code-blocks.ts" ,
19
19
"format-code-blocks" : " bun run ./scripts/format-code-blocks.ts" ,
20
- "check-code-blocks" : " ./scripts/check-code-blocks.sh " ,
20
+ "check-code-blocks" : " bun run ./scripts/check-code-blocks.ts " ,
21
21
"ai" : " bun run scripts/ai.ts"
22
22
},
23
23
"dependencies" : {
Original file line number Diff line number Diff line change
1
+ import { $ } from "bun" ;
2
+
3
+ async function runCodeTypeCheck ( language : string ) {
4
+ if ( ! language ) {
5
+ console . error ( "Please provide a language argument" ) ;
6
+ process . exit ( 1 ) ;
7
+ }
8
+ console . log ( language ) ;
9
+
10
+ try {
11
+ const { exitCode } = await $ `docker build -t code-check-${ language } .` . cwd (
12
+ `./scripts/code-type-checking/${ language } ` ,
13
+ ) ;
14
+
15
+ process . exit ( exitCode ) ;
16
+ } catch ( error ) {
17
+ console . error ( "Error running code type check:" , error ) ;
18
+ process . exit ( 1 ) ;
19
+ }
20
+ }
21
+
22
+ const language = process . argv [ 2 ] ;
23
+ runCodeTypeCheck ( language ) ;
You can’t perform that action at this time.
0 commit comments