@intentius/sql-yodeler 0.0.0-stage → 0.2.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 +202 -0
- package/README.md +112 -2
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +29 -0
- package/dist/bin.js.map +1 -0
- package/dist/chant/apply.d.ts +59 -0
- package/dist/chant/apply.js +116 -0
- package/dist/chant/apply.js.map +1 -0
- package/dist/chant/build.d.ts +34 -0
- package/dist/chant/build.js +48 -0
- package/dist/chant/build.js.map +1 -0
- package/dist/chant/drift.d.ts +112 -0
- package/dist/chant/drift.js +238 -0
- package/dist/chant/drift.js.map +1 -0
- package/dist/chant/plan.d.ts +45 -0
- package/dist/chant/plan.js +61 -0
- package/dist/chant/plan.js.map +1 -0
- package/dist/chant/process.d.ts +41 -0
- package/dist/chant/process.js +87 -0
- package/dist/chant/process.js.map +1 -0
- package/dist/chant/runnable.d.ts +19 -0
- package/dist/chant/runnable.js +47 -0
- package/dist/chant/runnable.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +99 -0
- package/dist/cli.js.map +1 -0
- package/dist/command.d.ts +23 -0
- package/dist/command.js +13 -0
- package/dist/command.js.map +1 -0
- package/dist/commands/apply.d.ts +3 -0
- package/dist/commands/apply.js +426 -0
- package/dist/commands/apply.js.map +1 -0
- package/dist/commands/approve.d.ts +5 -0
- package/dist/commands/approve.js +111 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/drift.d.ts +14 -0
- package/dist/commands/drift.js +267 -0
- package/dist/commands/drift.js.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.js +28 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.js +139 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/lint.d.ts +3 -0
- package/dist/commands/lint.js +202 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.js +50 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/new.d.ts +5 -0
- package/dist/commands/new.js +292 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/override.d.ts +3 -0
- package/dist/commands/override.js +118 -0
- package/dist/commands/override.js.map +1 -0
- package/dist/commands/plan.d.ts +3 -0
- package/dist/commands/plan.js +183 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/rebase.d.ts +3 -0
- package/dist/commands/rebase.js +167 -0
- package/dist/commands/rebase.js.map +1 -0
- package/dist/commands/repair.d.ts +14 -0
- package/dist/commands/repair.js +125 -0
- package/dist/commands/repair.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.js +54 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/config/define.d.ts +148 -0
- package/dist/config/define.js +20 -0
- package/dist/config/define.js.map +1 -0
- package/dist/config/index.d.ts +11 -0
- package/dist/config/index.js +12 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/load.d.ts +17 -0
- package/dist/config/load.js +162 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/settings.d.ts +53 -0
- package/dist/config/settings.js +116 -0
- package/dist/config/settings.js.map +1 -0
- package/dist/env-args.d.ts +24 -0
- package/dist/env-args.js +92 -0
- package/dist/env-args.js.map +1 -0
- package/dist/exit.d.ts +20 -0
- package/dist/exit.js +28 -0
- package/dist/exit.js.map +1 -0
- package/dist/history/client.d.ts +25 -0
- package/dist/history/client.js +42 -0
- package/dist/history/client.js.map +1 -0
- package/dist/history/ddl.d.ts +58 -0
- package/dist/history/ddl.js +100 -0
- package/dist/history/ddl.js.map +1 -0
- package/dist/history/index.d.ts +25 -0
- package/dist/history/index.js +26 -0
- package/dist/history/index.js.map +1 -0
- package/dist/history/lock.d.ts +104 -0
- package/dist/history/lock.js +230 -0
- package/dist/history/lock.js.map +1 -0
- package/dist/history/postgres/ddl.d.ts +22 -0
- package/dist/history/postgres/ddl.js +47 -0
- package/dist/history/postgres/ddl.js.map +1 -0
- package/dist/history/postgres/index.d.ts +12 -0
- package/dist/history/postgres/index.js +13 -0
- package/dist/history/postgres/index.js.map +1 -0
- package/dist/history/postgres/lock.d.ts +48 -0
- package/dist/history/postgres/lock.js +95 -0
- package/dist/history/postgres/lock.js.map +1 -0
- package/dist/history/postgres/store.d.ts +39 -0
- package/dist/history/postgres/store.js +68 -0
- package/dist/history/postgres/store.js.map +1 -0
- package/dist/history/rows.d.ts +96 -0
- package/dist/history/rows.js +73 -0
- package/dist/history/rows.js.map +1 -0
- package/dist/history/store.d.ts +72 -0
- package/dist/history/store.js +134 -0
- package/dist/history/store.js.map +1 -0
- package/dist/history/topology.d.ts +41 -0
- package/dist/history/topology.js +54 -0
- package/dist/history/topology.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/init/adopt.d.ts +70 -0
- package/dist/init/adopt.js +143 -0
- package/dist/init/adopt.js.map +1 -0
- package/dist/init/baseline.d.ts +61 -0
- package/dist/init/baseline.js +88 -0
- package/dist/init/baseline.js.map +1 -0
- package/dist/init/files.d.ts +23 -0
- package/dist/init/files.js +77 -0
- package/dist/init/files.js.map +1 -0
- package/dist/init/index.d.ts +16 -0
- package/dist/init/index.js +17 -0
- package/dist/init/index.js.map +1 -0
- package/dist/init/live.d.ts +39 -0
- package/dist/init/live.js +68 -0
- package/dist/init/live.js.map +1 -0
- package/dist/lint/check.d.ts +88 -0
- package/dist/lint/check.js +227 -0
- package/dist/lint/check.js.map +1 -0
- package/dist/lint/config.d.ts +21 -0
- package/dist/lint/config.js +43 -0
- package/dist/lint/config.js.map +1 -0
- package/dist/lint/index.d.ts +31 -0
- package/dist/lint/index.js +43 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/lint/project-rules.d.ts +19 -0
- package/dist/lint/project-rules.js +32 -0
- package/dist/lint/project-rules.js.map +1 -0
- package/dist/lint/report.d.ts +7 -0
- package/dist/lint/report.js +48 -0
- package/dist/lint/report.js.map +1 -0
- package/dist/lint/rules.d.ts +53 -0
- package/dist/lint/rules.js +42 -0
- package/dist/lint/rules.js.map +1 -0
- package/dist/lint/silences.d.ts +49 -0
- package/dist/lint/silences.js +91 -0
- package/dist/lint/silences.js.map +1 -0
- package/dist/lint/statements.d.ts +38 -0
- package/dist/lint/statements.js +120 -0
- package/dist/lint/statements.js.map +1 -0
- package/dist/mcp/server.d.ts +40 -0
- package/dist/mcp/server.js +106 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +72 -0
- package/dist/mcp/tools.js +178 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/migrations/checks.d.ts +28 -0
- package/dist/migrations/checks.js +97 -0
- package/dist/migrations/checks.js.map +1 -0
- package/dist/migrations/checksum.d.ts +56 -0
- package/dist/migrations/checksum.js +72 -0
- package/dist/migrations/checksum.js.map +1 -0
- package/dist/migrations/create.d.ts +75 -0
- package/dist/migrations/create.js +120 -0
- package/dist/migrations/create.js.map +1 -0
- package/dist/migrations/directory.d.ts +119 -0
- package/dist/migrations/directory.js +229 -0
- package/dist/migrations/directory.js.map +1 -0
- package/dist/migrations/document.d.ts +106 -0
- package/dist/migrations/document.js +83 -0
- package/dist/migrations/document.js.map +1 -0
- package/dist/migrations/index.d.ts +21 -0
- package/dist/migrations/index.js +22 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/pr/comment.d.ts +32 -0
- package/dist/pr/comment.js +99 -0
- package/dist/pr/comment.js.map +1 -0
- package/dist/pr/forge.d.ts +54 -0
- package/dist/pr/forge.js +119 -0
- package/dist/pr/forge.js.map +1 -0
- package/dist/pr/issue.d.ts +68 -0
- package/dist/pr/issue.js +107 -0
- package/dist/pr/issue.js.map +1 -0
- package/dist/pr/model.d.ts +99 -0
- package/dist/pr/model.js +137 -0
- package/dist/pr/model.js.map +1 -0
- package/dist/pr/render.d.ts +29 -0
- package/dist/pr/render.js +279 -0
- package/dist/pr/render.js.map +1 -0
- package/dist/project.d.ts +62 -0
- package/dist/project.js +92 -0
- package/dist/project.js.map +1 -0
- package/dist/rebase/index.d.ts +121 -0
- package/dist/rebase/index.js +390 -0
- package/dist/rebase/index.js.map +1 -0
- package/dist/rebase/repair.d.ts +41 -0
- package/dist/rebase/repair.js +68 -0
- package/dist/rebase/repair.js.map +1 -0
- package/dist/replay/clickhouse.d.ts +33 -0
- package/dist/replay/clickhouse.js +106 -0
- package/dist/replay/clickhouse.js.map +1 -0
- package/dist/replay/index.d.ts +39 -0
- package/dist/replay/index.js +57 -0
- package/dist/replay/index.js.map +1 -0
- package/dist/replay/postgres.d.ts +31 -0
- package/dist/replay/postgres.js +140 -0
- package/dist/replay/postgres.js.map +1 -0
- package/dist/replay/replay.d.ts +114 -0
- package/dist/replay/replay.js +98 -0
- package/dist/replay/replay.js.map +1 -0
- package/dist/replay/report.d.ts +18 -0
- package/dist/replay/report.js +72 -0
- package/dist/replay/report.js.map +1 -0
- package/dist/replay/shared.d.ts +28 -0
- package/dist/replay/shared.js +77 -0
- package/dist/replay/shared.js.map +1 -0
- package/dist/schemas.d.ts +34 -0
- package/dist/schemas.js +38 -0
- package/dist/schemas.js.map +1 -0
- package/dist/server.d.ts +40 -0
- package/dist/server.js +87 -0
- package/dist/server.js.map +1 -0
- package/dist/steps/backfill.d.ts +132 -0
- package/dist/steps/backfill.js +307 -0
- package/dist/steps/backfill.js.map +1 -0
- package/dist/steps/index.d.ts +52 -0
- package/dist/steps/index.js +52 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/steps/kinds.d.ts +101 -0
- package/dist/steps/kinds.js +143 -0
- package/dist/steps/kinds.js.map +1 -0
- package/dist/steps/postgres-migration.d.ts +95 -0
- package/dist/steps/postgres-migration.js +149 -0
- package/dist/steps/postgres-migration.js.map +1 -0
- package/dist/steps/rebuild.d.ts +97 -0
- package/dist/steps/rebuild.js +155 -0
- package/dist/steps/rebuild.js.map +1 -0
- package/dist/steps/run.d.ts +45 -0
- package/dist/steps/run.js +72 -0
- package/dist/steps/run.js.map +1 -0
- package/dist/topology/render.d.ts +17 -0
- package/dist/topology/render.js +17 -0
- package/dist/topology/render.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +11 -0
- package/dist/version.js.map +1 -0
- package/dist/versioned/approval.d.ts +35 -0
- package/dist/versioned/approval.js +53 -0
- package/dist/versioned/approval.js.map +1 -0
- package/dist/versioned/checks.d.ts +29 -0
- package/dist/versioned/checks.js +54 -0
- package/dist/versioned/checks.js.map +1 -0
- package/dist/versioned/clickhouse.d.ts +24 -0
- package/dist/versioned/clickhouse.js +42 -0
- package/dist/versioned/clickhouse.js.map +1 -0
- package/dist/versioned/digest.d.ts +77 -0
- package/dist/versioned/digest.js +69 -0
- package/dist/versioned/digest.js.map +1 -0
- package/dist/versioned/driver.d.ts +51 -0
- package/dist/versioned/driver.js +13 -0
- package/dist/versioned/driver.js.map +1 -0
- package/dist/versioned/engine.d.ts +206 -0
- package/dist/versioned/engine.js +370 -0
- package/dist/versioned/engine.js.map +1 -0
- package/dist/versioned/explain.d.ts +123 -0
- package/dist/versioned/explain.js +294 -0
- package/dist/versioned/explain.js.map +1 -0
- package/dist/versioned/index.d.ts +46 -0
- package/dist/versioned/index.js +77 -0
- package/dist/versioned/index.js.map +1 -0
- package/dist/versioned/op.d.ts +72 -0
- package/dist/versioned/op.js +185 -0
- package/dist/versioned/op.js.map +1 -0
- package/dist/versioned/policy.d.ts +67 -0
- package/dist/versioned/policy.js +161 -0
- package/dist/versioned/policy.js.map +1 -0
- package/dist/versioned/postgres/catalog.d.ts +33 -0
- package/dist/versioned/postgres/catalog.js +34 -0
- package/dist/versioned/postgres/catalog.js.map +1 -0
- package/dist/versioned/postgres/driver.d.ts +71 -0
- package/dist/versioned/postgres/driver.js +140 -0
- package/dist/versioned/postgres/driver.js.map +1 -0
- package/dist/versioned/postgres/executor.d.ts +104 -0
- package/dist/versioned/postgres/executor.js +172 -0
- package/dist/versioned/postgres/executor.js.map +1 -0
- package/dist/versioned/postgres/index.d.ts +11 -0
- package/dist/versioned/postgres/index.js +12 -0
- package/dist/versioned/postgres/index.js.map +1 -0
- package/dist/versioned/postgres/waits.d.ts +46 -0
- package/dist/versioned/postgres/waits.js +78 -0
- package/dist/versioned/postgres/waits.js.map +1 -0
- package/dist/versioned/report.d.ts +25 -0
- package/dist/versioned/report.js +84 -0
- package/dist/versioned/report.js.map +1 -0
- package/dist/versioned/stand-down.d.ts +30 -0
- package/dist/versioned/stand-down.js +56 -0
- package/dist/versioned/stand-down.js.map +1 -0
- package/dist/versioned/state.d.ts +108 -0
- package/dist/versioned/state.js +153 -0
- package/dist/versioned/state.js.map +1 -0
- package/package.json +61 -4
- package/schemas/apply.schema.json +269 -0
- package/schemas/common.schema.json +213 -0
- package/schemas/drift.schema.json +36 -0
- package/schemas/init.schema.json +31 -0
- package/schemas/lint-rules.schema.json +54 -0
- package/schemas/lint.schema.json +290 -0
- package/schemas/mcp.schema.json +70 -0
- package/schemas/new.schema.json +71 -0
- package/schemas/plan.schema.json +371 -0
- package/schemas/rebase.schema.json +54 -0
- package/schemas/repair.schema.json +20 -0
- package/schemas/status.schema.json +310 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/sql-yodeler/schemas/v1/lint.schema.json",
|
|
4
|
+
"title": "yodel lint --json",
|
|
5
|
+
"description": "Version 1. The findings, the silences each migration holds, and with --replay the replay check's result. yodel lint --rules --json prints lint-rules.schema.json instead. Within a version, fields are only added; a reader ignores fields it does not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"status",
|
|
10
|
+
"dialect",
|
|
11
|
+
"migrations",
|
|
12
|
+
"errors",
|
|
13
|
+
"warnings",
|
|
14
|
+
"silenced",
|
|
15
|
+
"findings",
|
|
16
|
+
"silences"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"status": {
|
|
20
|
+
"description": "failed when a finding at level error is not silenced: the command exits 3.",
|
|
21
|
+
"enum": [
|
|
22
|
+
"passed",
|
|
23
|
+
"failed"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"environment": {
|
|
27
|
+
"description": "With --env: the environment whose history the migrations were compared with.",
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"dialect": {
|
|
31
|
+
"oneOf": [
|
|
32
|
+
{
|
|
33
|
+
"$ref": "common.schema.json#/$defs/dialect"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "null"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"migrations": {
|
|
41
|
+
"description": "Every migration read, sorted by id.",
|
|
42
|
+
"$ref": "common.schema.json#/$defs/stringList"
|
|
43
|
+
},
|
|
44
|
+
"errors": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"warnings": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 0
|
|
51
|
+
},
|
|
52
|
+
"silenced": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 0
|
|
55
|
+
},
|
|
56
|
+
"findings": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": [
|
|
62
|
+
"rule",
|
|
63
|
+
"level",
|
|
64
|
+
"message"
|
|
65
|
+
],
|
|
66
|
+
"properties": {
|
|
67
|
+
"rule": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"level": {
|
|
71
|
+
"enum": [
|
|
72
|
+
"error",
|
|
73
|
+
"warning"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"message": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"migration": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"step": {
|
|
83
|
+
"type": "integer"
|
|
84
|
+
},
|
|
85
|
+
"object": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"line": {
|
|
89
|
+
"type": "integer"
|
|
90
|
+
},
|
|
91
|
+
"silenced": {
|
|
92
|
+
"description": "A -- yodel:allow line silenced it: the reason given. A silenced finding fails nothing.",
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"silences": {
|
|
99
|
+
"description": "The silences each migration's migration.sql holds, by migration id.",
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": [
|
|
107
|
+
"step",
|
|
108
|
+
"rule",
|
|
109
|
+
"reason",
|
|
110
|
+
"line"
|
|
111
|
+
],
|
|
112
|
+
"properties": {
|
|
113
|
+
"step": {
|
|
114
|
+
"type": "integer"
|
|
115
|
+
},
|
|
116
|
+
"rule": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"reason": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"line": {
|
|
123
|
+
"type": "integer"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"replay": {
|
|
130
|
+
"$ref": "#/$defs/replay"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"$defs": {
|
|
134
|
+
"replayed": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": [
|
|
138
|
+
"id",
|
|
139
|
+
"statements",
|
|
140
|
+
"ran",
|
|
141
|
+
"skipped"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"statements": {
|
|
148
|
+
"type": "integer"
|
|
149
|
+
},
|
|
150
|
+
"ran": {
|
|
151
|
+
"$ref": "common.schema.json#/$defs/stringList"
|
|
152
|
+
},
|
|
153
|
+
"skipped": {
|
|
154
|
+
"$ref": "common.schema.json#/$defs/stringList"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"replay": {
|
|
159
|
+
"description": "With --replay: the history replayed into an empty database, migration by migration, against each one's recorded schema.",
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": [
|
|
162
|
+
"dialect",
|
|
163
|
+
"where",
|
|
164
|
+
"scope",
|
|
165
|
+
"reset",
|
|
166
|
+
"kept",
|
|
167
|
+
"matched",
|
|
168
|
+
"total",
|
|
169
|
+
"outcome",
|
|
170
|
+
"ok"
|
|
171
|
+
],
|
|
172
|
+
"unevaluatedProperties": false,
|
|
173
|
+
"properties": {
|
|
174
|
+
"dialect": {
|
|
175
|
+
"$ref": "common.schema.json#/$defs/dialect"
|
|
176
|
+
},
|
|
177
|
+
"where": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"scope": {
|
|
181
|
+
"$ref": "common.schema.json#/$defs/stringList"
|
|
182
|
+
},
|
|
183
|
+
"reset": {
|
|
184
|
+
"type": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"kept": {
|
|
187
|
+
"type": "boolean"
|
|
188
|
+
},
|
|
189
|
+
"matched": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"items": {
|
|
192
|
+
"$ref": "#/$defs/replayed"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"total": {
|
|
196
|
+
"type": "integer"
|
|
197
|
+
},
|
|
198
|
+
"outcome": {
|
|
199
|
+
"enum": [
|
|
200
|
+
"matches",
|
|
201
|
+
"differs",
|
|
202
|
+
"failed",
|
|
203
|
+
"unreplayable"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"ok": {
|
|
207
|
+
"type": "boolean"
|
|
208
|
+
},
|
|
209
|
+
"message": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"oneOf": [
|
|
214
|
+
{
|
|
215
|
+
"properties": {
|
|
216
|
+
"outcome": {
|
|
217
|
+
"const": "matches"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"type": "object"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"required": [
|
|
224
|
+
"migration",
|
|
225
|
+
"changes"
|
|
226
|
+
],
|
|
227
|
+
"properties": {
|
|
228
|
+
"outcome": {
|
|
229
|
+
"const": "differs"
|
|
230
|
+
},
|
|
231
|
+
"migration": {
|
|
232
|
+
"$ref": "#/$defs/replayed"
|
|
233
|
+
},
|
|
234
|
+
"changes": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"$ref": "common.schema.json#/$defs/change"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"type": "object"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"required": [
|
|
245
|
+
"migration",
|
|
246
|
+
"step",
|
|
247
|
+
"error"
|
|
248
|
+
],
|
|
249
|
+
"properties": {
|
|
250
|
+
"outcome": {
|
|
251
|
+
"const": "failed"
|
|
252
|
+
},
|
|
253
|
+
"migration": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"step": {
|
|
257
|
+
"type": "integer"
|
|
258
|
+
},
|
|
259
|
+
"error": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"type": "object"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"required": [
|
|
267
|
+
"migration",
|
|
268
|
+
"step",
|
|
269
|
+
"reason"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"outcome": {
|
|
273
|
+
"const": "unreplayable"
|
|
274
|
+
},
|
|
275
|
+
"migration": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"step": {
|
|
279
|
+
"type": "integer"
|
|
280
|
+
},
|
|
281
|
+
"reason": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"type": "object"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/sql-yodeler/schemas/v1/mcp.schema.json",
|
|
4
|
+
"title": "A yodel mcp tool result",
|
|
5
|
+
"description": "Version 1. Every tool of yodel mcp returns this envelope, as the call's structuredContent and as its text. results follows the schema resultsSchema names: the command's own (status, plan, lint, drift) or a definition here (history, explain). Within a version, fields are only added; a reader ignores fields it does not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "tool", "command", "exit", "results", "resultsSchema"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "description": "The envelope's version.", "const": 1 },
|
|
11
|
+
"tool": { "enum": ["status", "plan", "lint", "drift", "history", "explain"] },
|
|
12
|
+
"command": { "description": "The yodel command line the tool ran.", "type": "string" },
|
|
13
|
+
"exit": { "description": "The command's exit code, the same as on a terminal (yodel --help lists them).", "type": "integer" },
|
|
14
|
+
"results": { "description": "What the command printed with --json; null when it printed nothing (it failed: see error)." },
|
|
15
|
+
"resultsSchema": { "description": "The $id of the schema results follows.", "type": "string" },
|
|
16
|
+
"error": { "description": "What the command wrote to stderr: why it failed when results is null, else notices.", "type": "string" },
|
|
17
|
+
"forPerson": {
|
|
18
|
+
"description": "Steps that belong to a person, each with the command the person runs. An agent shows them and never runs them.",
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["action", "command"],
|
|
24
|
+
"properties": { "action": { "type": "string" }, "command": { "type": "string" } }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"history": {
|
|
30
|
+
"description": "The history tool: the migrations the environment's history records applied, from yodel status.",
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["environment", "history", "applied"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"environment": { "type": "string" },
|
|
36
|
+
"server": { "$ref": "common.schema.json#/$defs/server" },
|
|
37
|
+
"history": { "$ref": "status.schema.json#/$defs/report/properties/history" },
|
|
38
|
+
"applied": { "$ref": "status.schema.json#/$defs/report/properties/applied" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"explain": {
|
|
42
|
+
"description": "The explain tool: a lint rule, or an exit code.",
|
|
43
|
+
"oneOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["topic", "kind", "rule", "docs"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"topic": { "type": "string" },
|
|
50
|
+
"kind": { "const": "lint-rule" },
|
|
51
|
+
"rule": { "$ref": "lint-rules.schema.json#/items" },
|
|
52
|
+
"docs": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["topic", "kind", "code", "meaning", "docs"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"topic": { "type": "string" },
|
|
61
|
+
"kind": { "const": "exit-code" },
|
|
62
|
+
"code": { "type": "integer" },
|
|
63
|
+
"meaning": { "type": "string" },
|
|
64
|
+
"docs": { "type": "string" }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/sql-yodeler/schemas/v1/new.schema.json",
|
|
4
|
+
"title": "yodel new <name> --json",
|
|
5
|
+
"description": "Version 1. The migration written (written true), or why none was: a backfill template to fill in, a --replace that kept the migration, or no change from the newest migration's recorded schema. Within a version, fields are only added; a reader ignores fields it does not know.",
|
|
6
|
+
"oneOf": [{ "$ref": "#/$defs/written" }, { "$ref": "#/$defs/template" }, { "$ref": "#/$defs/kept" }, { "$ref": "#/$defs/unchanged" }],
|
|
7
|
+
"$defs": {
|
|
8
|
+
"written": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": ["written", "id", "path", "parent", "checksum", "dialect", "statements", "ops", "manual", "hints", "checks"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"written": { "const": true },
|
|
14
|
+
"id": { "type": "string" },
|
|
15
|
+
"path": { "type": "string" },
|
|
16
|
+
"parent": { "type": ["string", "null"] },
|
|
17
|
+
"checksum": { "type": "string" },
|
|
18
|
+
"dialect": { "$ref": "common.schema.json#/$defs/dialect" },
|
|
19
|
+
"statements": { "type": "integer", "minimum": 0 },
|
|
20
|
+
"ops": {
|
|
21
|
+
"description": "The Op steps written, which yodel apply runs or refuses.",
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["op", "object", "name", "rules"],
|
|
27
|
+
"properties": { "op": { "type": "string" }, "object": { "type": "string" }, "name": { "type": "string" }, "rules": { "$ref": "common.schema.json#/$defs/stringList" } }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"manual": {
|
|
31
|
+
"description": "The manual steps written: yodel apply refuses them.",
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["object", "name", "rules", "detail"],
|
|
37
|
+
"properties": { "object": { "type": "string" }, "name": { "type": "string" }, "rules": { "$ref": "common.schema.json#/$defs/stringList" }, "detail": { "type": "string" } }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"hints": { "$ref": "common.schema.json#/$defs/stringList" },
|
|
41
|
+
"checks": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/check" } }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"template": {
|
|
45
|
+
"description": "--backfill named a file that is not there: the template was written to it, and no migration.",
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["written", "template"],
|
|
49
|
+
"properties": { "written": { "const": false }, "template": { "type": "string" } }
|
|
50
|
+
},
|
|
51
|
+
"kept": {
|
|
52
|
+
"description": "--replace: the replacement would be the same, so the migration was kept.",
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["written", "replaced", "kept"],
|
|
56
|
+
"properties": { "written": { "const": false }, "replaced": { "type": "null" }, "kept": { "type": "string" } }
|
|
57
|
+
},
|
|
58
|
+
"unchanged": {
|
|
59
|
+
"description": "The declared schema matches the newest migration's recorded schema.",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["written", "parent", "dialect", "hints"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"written": { "const": false },
|
|
65
|
+
"parent": { "type": ["string", "null"] },
|
|
66
|
+
"dialect": { "$ref": "common.schema.json#/$defs/dialect" },
|
|
67
|
+
"hints": { "$ref": "common.schema.json#/$defs/stringList" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|