[{"data":1,"prerenderedAt":1409,"buildId":1410},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions":3},{"id":4,"title":5,"body":6,"description":1391,"extension":1392,"frontmatter":1393,"heading":1398,"meta":1400,"navigation":1402,"order":1396,"path":1403,"seo":1404,"sitemap":1405,"source":1406,"stem":1407,"__hash__":1408},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions.md","defineExtension - Plugins, adapters, and parsers",{"type":7,"value":8,"toc":1374},"minimark",[9,21,27,33,224,228,241,429,630,653,657,679,683,693,827,882,885,954,961,1175,1182,1186,1194,1229,1248,1252,1255,1269,1292,1295,1307,1351,1354,1357,1362],[10,11,12,16,17,20],"p",{},[13,14,15],"code",{},"defineExtension"," from ",[13,18,19],{},"kubb\u002Fkit"," defines an extension: a plugin, an adapter, or a parser. You pass it a definition object, and it returns a factory. The config calls that factory with the user's options.",[22,23,25],"h2",{"id":24},"define-extension",[13,26,15],{},[10,28,29,32],{},[13,30,31],{},"kind"," picks what you define. The other fields follow from it:",[34,35,36,54],"table",{},[37,38,39],"thead",{},[40,41,42,45,48,51],"tr",{},[43,44],"th",{},[43,46,47],{},"Plugin",[43,49,50],{},"Adapter",[43,52,53],{},"Parser",[55,56,57,79,99,137,167,187,201],"tbody",{},[40,58,59,64,69,74],{},[60,61,62],"td",{},[13,63,31],{},[60,65,66],{},[13,67,68],{},"'plugin'",[60,70,71],{},[13,72,73],{},"'adapter'",[60,75,76],{},[13,77,78],{},"'parser'",[40,80,81,84,89,94],{},[60,82,83],{},"Config field",[60,85,86],{},[13,87,88],{},"plugins",[60,90,91],{},[13,92,93],{},"adapter",[60,95,96],{},[13,97,98],{},"parsers",[40,100,101,104,122,131],{},[60,102,103],{},"Definition fields",[60,105,106,109,110,109,113,109,116,109,119],{},[13,107,108],{},"meta",", ",[13,111,112],{},"setup",[13,114,115],{},"dependencies",[13,117,118],{},"enforce",[13,120,121],{},"hooks",[60,123,124,109,126,109,128],{},[13,125,108],{},[13,127,112],{},[13,129,130],{},"build",[60,132,133,109,135],{},[13,134,108],{},[13,136,130],{},[40,138,139,142,150,161],{},[60,140,141],{},"Receives",[60,143,144,145],{},"The user's options and the ",[146,147,149],"a",{"href":148},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fplugins#setup-context","setup context",[60,151,152,154,155,157,158,160],{},[13,153,112],{}," gets the user's options. ",[13,156,130],{}," gets what ",[13,159,112],{}," returns.",[60,162,163,164],{},"The user's options, or ",[13,165,166],{},"{}",[40,168,169,172,177,182],{},[60,170,171],{},"Returns",[60,173,174,175],{},"The resolved options, from ",[13,176,112],{},[60,178,179,180],{},"The document and its methods, from ",[13,181,130],{},[60,183,184,185],{},"The parser methods, from ",[13,186,130],{},[40,188,189,192,195,198],{},[60,190,191],{},"Runs",[60,193,194],{},"Once per build, after the adapter",[60,196,197],{},"First",[60,199,200],{},"Last, as Kubb writes each file",[40,202,203,206,212,218],{},[60,204,205],{},"Details",[60,207,208],{},[146,209,211],{"href":210},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fplugins","Plugins",[60,213,214],{},[146,215,217],{"href":216},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fadapters","Adapters",[60,219,220],{},[146,221,223],{"href":222},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fparsers","Parsers",[22,225,226],{"id":108},[13,227,108],{},[10,229,230,232,233,236,237,240],{},[13,231,108],{}," holds the extension's identity. Kubb reads ",[13,234,235],{},"name"," and ",[13,238,239],{},"compatibility"," at runtime. Studio, the registry, and kubb.dev read the rest.",[242,243,248],"pre",{"language":244,"filename":245,"code":246,"class":247},"typescript","plugin-example.ts","import { defineExtension } from 'kubb\u002Fkit'\n\nexport const pluginExample = defineExtension({\n kind: 'plugin',\n meta: {\n name: 'plugin-example',\n version: '1.0.0',\n displayName: 'Example',\n description: 'Adds a comment to every generated schema.',\n compatibility: { kubb: '>=5.7.0', node: '>=22' },\n },\n})","highlights",[13,249,251,278,279,278,281,278,301,278,316,278,327,278,341,278,355,278,369,278,383,278,416,278,424],{"class":250},"language-typescript",[252,253,256,260,264,268,271,274],"span",{"class":254,"style":255},"line","display: inline",[252,257,259],{"style":258},"color:#d73a49;--hls-dark:#f97583","import ",[252,261,263],{"style":262},"color:#005cc5;--hls-dark:#79b8ff","{ ",[252,265,267],{"style":266},"color:#24292e;--hls-dark:#e1e4e8","defineExtension ",[252,269,270],{"style":262},"} ",[252,272,273],{"style":258},"from ",[252,275,277],{"style":276},"color:#032f62;--hls-dark:#9ecbff","'kubb\u002Fkit'","\n",[252,280],{"class":254,"style":255},[252,282,283,286,289,292,295,298],{"class":254,"style":255},[252,284,285],{"style":258},"export ",[252,287,288],{"style":258},"const ",[252,290,291],{"style":266},"pluginExample ",[252,293,294],{"style":258},"= ",[252,296,15],{"style":297},"color:#6f42c1;--hls-dark:#b392f0",[252,299,300],{"style":262},"({",[252,302,303,306,308,311,313],{"class":254,"style":255},[252,304,305],{"style":262}," ",[252,307,31],{"style":262},[252,309,310],{"style":258},": ",[252,312,68],{"style":276},[252,314,315],{"style":258},",",[252,317,318,320,322,324],{"class":254,"style":255},[252,319,305],{"style":258},[252,321,108],{"style":262},[252,323,310],{"style":258},[252,325,326],{"style":262},"{",[252,328,329,332,334,336,339],{"class":254,"style":255},[252,330,331],{"style":262}," ",[252,333,235],{"style":262},[252,335,310],{"style":258},[252,337,338],{"style":276},"'plugin-example'",[252,340,315],{"style":258},[252,342,343,345,348,350,353],{"class":254,"style":255},[252,344,331],{"style":258},[252,346,347],{"style":262},"version",[252,349,310],{"style":258},[252,351,352],{"style":276},"'1.0.0'",[252,354,315],{"style":258},[252,356,357,359,362,364,367],{"class":254,"style":255},[252,358,331],{"style":258},[252,360,361],{"style":262},"displayName",[252,363,310],{"style":258},[252,365,366],{"style":276},"'Example'",[252,368,315],{"style":258},[252,370,371,373,376,378,381],{"class":254,"style":255},[252,372,331],{"style":258},[252,374,375],{"style":262},"description",[252,377,310],{"style":258},[252,379,380],{"style":276},"'Adds a comment to every generated schema.'",[252,382,315],{"style":258},[252,384,385,387,389,391,393,396,398,401,403,406,408,411,414],{"class":254,"style":255},[252,386,331],{"style":258},[252,388,239],{"style":262},[252,390,310],{"style":258},[252,392,263],{"style":262},[252,394,395],{"style":262},"kubb",[252,397,310],{"style":258},[252,399,400],{"style":276},"'>=5.7.0'",[252,402,109],{"style":258},[252,404,405],{"style":262},"node",[252,407,310],{"style":258},[252,409,410],{"style":276},"'>=22' ",[252,412,413],{"style":262},"}",[252,415,315],{"style":258},[252,417,418,420,422],{"class":254,"style":255},[252,419,305],{"style":258},[252,421,413],{"style":262},[252,423,315],{"style":258},[252,425,426],{"class":254,"style":255},[252,427,428],{"style":262},"})",[34,430,431,444],{},[37,432,433],{},[40,434,435,438,441],{},[43,436,437],{},"Field",[43,439,440],{},"Type",[43,442,443],{},"Description",[55,445,446,464,482,498,511,532,547,562,576,598,612],{},[40,447,448,452,457],{},[60,449,450],{},[13,451,235],{},[60,453,454],{},[13,455,456],{},"string",[60,458,459,460,463],{},"Required. Unique name, such as ",[13,461,462],{},"'plugin-ts'",".",[40,465,466,470,474],{},[60,467,468],{},[13,469,347],{},[60,471,472],{},[13,473,456],{},[60,475,476,477,481],{},"Package version. ",[146,478,480],{"href":479},"#dependencies","Dependents"," check their range against it.",[40,483,484,488,492],{},[60,485,486],{},[13,487,361],{},[60,489,490],{},[13,491,456],{},[60,493,494,495,463],{},"Human-readable name, such as ",[13,496,497],{},"'TypeScript'",[40,499,500,504,508],{},[60,501,502],{},[13,503,375],{},[60,505,506],{},[13,507,456],{},[60,509,510],{},"One sentence on what the extension generates or does.",[40,512,513,518,522],{},[60,514,515],{},[13,516,517],{},"category",[60,519,520],{},[13,521,456],{},[60,523,524,525,528,529,463],{},"Registry category, such as ",[13,526,527],{},"'types'"," or ",[13,530,531],{},"'client'",[40,533,534,539,544],{},[60,535,536],{},[13,537,538],{},"icon",[60,540,541],{},[13,542,543],{},"{ light: string; dark?: string }",[60,545,546],{},"Icon URLs for light and dark backgrounds.",[40,548,549,554,559],{},[60,550,551],{},[13,552,553],{},"media",[60,555,556],{},[13,557,558],{},"Array\u003Cstring>",[60,560,561],{},"Screenshots or videos, as HTTPS URLs.",[40,563,564,569,573],{},[60,565,566],{},[13,567,568],{},"tags",[60,570,571],{},[13,572,558],{},[60,574,575],{},"Search keywords for the registry.",[40,577,578,582,587],{},[60,579,580],{},[13,581,239],{},[60,583,584],{},[13,585,586],{},"{ kubb?: string; node?: string }",[60,588,589,590,593,594,463],{},"Semver ranges for ",[13,591,592],{},"@kubb\u002Fcore"," and Node.js. See ",[146,595,597],{"href":596},"#compatibility-checks","Compatibility checks",[40,599,600,605,609],{},[60,601,602],{},[13,603,604],{},"docs",[60,606,607],{},[13,608,456],{},[60,610,611],{},"URL of the extension's docs page.",[40,613,614,619,623],{},[60,615,616],{},[13,617,618],{},"issues",[60,620,621],{},[13,622,456],{},[60,624,625,626,629],{},"Issue tracker URL. Kubb prints it as the ",[13,627,628],{},"report:"," link when the extension crashes.",[10,631,632,633,16,635,236,638,16,640,643,644,652],{},"Import ",[13,634,347],{},[13,636,637],{},"package.json",[13,639,239],{},[13,641,642],{},"kubb-extension.json",", so each lives in one file. ",[146,645,632,647,649,650],{"href":646},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fmanifest#import-compatibility-into-meta",[13,648,239],{}," into ",[13,651,108],{}," shows how. Named JSON imports need a bundler that inlines them, such as tsdown.",[654,655,597],"h3",{"id":656},"compatibility-checks",[10,658,659,660,663,664,666,667,673,674,678],{},"Before any plugin runs, Kubb checks each extension's ",[13,661,662],{},"meta.compatibility"," against the running ",[13,665,592],{}," and Node.js. A mismatch fails with ",[146,668,670],{"href":669},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-incompatible-extension",[13,671,672],{},"KUBB_INCOMPATIBLE_EXTENSION",". ",[146,675,677],{"href":676},"#compatibility-ranges","Compatibility ranges"," covers prereleases and canary builds.",[22,680,681],{"id":115},[13,682,115],{},[10,684,685,686,688,689,692],{},"Only plugins take ",[13,687,115],{},": the plugins yours builds on, keyed by ",[13,690,691],{},"meta.name",". Kubb runs them first.",[242,694,696],{"language":244,"filename":245,"code":695,"class":247},"import { defineExtension } from 'kubb\u002Fkit'\n\nexport const pluginExample = defineExtension({\n kind: 'plugin',\n meta: { name: 'plugin-example' },\n dependencies: {\n 'plugin-ts': { version: '>=5.0.0' },\n 'plugin-zod': { optional: true },\n },\n})",[13,697,698,278,712,278,714,278,728,278,740,278,761,278,771,278,792,278,815,278,823],{"class":250},[252,699,700,702,704,706,708,710],{"class":254,"style":255},[252,701,259],{"style":258},[252,703,263],{"style":262},[252,705,267],{"style":266},[252,707,270],{"style":262},[252,709,273],{"style":258},[252,711,277],{"style":276},[252,713],{"class":254,"style":255},[252,715,716,718,720,722,724,726],{"class":254,"style":255},[252,717,285],{"style":258},[252,719,288],{"style":258},[252,721,291],{"style":266},[252,723,294],{"style":258},[252,725,15],{"style":297},[252,727,300],{"style":262},[252,729,730,732,734,736,738],{"class":254,"style":255},[252,731,305],{"style":262},[252,733,31],{"style":262},[252,735,310],{"style":258},[252,737,68],{"style":276},[252,739,315],{"style":258},[252,741,742,744,746,748,750,752,754,757,759],{"class":254,"style":255},[252,743,305],{"style":258},[252,745,108],{"style":262},[252,747,310],{"style":258},[252,749,263],{"style":262},[252,751,235],{"style":262},[252,753,310],{"style":258},[252,755,756],{"style":276},"'plugin-example' ",[252,758,413],{"style":262},[252,760,315],{"style":258},[252,762,763,765,767,769],{"class":254,"style":255},[252,764,305],{"style":258},[252,766,115],{"style":262},[252,768,310],{"style":258},[252,770,326],{"style":262},[252,772,773,775,777,779,781,783,785,788,790],{"class":254,"style":255},[252,774,331],{"style":262},[252,776,462],{"style":276},[252,778,310],{"style":258},[252,780,263],{"style":262},[252,782,347],{"style":262},[252,784,310],{"style":258},[252,786,787],{"style":276},"'>=5.0.0' ",[252,789,413],{"style":262},[252,791,315],{"style":258},[252,793,794,796,799,801,803,806,808,811,813],{"class":254,"style":255},[252,795,331],{"style":258},[252,797,798],{"style":276},"'plugin-zod'",[252,800,310],{"style":258},[252,802,263],{"style":262},[252,804,805],{"style":262},"optional",[252,807,310],{"style":258},[252,809,810],{"style":262},"true ",[252,812,413],{"style":262},[252,814,315],{"style":258},[252,816,817,819,821],{"class":254,"style":255},[252,818,305],{"style":258},[252,820,413],{"style":262},[252,822,315],{"style":258},[252,824,825],{"class":254,"style":255},[252,826,428],{"style":262},[34,828,829,840],{},[37,830,831],{},[40,832,833,836,838],{},[43,834,835],{},"Entry field",[43,837,440],{},[43,839,443],{},[55,841,842,861],{},[40,843,844,848,852],{},[60,845,846],{},[13,847,347],{},[60,849,850],{},[13,851,456],{},[60,853,854,855,858,859,463],{},"Semver range the dependency's ",[13,856,857],{},"meta.version"," must satisfy. Skipped when it has no ",[13,860,857],{},[40,862,863,867,872],{},[60,864,865],{},[13,866,805],{},[60,868,869],{},[13,870,871],{},"boolean",[60,873,874,875,878,879,881],{},"When ",[13,876,877],{},"true",", a missing plugin is skipped. An installed one still gets its ",[13,880,347],{}," checked.",[10,883,884],{},"Kubb checks the record before any plugin runs:",[34,886,887,897],{},[37,888,889],{},[40,890,891,894],{},[43,892,893],{},"Problem",[43,895,896],{},"Result",[55,898,899,913,925,941],{},[40,900,901,904],{},[60,902,903],{},"A required entry is missing from the config",[60,905,906,907],{},"Fails with ",[146,908,910],{"href":909},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-missing-dependency",[13,911,912],{},"KUBB_MISSING_DEPENDENCY",[40,914,915,922],{},[60,916,917,918,921],{},"An ",[13,919,920],{},"optional: true"," entry is missing",[60,923,924],{},"Skipped",[40,926,927,933],{},[60,928,929,930,932],{},"A ",[13,931,857],{}," is outside the entry's range",[60,934,906,935],{},[146,936,938],{"href":937},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-incompatible-dependency",[13,939,940],{},"KUBB_INCOMPATIBLE_DEPENDENCY",[40,942,943,946],{},[60,944,945],{},"The dependencies form a cycle",[60,947,906,948],{},[146,949,951],{"href":950},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-invalid-plugin-options",[13,952,953],{},"KUBB_INVALID_PLUGIN_OPTIONS",[10,955,956,957,960],{},"To pick dependencies from the user's options, pass a function. It receives the options and ",[13,958,959],{},"{ config }",":",[242,962,964],{"language":244,"filename":245,"code":963,"class":247},"import { defineExtension, type PluginType } from 'kubb\u002Fkit'\n\ntype PluginExample = PluginType\u003C'plugin-example', { parser?: 'data' | 'faker' }>\n\nexport const pluginExample = defineExtension\u003CPluginExample>({\n kind: 'plugin',\n meta: { name: 'plugin-example' },\n dependencies: (options) => ({\n 'plugin-ts': {},\n ...(options.parser === 'faker' ? { 'plugin-faker': {} } : {}),\n }),\n})",[13,965,966,278,988,278,990,278,1033,278,1035,278,1056,278,1068,278,1088,278,1110,278,1122,278,1163,278,1171],{"class":250},[252,967,968,970,972,974,976,979,982,984,986],{"class":254,"style":255},[252,969,259],{"style":258},[252,971,263],{"style":262},[252,973,15],{"style":266},[252,975,109],{"style":258},[252,977,978],{"style":258},"type ",[252,980,981],{"style":297},"PluginType ",[252,983,270],{"style":262},[252,985,273],{"style":258},[252,987,277],{"style":276},[252,989],{"class":254,"style":255},[252,991,992,994,997,999,1002,1005,1007,1009,1011,1014,1017,1019,1022,1025,1028,1030],{"class":254,"style":255},[252,993,978],{"style":258},[252,995,996],{"style":297},"PluginExample ",[252,998,294],{"style":258},[252,1000,1001],{"style":297},"PluginType",[252,1003,1004],{"style":258},"\u003C",[252,1006,338],{"style":276},[252,1008,109],{"style":258},[252,1010,263],{"style":262},[252,1012,1013],{"style":262},"parser",[252,1015,1016],{"style":266},"?",[252,1018,310],{"style":258},[252,1020,1021],{"style":276},"'data' ",[252,1023,1024],{"style":258},"| ",[252,1026,1027],{"style":276},"'faker' ",[252,1029,413],{"style":262},[252,1031,1032],{"style":258},">",[252,1034],{"class":254,"style":255},[252,1036,1037,1039,1041,1043,1045,1047,1049,1052,1054],{"class":254,"style":255},[252,1038,285],{"style":258},[252,1040,288],{"style":258},[252,1042,291],{"style":266},[252,1044,294],{"style":258},[252,1046,15],{"style":266},[252,1048,1004],{"style":258},[252,1050,1051],{"style":297},"PluginExample",[252,1053,1032],{"style":258},[252,1055,300],{"style":262},[252,1057,1058,1060,1062,1064,1066],{"class":254,"style":255},[252,1059,305],{"style":262},[252,1061,31],{"style":262},[252,1063,310],{"style":258},[252,1065,68],{"style":276},[252,1067,315],{"style":258},[252,1069,1070,1072,1074,1076,1078,1080,1082,1084,1086],{"class":254,"style":255},[252,1071,305],{"style":258},[252,1073,108],{"style":262},[252,1075,310],{"style":258},[252,1077,263],{"style":262},[252,1079,235],{"style":262},[252,1081,310],{"style":258},[252,1083,756],{"style":276},[252,1085,413],{"style":262},[252,1087,315],{"style":258},[252,1089,1090,1092,1094,1096,1099,1102,1105,1108],{"class":254,"style":255},[252,1091,305],{"style":258},[252,1093,115],{"style":262},[252,1095,310],{"style":258},[252,1097,1098],{"style":262},"(",[252,1100,1101],{"style":266},"options",[252,1103,1104],{"style":262},") ",[252,1106,1107],{"style":258},"=> ",[252,1109,300],{"style":262},[252,1111,1112,1114,1116,1118,1120],{"class":254,"style":255},[252,1113,331],{"style":262},[252,1115,462],{"style":276},[252,1117,310],{"style":258},[252,1119,166],{"style":262},[252,1121,315],{"style":258},[252,1123,1124,1126,1129,1131,1133,1135,1138,1141,1143,1146,1148,1151,1153,1156,1158,1161],{"class":254,"style":255},[252,1125,331],{"style":258},[252,1127,1128],{"style":258},"...",[252,1130,1098],{"style":262},[252,1132,1101],{"style":266},[252,1134,463],{"style":258},[252,1136,1137],{"style":262},"parser ",[252,1139,1140],{"style":258},"=== ",[252,1142,1027],{"style":276},[252,1144,1145],{"style":258},"? ",[252,1147,263],{"style":262},[252,1149,1150],{"style":276},"'plugin-faker'",[252,1152,310],{"style":258},[252,1154,1155],{"style":262},"{} } ",[252,1157,310],{"style":258},[252,1159,1160],{"style":262},"{})",[252,1162,315],{"style":258},[252,1164,1165,1167,1169],{"class":254,"style":255},[252,1166,305],{"style":258},[252,1168,428],{"style":262},[252,1170,315],{"style":258},[252,1172,1173],{"class":254,"style":255},[252,1174,428],{"style":262},[10,1176,1177,1181],{},[146,1178,1180],{"href":1179},"#array-dependencies","Array dependencies"," covers the older array form.",[22,1183,1185],{"id":1184},"factory-statics","Factory statics",[10,1187,1188,1189,236,1191,1193],{},"Every factory carries ",[13,1190,31],{},[13,1192,108],{},", so a tool can read them without calling the factory:",[242,1195,1197],{"language":244,"code":1196,"class":247},"pluginExample.kind \u002F\u002F 'plugin'\npluginExample.meta.name \u002F\u002F 'plugin-example'",[13,1198,1199,278,1213],{"class":250},[252,1200,1201,1204,1206,1209],{"class":254,"style":255},[252,1202,1203],{"style":266},"pluginExample",[252,1205,463],{"style":258},[252,1207,1208],{"style":262},"kind ",[252,1210,1212],{"style":1211},"color:#6a737d;--hls-dark:#6a737d","\u002F\u002F 'plugin'",[252,1214,1215,1217,1219,1221,1223,1226],{"class":254,"style":255},[252,1216,1203],{"style":266},[252,1218,463],{"style":258},[252,1220,108],{"style":262},[252,1222,463],{"style":258},[252,1224,1225],{"style":262},"name ",[252,1227,1228],{"style":1211},"\u002F\u002F 'plugin-example'",[10,1230,1231,1232,1234,1235,1237,1238,1240,1241,1243,1244,463],{},"The extension the factory returns gets ",[13,1233,235],{}," (from ",[13,1236,691],{},"), ",[13,1239,108],{},", and the user's raw ",[13,1242,1101],{},". See ",[146,1245,1247],{"href":1246},"#hand-written-extensions","Hand-written extensions",[22,1249,1251],{"id":1250},"less-common-cases","Less common cases",[654,1253,677],{"id":1254},"compatibility-ranges",[10,1256,1257,1258,1262,1263,1265,1266,1268],{},"When a run fails with ",[146,1259,1260],{"href":669},[13,1261,672],{},", an extension's ",[13,1264,662],{}," does not match the running ",[13,1267,592],{}," or Node.js.",[1270,1271,1272,1279,1282],"ul",{},[1273,1274,1275,1278],"li",{},[13,1276,1277],{},"kubb add"," checks it before it installs.",[1273,1280,1281],{},"Prereleases compare like releases.",[1273,1283,1284,1285,1288,1289,1291],{},"A canary build (",[13,1286,1287],{},"0.0.0-canary-*",") skips the ",[13,1290,395],{}," range.",[654,1293,1180],{"id":1294},"array-dependencies",[10,1296,1297,1298,1302,1303,1306],{},"When a plugin declares ",[146,1299,1300],{"href":479},[13,1301,115],{}," as an array, such as ",[13,1304,1305],{},"dependencies: ['plugin-ts']",", the array still works but only orders plugins.",[34,1308,1309,1322],{},[37,1310,1311],{},[40,1312,1313,1316,1319],{},[43,1314,1315],{},"Form",[43,1317,1318],{},"A missing plugin",[43,1320,1321],{},"Versions",[55,1323,1324,1337],{},[40,1325,1326,1329,1334],{},[60,1327,1328],{},"An array of plugin names",[60,1330,1331,1332,463],{},"Skipped. It never raises ",[13,1333,912],{},[60,1335,1336],{},"Not checked",[40,1338,1339,1342,1345],{},[60,1340,1341],{},"A record keyed by plugin name",[60,1343,1344],{},"A missing required plugin fails the run before any plugin runs.",[60,1346,1347,1348,1350],{},"Out of range fails the run before any plugin runs. A dependency without ",[13,1349,857],{}," is not checked.",[10,1352,1353],{},"Both forms set the order. Use the record form to fail early when a required plugin is missing or out of range.",[654,1355,1247],{"id":1356},"hand-written-extensions",[10,1358,1359,1360,463],{},"When you write a plugin or parser object by hand instead of calling a factory, give it ",[13,1361,108],{},[1270,1363,1364],{},[1273,1365,1366,1367,1369,1370,463],{},"An object without ",[13,1368,108],{}," fails with ",[146,1371,1372],{"href":950},[13,1373,953],{},{"title":1375,"searchDepth":1376,"depth":1376,"links":1377},"",5,[1378,1380,1384,1385,1386],{"id":24,"depth":1379,"text":15},2,{"id":108,"depth":1379,"text":108,"children":1381},[1382],{"id":656,"depth":1383,"text":597},3,{"id":115,"depth":1379,"text":115},{"id":1184,"depth":1379,"text":1185},{"id":1250,"depth":1379,"text":1251,"children":1387},[1388,1389,1390],{"id":1254,"depth":1383,"text":677},{"id":1294,"depth":1383,"text":1180},{"id":1356,"depth":1383,"text":1247},"defineExtension in kubb\u002Fkit defines a plugin, adapter, or parser. Covers meta, compatibility checks, plugin dependencies, and factory statics.","md",{"layout":1394,"title":5,"description":1391,"outline":1395,"order":1396,"navigation":1397},"doc",[1379,1383],13,{"title":1398,"icon":1399},"Extensions","i-iconoir-puzzle",{"layout":1394,"outline":1401},[1379,1383],{"title":1398,"icon":1399},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions",{"title":5,"description":1391},{"loc":1403},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fextensions.md","docs\u002F5.x\u002Freference\u002Fkit\u002Fextensions","-cB6hboL7OGlPu6hAweiDNPjYejuqRYVJ__TBARSKYI",1795727678029,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]