@maniumek/suwgate 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +149 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +97 -0
- package/dist/dev/checkoutEnv.d.ts +20 -0
- package/dist/dev/checkoutEnv.js +101 -0
- package/dist/dev/db.d.ts +25 -0
- package/dist/dev/db.js +103 -0
- package/dist/dev/index.d.ts +16 -0
- package/dist/dev/index.js +108 -0
- package/dist/dev/logs.d.ts +15 -0
- package/dist/dev/logs.js +127 -0
- package/dist/dev/process.d.ts +24 -0
- package/dist/dev/process.js +34 -0
- package/dist/dev/server.d.ts +8 -0
- package/dist/dev/server.js +61 -0
- package/dist/dev/settings.d.ts +46 -0
- package/dist/dev/settings.js +160 -0
- package/dist/dev/smoke.d.ts +15 -0
- package/dist/dev/smoke.js +50 -0
- package/dist/dev/testing.d.ts +19 -0
- package/dist/dev/testing.js +18 -0
- package/dist/dev/tmux.d.ts +24 -0
- package/dist/dev/tmux.js +121 -0
- package/dist/eslint/index.d.ts +17 -0
- package/dist/eslint/index.js +91 -0
- package/dist/eslint/noComments.d.ts +2 -0
- package/dist/eslint/noComments.js +27 -0
- package/dist/gate/check.d.ts +13 -0
- package/dist/gate/check.js +49 -0
- package/dist/gate/config.d.ts +34 -0
- package/dist/gate/config.js +170 -0
- package/dist/gate/contract.d.ts +51 -0
- package/dist/gate/contract.js +1 -0
- package/dist/gate/guardsStep.d.ts +14 -0
- package/dist/gate/guardsStep.js +53 -0
- package/dist/gate/plan.d.ts +29 -0
- package/dist/gate/plan.js +86 -0
- package/dist/gate/report.d.ts +15 -0
- package/dist/gate/report.js +65 -0
- package/dist/gate/repository.d.ts +3 -0
- package/dist/gate/repository.js +37 -0
- package/dist/gate/runner.d.ts +10 -0
- package/dist/gate/runner.js +75 -0
- package/dist/guards/comments/csharp.d.ts +3 -0
- package/dist/guards/comments/csharp.js +163 -0
- package/dist/guards/comments/css.d.ts +3 -0
- package/dist/guards/comments/css.js +11 -0
- package/dist/guards/comments/eslint.d.ts +2 -0
- package/dist/guards/comments/eslint.js +81 -0
- package/dist/guards/comments/hash.d.ts +3 -0
- package/dist/guards/comments/hash.js +72 -0
- package/dist/guards/comments/index.d.ts +2 -0
- package/dist/guards/comments/index.js +18 -0
- package/dist/guards/comments/json.d.ts +3 -0
- package/dist/guards/comments/json.js +13 -0
- package/dist/guards/comments/markup.d.ts +3 -0
- package/dist/guards/comments/markup.js +14 -0
- package/dist/guards/comments/scan.d.ts +19 -0
- package/dist/guards/comments/scan.js +84 -0
- package/dist/guards/comments/sql.d.ts +3 -0
- package/dist/guards/comments/sql.js +11 -0
- package/dist/guards/comments/switches.d.ts +3 -0
- package/dist/guards/comments/switches.js +30 -0
- package/dist/guards/criteria/criteriaKinds.d.ts +2 -0
- package/dist/guards/criteria/criteriaKinds.js +45 -0
- package/dist/guards/criteria/index.d.ts +2 -0
- package/dist/guards/criteria/index.js +2 -0
- package/dist/guards/database/connectionHost.d.ts +2 -0
- package/dist/guards/database/connectionHost.js +30 -0
- package/dist/guards/database/index.d.ts +2 -0
- package/dist/guards/database/index.js +3 -0
- package/dist/guards/database/migrationsUnchanged.d.ts +2 -0
- package/dist/guards/database/migrationsUnchanged.js +56 -0
- package/dist/guards/dotnet/appsettingsBound.d.ts +2 -0
- package/dist/guards/dotnet/appsettingsBound.js +43 -0
- package/dist/guards/dotnet/bannedNugetPackages.d.ts +2 -0
- package/dist/guards/dotnet/bannedNugetPackages.js +51 -0
- package/dist/guards/dotnet/index.d.ts +2 -0
- package/dist/guards/dotnet/index.js +4 -0
- package/dist/guards/dotnet/msbuild.d.ts +5 -0
- package/dist/guards/dotnet/msbuild.js +17 -0
- package/dist/guards/dotnet/testContext.d.ts +2 -0
- package/dist/guards/dotnet/testContext.js +12 -0
- package/dist/guards/dotnet/unusedNugetVersions.d.ts +2 -0
- package/dist/guards/dotnet/unusedNugetVersions.js +21 -0
- package/dist/guards/index.d.ts +2 -0
- package/dist/guards/index.js +6 -0
- package/dist/guards/repository/agentsFile.d.ts +3 -0
- package/dist/guards/repository/agentsFile.js +56 -0
- package/dist/guards/repository/bannedNpmPackages.d.ts +2 -0
- package/dist/guards/repository/bannedNpmPackages.js +43 -0
- package/dist/guards/repository/composePorts.d.ts +6 -0
- package/dist/guards/repository/composePorts.js +57 -0
- package/dist/guards/repository/dependencyDirection.d.ts +2 -0
- package/dist/guards/repository/dependencyDirection.js +87 -0
- package/dist/guards/repository/docsPaths.d.ts +2 -0
- package/dist/guards/repository/docsPaths.js +54 -0
- package/dist/guards/repository/forbiddenNames.d.ts +4 -0
- package/dist/guards/repository/forbiddenNames.js +69 -0
- package/dist/guards/repository/hooks.d.ts +3 -0
- package/dist/guards/repository/hooks.js +86 -0
- package/dist/guards/repository/imagePins.d.ts +3 -0
- package/dist/guards/repository/imagePins.js +68 -0
- package/dist/guards/repository/index.d.ts +2 -0
- package/dist/guards/repository/index.js +32 -0
- package/dist/guards/repository/justModules.d.ts +2 -0
- package/dist/guards/repository/justModules.js +36 -0
- package/dist/guards/repository/noRawColors.d.ts +2 -0
- package/dist/guards/repository/noRawColors.js +29 -0
- package/dist/guards/repository/packageManifests.d.ts +13 -0
- package/dist/guards/repository/packageManifests.js +26 -0
- package/dist/guards/repository/repositoryLayout.d.ts +3 -0
- package/dist/guards/repository/repositoryLayout.js +75 -0
- package/dist/guards/repository/requiredFiles.d.ts +6 -0
- package/dist/guards/repository/requiredFiles.js +78 -0
- package/dist/guards/repository/scriptsCalled.d.ts +3 -0
- package/dist/guards/repository/scriptsCalled.js +39 -0
- package/dist/guards/repository/scriptsHelp.d.ts +2 -0
- package/dist/guards/repository/scriptsHelp.js +37 -0
- package/dist/guards/repository/testRepository.d.ts +4 -0
- package/dist/guards/repository/testRepository.js +39 -0
- package/dist/guards/repository/text.d.ts +20 -0
- package/dist/guards/repository/text.js +33 -0
- package/dist/guards/repository/vsCodeSettings.d.ts +3 -0
- package/dist/guards/repository/vsCodeSettings.js +49 -0
- package/dist/profiles/contract.d.ts +5 -0
- package/dist/profiles/contract.js +124 -0
- package/dist/profiles/criteria.d.ts +25 -0
- package/dist/profiles/criteria.js +162 -0
- package/dist/profiles/database.d.ts +4 -0
- package/dist/profiles/database.js +23 -0
- package/dist/profiles/dotnet.d.ts +5 -0
- package/dist/profiles/dotnet.js +56 -0
- package/dist/profiles/everyRepository.d.ts +2 -0
- package/dist/profiles/everyRepository.js +32 -0
- package/dist/profiles/index.d.ts +2 -0
- package/dist/profiles/index.js +21 -0
- package/dist/profiles/library.d.ts +7 -0
- package/dist/profiles/library.js +132 -0
- package/dist/profiles/node.d.ts +5 -0
- package/dist/profiles/node.js +79 -0
- package/dist/profiles/presets/knip.d.ts +11 -0
- package/dist/profiles/presets/knip.js +29 -0
- package/dist/profiles/presets/playwright.d.ts +68 -0
- package/dist/profiles/presets/playwright.js +37 -0
- package/dist/profiles/presets/prettier.d.ts +12 -0
- package/dist/profiles/presets/prettier.js +7 -0
- package/dist/profiles/presets/tsconfig/browser.json +11 -0
- package/dist/profiles/presets/tsconfig/node.json +8 -0
- package/dist/profiles/presets/tsconfig/strict.json +17 -0
- package/dist/profiles/presets/vitest.d.ts +36 -0
- package/dist/profiles/presets/vitest.js +16 -0
- package/dist/profiles/shell.d.ts +10 -0
- package/dist/profiles/shell.js +62 -0
- package/dist/profiles/web.d.ts +2 -0
- package/dist/profiles/web.js +17 -0
- package/dist/session/guardEdit.d.ts +19 -0
- package/dist/session/guardEdit.js +96 -0
- package/dist/session/preCommit.d.ts +16 -0
- package/dist/session/preCommit.js +33 -0
- package/dist/session/stop.d.ts +8 -0
- package/dist/session/stop.js +39 -0
- package/package.json +97 -3
- package/schema/suwgate.schema.json +196 -0
package/package.json
CHANGED
|
@@ -1,6 +1,100 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maniumek/suwgate",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "One quality gate for every repository: suwgate check runs the steps of the repository's profiles and its guards, configured in suwgate.yml",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Manomenu",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Manomenu/suwgate.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"bin": {
|
|
13
|
+
"suwgate": "dist/cli.js"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
"./eslint": {
|
|
17
|
+
"types": "./dist/eslint/index.d.ts",
|
|
18
|
+
"default": "./dist/eslint/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
"./prettier": {
|
|
22
|
+
"types": "./dist/profiles/presets/prettier.d.ts",
|
|
23
|
+
"default": "./dist/profiles/presets/prettier.js"
|
|
24
|
+
},
|
|
25
|
+
"./knip": {
|
|
26
|
+
"types": "./dist/profiles/presets/knip.d.ts",
|
|
27
|
+
"default": "./dist/profiles/presets/knip.js"
|
|
28
|
+
},
|
|
29
|
+
"./vitest": {
|
|
30
|
+
"types": "./dist/profiles/presets/vitest.d.ts",
|
|
31
|
+
"default": "./dist/profiles/presets/vitest.js"
|
|
32
|
+
},
|
|
33
|
+
"./playwright": {
|
|
34
|
+
"types": "./dist/profiles/presets/playwright.d.ts",
|
|
35
|
+
"default": "./dist/profiles/presets/playwright.js"
|
|
36
|
+
},
|
|
37
|
+
"./tsconfig/strict": "./dist/profiles/presets/tsconfig/strict.json",
|
|
38
|
+
"./tsconfig/browser": "./dist/profiles/presets/tsconfig/browser.json",
|
|
39
|
+
"./tsconfig/node": "./dist/profiles/presets/tsconfig/node.json"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"schema"
|
|
44
|
+
],
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=24"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"ajv": "8.20.0",
|
|
50
|
+
"yaml": "2.9.1"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@eslint/js": "^10.0.1",
|
|
54
|
+
"eslint": "^10.15.0",
|
|
55
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
56
|
+
"eslint-plugin-boundaries": "^7.4.4",
|
|
57
|
+
"typescript-eslint": "^8.73.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@eslint/js": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"eslint": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"eslint-import-resolver-typescript": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"eslint-plugin-boundaries": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"typescript-eslint": {
|
|
73
|
+
"optional": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@arethetypeswrong/cli": "0.18.5",
|
|
78
|
+
"@changesets/cli": "3.0.3",
|
|
79
|
+
"@eslint/js": "^10.0.1",
|
|
80
|
+
"@types/node": "^26.6.6",
|
|
81
|
+
"eslint": "^10.15.0",
|
|
82
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
83
|
+
"eslint-plugin-boundaries": "^7.4.4",
|
|
84
|
+
"knip": "^6.46.1",
|
|
85
|
+
"prettier": "^3.10.1",
|
|
86
|
+
"publint": "0.3.25",
|
|
87
|
+
"typescript": "5.9.3",
|
|
88
|
+
"typescript-eslint": "^8.73.0",
|
|
89
|
+
"vitest": "5.1.1"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public",
|
|
93
|
+
"provenance": true
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp -r src/profiles/presets/tsconfig dist/profiles/presets/",
|
|
97
|
+
"changeset": "changeset",
|
|
98
|
+
"release": "pnpm run build && changeset publish"
|
|
99
|
+
}
|
|
6
100
|
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/@maniumek/suwgate/schema/suwgate.schema.json",
|
|
4
|
+
"title": "suwgate.yml",
|
|
5
|
+
"description": "The quality gate of a repository: its profiles, the steps it adds or skips, and the exceptions from the guards, each with its reason.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["profiles"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"profiles": {
|
|
11
|
+
"description": "What the repository is; each profile brings its default steps and guards.",
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"uniqueItems": true,
|
|
15
|
+
"items": { "enum": ["web", "library", "dotnet", "database"] }
|
|
16
|
+
},
|
|
17
|
+
"directories": {
|
|
18
|
+
"description": "Where a profile's project lives when it is not the repository root, e.g. web: Myapp.Web.",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"propertyNames": { "enum": ["web", "library", "dotnet", "database"] },
|
|
22
|
+
"patternProperties": {
|
|
23
|
+
"^": { "$ref": "#/$defs/relativePath" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"steps": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"add": {
|
|
31
|
+
"description": "Steps this repository runs on top of its profiles' steps.",
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["name", "run"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": { "$ref": "#/$defs/id", "description": "The step's id, unique among all steps." },
|
|
39
|
+
"run": { "type": "string", "minLength": 1, "description": "A bash command, run in the repository root." },
|
|
40
|
+
"title": { "type": "string", "minLength": 1, "description": "What the report calls the step." },
|
|
41
|
+
"quick": { "type": "boolean", "description": "Also run it in suwgate check --quick (default false)." },
|
|
42
|
+
"after": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"uniqueItems": true,
|
|
45
|
+
"items": { "$ref": "#/$defs/id" },
|
|
46
|
+
"description": "Steps that must finish first."
|
|
47
|
+
},
|
|
48
|
+
"limitSeconds": { "type": "integer", "minimum": 1, "description": "The step is killed above this." }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"skip": {
|
|
53
|
+
"description": "Steps of the profiles this repository does not run, each with its reason.",
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["step", "reason"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"step": { "$ref": "#/$defs/id" },
|
|
61
|
+
"reason": { "$ref": "#/$defs/reason" }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"exceptions": {
|
|
68
|
+
"description": "Exceptions from the guards: one target of one guard, each with its reason. suwgate check counts them.",
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["guard", "target", "reason"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"guard": { "type": "string", "pattern": "^([a-z]+/)?[a-z][a-z0-9-]*$" },
|
|
76
|
+
"target": { "type": "string", "minLength": 1 },
|
|
77
|
+
"reason": { "$ref": "#/$defs/reason" }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"dev": {
|
|
82
|
+
"description": "What suwgate dev needs to run the local stack of the repository: db, logs, smoke, server, tmux, checkout-env.",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["name"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"name": {
|
|
88
|
+
"$ref": "#/$defs/id",
|
|
89
|
+
"description": "The short lower-case name of the app: the tmux session is <name>-dev, the database user, password and name default to it."
|
|
90
|
+
},
|
|
91
|
+
"portOffset": {
|
|
92
|
+
"description": "Added to every default port (server 6300, web 3300, e2e server 6301, e2e web 3301, database 5533, stack 8190), so repositories on one machine do not collide.",
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"default": 0
|
|
95
|
+
},
|
|
96
|
+
"ports": {
|
|
97
|
+
"description": "One port set apart from the offset.",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"properties": {
|
|
101
|
+
"server": { "$ref": "#/$defs/port", "description": "The dev server (dotnet watch), shown in its tmux pane." },
|
|
102
|
+
"web": { "$ref": "#/$defs/port", "description": "The web dev server (pnpm dev), shown in its tmux pane." },
|
|
103
|
+
"e2eServer": { "$ref": "#/$defs/port", "description": "The server of the browser tests in the main checkout." },
|
|
104
|
+
"e2eWeb": { "$ref": "#/$defs/port", "description": "The web server of the browser tests in the main checkout." },
|
|
105
|
+
"database": { "$ref": "#/$defs/port", "description": "The local PostgreSQL on the loopback." },
|
|
106
|
+
"stack": { "$ref": "#/$defs/port", "description": "The web of the compose stack, where suwgate dev smoke looks." }
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"compose": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"properties": {
|
|
113
|
+
"file": { "$ref": "#/$defs/relativePath", "description": "The compose file (default compose.yaml)." },
|
|
114
|
+
"profile": { "type": "string", "minLength": 1, "description": "The compose profile of the database (default db)." },
|
|
115
|
+
"databaseService": { "type": "string", "minLength": 1, "description": "The PostgreSQL service (default db)." },
|
|
116
|
+
"serverService": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 1,
|
|
119
|
+
"description": "The server service that suwgate dev logs --compose reads (default server)."
|
|
120
|
+
},
|
|
121
|
+
"extraServices": {
|
|
122
|
+
"description": "Services started and stopped together with the database (a mail catcher).",
|
|
123
|
+
"type": "array",
|
|
124
|
+
"uniqueItems": true,
|
|
125
|
+
"items": { "type": "string", "minLength": 1 }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"database": {
|
|
130
|
+
"description": "Defaults to the app name for all three.",
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"properties": {
|
|
134
|
+
"user": { "type": "string", "minLength": 1 },
|
|
135
|
+
"password": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"description": "A development password: the database is published on the loopback only."
|
|
139
|
+
},
|
|
140
|
+
"name": { "type": "string", "minLength": 1 }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"server": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"project": {
|
|
148
|
+
"$ref": "#/$defs/relativePath",
|
|
149
|
+
"description": "The folder of the server's .csproj (default directories.dotnet)."
|
|
150
|
+
},
|
|
151
|
+
"logFile": {
|
|
152
|
+
"$ref": "#/$defs/relativePath",
|
|
153
|
+
"description": "The server's JSON log, whose folder suwgate dev logs reads (default .artifacts/logs/server.jsonl)."
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"smoke": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"properties": {
|
|
161
|
+
"checks": {
|
|
162
|
+
"description": "The requests of suwgate dev smoke (default /healthz and /api/health).",
|
|
163
|
+
"type": "array",
|
|
164
|
+
"minItems": 1,
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"required": ["path", "expect", "hint"],
|
|
169
|
+
"properties": {
|
|
170
|
+
"path": { "type": "string", "pattern": "^/" },
|
|
171
|
+
"expect": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1,
|
|
174
|
+
"description": "A regular expression the body must match on some line, next to status 200."
|
|
175
|
+
},
|
|
176
|
+
"hint": { "type": "string", "minLength": 1, "description": "What to look at when it fails." }
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"settings": {
|
|
185
|
+
"description": "Settings of a guard, by its id; the guard's own schema checks them.",
|
|
186
|
+
"type": "object",
|
|
187
|
+
"propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"$defs": {
|
|
191
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
192
|
+
"reason": { "type": "string", "pattern": "\\S", "description": "Why: a sentence a reviewer can judge." },
|
|
193
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
194
|
+
"relativePath": { "type": "string", "pattern": "^[^/\\\\][^\\\\]*$" }
|
|
195
|
+
}
|
|
196
|
+
}
|