@contractkit/core
Advanced tools
| > @contractkit/core@0.16.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > @contractkit/core@0.17.0 build:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > eslint --max-warnings=0 && pnpm run build | ||
| > @contractkit/core@0.16.0 build /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > @contractkit/core@0.17.0 build /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration && cp src/contractkit.ohm dist/ | ||
@@ -14,7 +14,7 @@ | ||
| [34mESM[39m Build start | ||
| [32mESM[39m [1mdist/index.js [22m[32m88.95 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m211.52 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 80ms | ||
| [32mESM[39m [1mdist/index.js [22m[32m88.81 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m211.10 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 75ms | ||
| [34mDTS[39m Build start | ||
| [32mDTS[39m ⚡️ Build success in 1235ms | ||
| [32mDTS[39m [1mdist/index.d.ts [22m[32m32.62 KB[39m | ||
| [32mDTS[39m ⚡️ Build success in 1271ms | ||
| [32mDTS[39m [1mdist/index.d.ts [22m[32m32.56 KB[39m |
| > @contractkit/core@0.16.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > @contractkit/core@0.17.0 test:ci /home/runner/work/ContractKit/ContractKit/packages/contractkit | ||
| > vitest run --coverage | ||
@@ -9,14 +9,14 @@ | ||
| [32m✓[39m tests/incremental.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 22[2mms[22m[39m | ||
| [32m✓[39m tests/apply-options-defaults.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 104[2mms[22m[39m | ||
| [32m✓[39m tests/validate-inheritance.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 59[2mms[22m[39m | ||
| [32m✓[39m tests/incremental.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 21[2mms[22m[39m | ||
| [32m✓[39m tests/apply-options-defaults.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 85[2mms[22m[39m | ||
| [32m✓[39m tests/validate-inheritance.test.ts [2m([22m[2m16 tests[22m[2m)[22m[32m 61[2mms[22m[39m | ||
| [32m✓[39m tests/parser-ck.test.ts [2m([22m[2m170 tests[22m[2m)[22m[33m 523[2mms[22m[39m | ||
| [32m✓[39m tests/diagnostics.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 15[2mms[22m[39m | ||
| [32m✓[39m tests/parser-ck.test.ts [2m([22m[2m170 tests[22m[2m)[22m[33m 595[2mms[22m[39m | ||
| [32m✓[39m tests/apply-variable-substitution.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 38[2mms[22m[39m | ||
| [32m✓[39m tests/validate-discriminated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 28[2mms[22m[39m | ||
| [32m✓[39m tests/apply-variable-substitution.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 40[2mms[22m[39m | ||
| [32m✓[39m tests/validate-discriminated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 24[2mms[22m[39m | ||
| [2m Test Files [22m [1m[32m7 passed[39m[22m[90m (7)[39m | ||
| [2m Tests [22m [1m[32m241 passed[39m[22m[90m (241)[39m | ||
| [2m Start at [22m 11:38:13 | ||
| [2m Duration [22m 2.08s[2m (transform 564ms, setup 0ms, import 2.78s, tests 859ms, environment 1ms)[22m | ||
| [2m Start at [22m 13:02:49 | ||
| [2m Duration [22m 1.92s[2m (transform 450ms, setup 0ms, import 2.55s, tests 769ms, environment 2ms)[22m | ||
@@ -27,3 +27,3 @@ [34m % [39m[2mCoverage report from [22m[33mv8[39m | ||
| -------------------|---------|----------|---------|---------|------------------- | ||
| All files | 84.68 | 73.3 | 88.88 | 87.07 | | ||
| All files | 84.71 | 73.3 | 89.34 | 87.13 | | ||
| ...ns-defaults.ts | 98 | 95.34 | 100 | 100 | 67,93 | ||
@@ -37,3 +37,3 @@ ...ubstitution.ts | 97.56 | 94.87 | 100 | 100 | 26,55 | ||
| parser.ts | 100 | 66.66 | 100 | 100 | 25-26 | ||
| semantics.ts | 92.55 | 79.37 | 92.52 | 95.5 | ...1200,1220-1224 | ||
| semantics.ts | 92.66 | 79.37 | 93.39 | 95.65 | ...1193,1213-1217 | ||
| type-builders.ts | 87.38 | 68.21 | 100 | 87.91 | ...40,144-147,197 | ||
@@ -40,0 +40,0 @@ ...inheritance.ts | 68.45 | 58.51 | 71.42 | 70.68 | ...,88-90,180-227 |
+30
-0
| # @contractkit/core | ||
| ## 0.17.0 | ||
| ### Minor Changes | ||
| - 79af33b: **Breaking:** Replace the `roles` field in `security: { ... }` blocks with `requireMfa: boolean`. | ||
| The `security` declaration on operations, routes, and the file-level `options { security: { ... } }` block no longer accepts a `roles:` line. The new field is `requireMfa: true | false`. Existing `.ck` files that use `roles:` will fail to parse. | ||
| ```ck | ||
| # Before | ||
| security: { | ||
| roles: admin editor | ||
| } | ||
| # After | ||
| security: { | ||
| requireMfa: true | ||
| } | ||
| ``` | ||
| **`@contractkit/core`** — `SecurityFields` interface drops `roles` / `rolesDescription` and adds `requireMfa` / `requireMfaDescription`. The grammar's `SecurityRolesLine` is replaced by `SecurityRequireMfaLine` (`requireMfaKw ":" booleanLit`). `security: none` continues to work. | ||
| **`@contractkit/plugin-typescript`** — Generated Koa routers now emit `requireSecurity({ requireMfa: <bool> })` when `requireMfa` is set, and bare `requireSecurity()` for unannotated routes (previously `requireSecurity({ roles: [...] })` / `requireSecurity({ })`). The generated code matches the updated serverkit `SecurityOptions = { requireMfa: boolean }` signature; consumers must upgrade serverkit alongside. | ||
| **`@contractkit/prettier-plugin`** — Formats `requireMfa: true|false` lines inside security blocks. Files containing `roles:` will no longer round-trip and will surface as parse errors. | ||
| **`@contractkit/plugin-markdown`** — The "Security: authenticated" admonition now shows `requireMfa: <bool>` instead of `roles: <list>`. | ||
| **`@contractkit/openapi-to-ck`** — `convertSecurity` no longer extracts OpenAPI scopes into a `roles` list (those don't map onto MFA semantics). Any non-empty OpenAPI `security` requirement now collapses to `security: {}` (authenticated, no MFA flag). | ||
| ## 0.16.0 | ||
@@ -4,0 +34,0 @@ |
@@ -358,3 +358,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -361,0 +361,0 @@ <script src="prettify.js"></script> |
@@ -316,3 +316,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -319,0 +319,0 @@ <script src="prettify.js"></script> |
@@ -937,8 +937,8 @@ | ||
| | ||
| /** Constrained security declaration — roles-only auth fields. */ | ||
| /** Constrained security declaration. */ | ||
| export interface SecurityFields { | ||
| /** Allowlisted role names required for this endpoint (e.g. `["admin", "moderator"]`). */ | ||
| roles?: string[]; | ||
| /** Inline comment attached to the `roles:` line. */ | ||
| rolesDescription?: string; | ||
| /** Whether this endpoint requires MFA. */ | ||
| requireMfa?: boolean; | ||
| /** Inline comment attached to the `requireMfa:` line. */ | ||
| requireMfaDescription?: string; | ||
| loc: SourceLocation; | ||
@@ -1115,3 +1115,3 @@ } | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -1118,0 +1118,0 @@ <script src="prettify.js"></script> |
+59
-62
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <coverage generated="1778153895258" clover="3.2.0"> | ||
| <project timestamp="1778153895258" name="All files"> | ||
| <metrics statements="1060" coveredstatements="923" conditionals="723" coveredconditionals="530" methods="198" coveredmethods="176" elements="1981" coveredelements="1629" complexity="0" loc="1060" ncloc="1060" packages="1" files="12" classes="12"/> | ||
| <coverage generated="1778245371659" clover="3.2.0"> | ||
| <project timestamp="1778245371659" name="All files"> | ||
| <metrics statements="1057" coveredstatements="921" conditionals="723" coveredconditionals="530" methods="197" coveredmethods="176" elements="1977" coveredelements="1627" complexity="0" loc="1057" ncloc="1057" packages="1" files="12" classes="12"/> | ||
| <file name="apply-options-defaults.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/apply-options-defaults.ts"> | ||
@@ -196,3 +196,3 @@ <metrics statements="38" coveredstatements="38" conditionals="43" coveredconditionals="41" methods="9" coveredmethods="9"/> | ||
| <file name="semantics.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/semantics.ts"> | ||
| <metrics statements="579" coveredstatements="553" conditionals="286" coveredconditionals="227" methods="107" coveredmethods="99"/> | ||
| <metrics statements="576" coveredstatements="551" conditionals="286" coveredconditionals="227" methods="106" coveredmethods="99"/> | ||
| <line num="36" count="49" type="stmt"/> | ||
@@ -202,3 +202,3 @@ <line num="43" count="662" type="stmt"/> | ||
| <line num="45" count="662" type="stmt"/> | ||
| <line num="46" count="218871" type="cond" truecount="2" falsecount="0"/> | ||
| <line num="46" count="218891" type="cond" truecount="2" falsecount="0"/> | ||
| <line num="48" count="662" type="stmt"/> | ||
@@ -716,64 +716,61 @@ <line num="61" count="11" type="stmt"/> | ||
| <line num="1095" count="10" type="stmt"/> | ||
| <line num="1096" count="10" type="stmt"/> | ||
| <line num="1097" count="13" type="stmt"/> | ||
| <line num="1100" count="10" type="cond" truecount="2" falsecount="0"/> | ||
| <line num="1101" count="1" type="stmt"/> | ||
| <line num="1103" count="10" type="stmt"/> | ||
| <line num="1107" count="0" type="stmt"/> | ||
| <line num="1111" count="1" type="stmt"/> | ||
| <line num="1112" count="1" type="cond" truecount="2" falsecount="2"/> | ||
| <line num="1113" count="1" type="stmt"/> | ||
| <line num="1119" count="13" type="stmt"/> | ||
| <line num="1120" count="13" type="stmt"/> | ||
| <line num="1097" count="10" type="cond" truecount="2" falsecount="0"/> | ||
| <line num="1098" count="1" type="stmt"/> | ||
| <line num="1100" count="10" type="stmt"/> | ||
| <line num="1104" count="1" type="stmt"/> | ||
| <line num="1105" count="1" type="cond" truecount="2" falsecount="2"/> | ||
| <line num="1106" count="1" type="stmt"/> | ||
| <line num="1112" count="13" type="stmt"/> | ||
| <line num="1113" count="13" type="stmt"/> | ||
| <line num="1114" count="13" type="stmt"/> | ||
| <line num="1115" count="13" type="stmt"/> | ||
| <line num="1116" count="17" type="stmt"/> | ||
| <line num="1117" count="17" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1118" count="17" type="stmt"/> | ||
| <line num="1119" count="17" type="stmt"/> | ||
| <line num="1121" count="13" type="stmt"/> | ||
| <line num="1122" count="13" type="stmt"/> | ||
| <line num="1123" count="17" type="stmt"/> | ||
| <line num="1124" count="17" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1125" count="17" type="stmt"/> | ||
| <line num="1126" count="17" type="stmt"/> | ||
| <line num="1128" count="13" type="stmt"/> | ||
| <line num="1132" count="17" type="stmt"/> | ||
| <line num="1133" count="17" type="stmt"/> | ||
| <line num="1134" count="17" type="stmt"/> | ||
| <line num="1138" count="15" type="stmt"/> | ||
| <line num="1142" count="2" type="stmt"/> | ||
| <line num="1146" count="1" type="stmt"/> | ||
| <line num="1150" count="1" type="stmt"/> | ||
| <line num="1154" count="6" type="stmt"/> | ||
| <line num="1155" count="6" type="stmt"/> | ||
| <line num="1127" count="17" type="stmt"/> | ||
| <line num="1131" count="15" type="stmt"/> | ||
| <line num="1135" count="2" type="stmt"/> | ||
| <line num="1139" count="1" type="stmt"/> | ||
| <line num="1143" count="1" type="stmt"/> | ||
| <line num="1147" count="6" type="stmt"/> | ||
| <line num="1148" count="6" type="stmt"/> | ||
| <line num="1149" count="6" type="stmt"/> | ||
| <line num="1150" count="6" type="stmt"/> | ||
| <line num="1151" count="7" type="stmt"/> | ||
| <line num="1152" count="7" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1153" count="7" type="stmt"/> | ||
| <line num="1154" count="7" type="stmt"/> | ||
| <line num="1156" count="6" type="stmt"/> | ||
| <line num="1157" count="6" type="stmt"/> | ||
| <line num="1158" count="7" type="stmt"/> | ||
| <line num="1159" count="7" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1160" count="7" type="stmt"/> | ||
| <line num="1161" count="7" type="stmt"/> | ||
| <line num="1163" count="6" type="stmt"/> | ||
| <line num="1167" count="1" type="stmt"/> | ||
| <line num="1160" count="1" type="stmt"/> | ||
| <line num="1161" count="1" type="stmt"/> | ||
| <line num="1162" count="1" type="stmt"/> | ||
| <line num="1163" count="1" type="stmt"/> | ||
| <line num="1164" count="2" type="stmt"/> | ||
| <line num="1165" count="2" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1166" count="2" type="stmt"/> | ||
| <line num="1168" count="1" type="stmt"/> | ||
| <line num="1169" count="1" type="stmt"/> | ||
| <line num="1170" count="1" type="stmt"/> | ||
| <line num="1171" count="2" type="stmt"/> | ||
| <line num="1172" count="2" type="cond" truecount="1" falsecount="1"/> | ||
| <line num="1173" count="2" type="stmt"/> | ||
| <line num="1175" count="1" type="stmt"/> | ||
| <line num="1179" count="7" type="stmt"/> | ||
| <line num="1180" count="7" type="stmt"/> | ||
| <line num="1181" count="7" type="stmt"/> | ||
| <line num="1182" count="7" type="cond" truecount="3" falsecount="1"/> | ||
| <line num="1183" count="7" type="stmt"/> | ||
| <line num="1184" count="7" type="stmt"/> | ||
| <line num="1190" count="50" type="stmt"/> | ||
| <line num="1191" count="50" type="stmt"/> | ||
| <line num="1192" count="50" type="stmt"/> | ||
| <line num="1193" count="50" type="stmt"/> | ||
| <line num="1194" count="32" type="stmt"/> | ||
| <line num="1196" count="50" type="stmt"/> | ||
| <line num="1200" count="0" type="stmt"/> | ||
| <line num="1204" count="18" type="stmt"/> | ||
| <line num="1208" count="7" type="stmt"/> | ||
| <line num="1212" count="4" type="stmt"/> | ||
| <line num="1216" count="3" type="stmt"/> | ||
| <line num="1220" count="0" type="stmt"/> | ||
| <line num="1224" count="0" type="stmt"/> | ||
| <line num="1228" count="5" type="stmt"/> | ||
| <line num="1172" count="7" type="stmt"/> | ||
| <line num="1173" count="7" type="stmt"/> | ||
| <line num="1174" count="7" type="stmt"/> | ||
| <line num="1175" count="7" type="cond" truecount="3" falsecount="1"/> | ||
| <line num="1176" count="7" type="stmt"/> | ||
| <line num="1177" count="7" type="stmt"/> | ||
| <line num="1183" count="50" type="stmt"/> | ||
| <line num="1184" count="50" type="stmt"/> | ||
| <line num="1185" count="50" type="stmt"/> | ||
| <line num="1186" count="50" type="stmt"/> | ||
| <line num="1187" count="32" type="stmt"/> | ||
| <line num="1189" count="50" type="stmt"/> | ||
| <line num="1193" count="0" type="stmt"/> | ||
| <line num="1197" count="18" type="stmt"/> | ||
| <line num="1201" count="7" type="stmt"/> | ||
| <line num="1205" count="4" type="stmt"/> | ||
| <line num="1209" count="3" type="stmt"/> | ||
| <line num="1213" count="0" type="stmt"/> | ||
| <line num="1217" count="0" type="stmt"/> | ||
| <line num="1221" count="5" type="stmt"/> | ||
| </file> | ||
@@ -780,0 +777,0 @@ <file name="type-builders.ts" path="/home/runner/work/ContractKit/ContractKit/packages/contractkit/src/type-builders.ts"> |
@@ -145,3 +145,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -148,0 +148,0 @@ <script src="prettify.js"></script> |
@@ -187,3 +187,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -190,0 +190,0 @@ <script src="prettify.js"></script> |
@@ -154,3 +154,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -157,0 +157,0 @@ <script src="prettify.js"></script> |
@@ -670,3 +670,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -673,0 +673,0 @@ <script src="prettify.js"></script> |
+14
-14
@@ -26,5 +26,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">84.68% </span> | ||
| <span class="strong">84.71% </span> | ||
| <span class="quiet">Statements</span> | ||
| <span class='fraction'>1056/1247</span> | ||
| <span class='fraction'>1053/1243</span> | ||
| </div> | ||
@@ -41,5 +41,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">88.88% </span> | ||
| <span class="strong">89.34% </span> | ||
| <span class="quiet">Functions</span> | ||
| <span class='fraction'>176/198</span> | ||
| <span class='fraction'>176/197</span> | ||
| </div> | ||
@@ -49,5 +49,5 @@ | ||
| <div class='fl pad1y space-right2'> | ||
| <span class="strong">87.07% </span> | ||
| <span class="strong">87.13% </span> | ||
| <span class="quiet">Lines</span> | ||
| <span class='fraction'>923/1060</span> | ||
| <span class='fraction'>921/1057</span> | ||
| </div> | ||
@@ -206,13 +206,13 @@ | ||
| <td class="file high" data-value="semantics.ts"><a href="semantics.ts.html">semantics.ts</a></td> | ||
| <td data-value="92.55" class="pic high"> | ||
| <td data-value="92.66" class="pic high"> | ||
| <div class="chart"><div class="cover-fill" style="width: 92%"></div><div class="cover-empty" style="width: 8%"></div></div> | ||
| </td> | ||
| <td data-value="92.55" class="pct high">92.55%</td> | ||
| <td data-value="658" class="abs high">609/658</td> | ||
| <td data-value="92.66" class="pct high">92.66%</td> | ||
| <td data-value="654" class="abs high">606/654</td> | ||
| <td data-value="79.37" class="pct medium">79.37%</td> | ||
| <td data-value="286" class="abs medium">227/286</td> | ||
| <td data-value="92.52" class="pct high">92.52%</td> | ||
| <td data-value="107" class="abs high">99/107</td> | ||
| <td data-value="95.5" class="pct high">95.5%</td> | ||
| <td data-value="579" class="abs high">553/579</td> | ||
| <td data-value="93.39" class="pct high">93.39%</td> | ||
| <td data-value="106" class="abs high">99/106</td> | ||
| <td data-value="95.65" class="pct high">95.65%</td> | ||
| <td data-value="576" class="abs high">551/576</td> | ||
| </tr> | ||
@@ -273,3 +273,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -276,0 +276,0 @@ <script src="prettify.js"></script> |
@@ -169,3 +169,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -172,0 +172,0 @@ <script src="prettify.js"></script> |
@@ -667,3 +667,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -670,0 +670,0 @@ <script src="prettify.js"></script> |
@@ -763,3 +763,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -766,0 +766,0 @@ <script src="prettify.js"></script> |
@@ -718,3 +718,3 @@ | ||
| <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> | ||
| at 2026-05-07T11:38:15.239Z | ||
| at 2026-05-08T13:02:51.644Z | ||
| </div> | ||
@@ -721,0 +721,0 @@ <script src="prettify.js"></script> |
+5
-5
@@ -108,8 +108,8 @@ export interface SourceLocation { | ||
| } | ||
| /** Constrained security declaration — roles-only auth fields. */ | ||
| /** Constrained security declaration. */ | ||
| export interface SecurityFields { | ||
| /** Allowlisted role names required for this endpoint (e.g. `["admin", "moderator"]`). */ | ||
| roles?: string[]; | ||
| /** Inline comment attached to the `roles:` line. */ | ||
| rolesDescription?: string; | ||
| /** Whether this endpoint requires MFA. */ | ||
| requireMfa?: boolean; | ||
| /** Inline comment attached to the `requireMfa:` line. */ | ||
| requireMfaDescription?: string; | ||
| loc: SourceLocation; | ||
@@ -116,0 +116,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../src/ast.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAmB3C,CAAC;AAIH,MAAM,MAAM,gBAAgB,GACtB,cAAc,GACd,aAAa,GACb,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,aAAa,GACb,0BAA0B,GAC1B,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,GACpB,YAAY,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EACE,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,GACV,UAAU,GACV,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,GAAG,CAAC,EAAE,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,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kIAAkI;IAClI,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACxC,uIAAuI;IACvI,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACzC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CAChB"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"semantics.d.ts","sourceRoot":"","sources":["../src/semantics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAqErD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,8BAooC/C"} | ||
| {"version":3,"file":"semantics.d.ts","sourceRoot":"","sources":["../src/semantics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAqErD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,8BA6nC/C"} |
+1
-1
| { | ||
| "name": "@contractkit/core", | ||
| "version": "0.16.0", | ||
| "version": "0.17.0", | ||
| "description": "Core DSL compiler library: grammar-driven parser, codegen, and validation", | ||
@@ -5,0 +5,0 @@ "author": { |
+5
-5
@@ -178,8 +178,8 @@ // ─── Shared ──────────────────────────────────────────────────────────────── | ||
| /** Constrained security declaration — roles-only auth fields. */ | ||
| /** Constrained security declaration. */ | ||
| export interface SecurityFields { | ||
| /** Allowlisted role names required for this endpoint (e.g. `["admin", "moderator"]`). */ | ||
| roles?: string[]; | ||
| /** Inline comment attached to the `roles:` line. */ | ||
| rolesDescription?: string; | ||
| /** Whether this endpoint requires MFA. */ | ||
| requireMfa?: boolean; | ||
| /** Inline comment attached to the `requireMfa:` line. */ | ||
| requireMfaDescription?: string; | ||
| loc: SourceLocation; | ||
@@ -186,0 +186,0 @@ } |
+6
-13
@@ -1081,5 +1081,5 @@ /** | ||
| const result = child.toAst(file, this.args.diag); | ||
| if (result._type === 'roles') { | ||
| fields.roles = result.roles; | ||
| if (result.description) fields.rolesDescription = result.description; | ||
| if (result._type === 'requireMfa') { | ||
| fields.requireMfa = result.value; | ||
| if (result.description) fields.requireMfaDescription = result.description; | ||
| } | ||
@@ -1095,7 +1095,4 @@ } | ||
| SecurityRolesLine(_rolesKw, _colon, roleNodes, commentOpt) { | ||
| const roles: string[] = []; | ||
| for (let i = 0; i < roleNodes.numChildren; i++) { | ||
| roles.push(roleNodes.child(i).sourceString.trim()); | ||
| } | ||
| SecurityRequireMfaLine(_kw, _colon, valueNode, commentOpt) { | ||
| const value = valueNode.sourceString === 'true'; | ||
| let description: string | undefined; | ||
@@ -1105,9 +1102,5 @@ if ((commentOpt as IterationNode).numChildren > 0) { | ||
| } | ||
| return { _type: 'roles', roles, description }; | ||
| return { _type: 'requireMfa', value, description }; | ||
| }, | ||
| RoleName(identNode) { | ||
| return identNode.sourceString; | ||
| }, | ||
| SecuritySignatureLine(_signatureKw, _colon, valueNode, _commentOpt) { | ||
@@ -1114,0 +1107,0 @@ const raw = valueNode.sourceString; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1478974
-0.07%10799
-0.13%