@happyvertical/smrt-scanner 0.57.6 → 0.57.8
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/dist/chunks/{scanner-B3EACkkL.js → scanner-AeB0tDx4.js} +14 -1
- package/dist/chunks/scanner-AeB0tDx4.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/recipe-widgets.d.ts +1 -1
- package/dist/recipe-widgets.d.ts.map +1 -1
- package/dist/recipes.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/scanner-B3EACkkL.js.map +0 -1
|
@@ -1183,6 +1183,7 @@ var RECIPE_WIDGET_KEYS = [
|
|
|
1183
1183
|
"options",
|
|
1184
1184
|
"data",
|
|
1185
1185
|
"allowedIn",
|
|
1186
|
+
"sectionDefault",
|
|
1186
1187
|
"defaultSpan",
|
|
1187
1188
|
"minSpan",
|
|
1188
1189
|
"maxSpan"
|
|
@@ -1425,6 +1426,14 @@ function readWidgetSurface(entry, at, fail, readRef) {
|
|
|
1425
1426
|
out.allowedIn = [...seen];
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1429
|
+
if (entry.sectionDefault !== void 0) {
|
|
1430
|
+
if (typeof entry.sectionDefault !== "boolean") bad(".sectionDefault must be a boolean");
|
|
1431
|
+
else if (entry.sectionDefault) {
|
|
1432
|
+
const missing = (out.options ?? []).filter((option) => option.required && option.default === void 0);
|
|
1433
|
+
if (missing.length > 0) bad(`.sectionDefault needs a \`default\` on every required option (${missing.map((option) => option.key).join(", ")})`);
|
|
1434
|
+
else out.sectionDefault = true;
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1428
1437
|
const spans = {
|
|
1429
1438
|
minSpan: 1,
|
|
1430
1439
|
defaultSpan: 1,
|
|
@@ -2181,6 +2190,10 @@ function readSurfaces(raw, report) {
|
|
|
2181
2190
|
}, line, field));
|
|
2182
2191
|
if (extras) Object.assign(surface, extras);
|
|
2183
2192
|
if (typeof entry.type === "string") identity = `widget-type:${entry.type}`;
|
|
2193
|
+
if (extras?.sectionDefault === true) {
|
|
2194
|
+
if (seen.has("widget-section-default")) fail(`${at}.sectionDefault: only one widget per recipe may lead its section`);
|
|
2195
|
+
seen.add("widget-section-default");
|
|
2196
|
+
}
|
|
2184
2197
|
}
|
|
2185
2198
|
if (ref !== void 0) {
|
|
2186
2199
|
if (seen.has(identity)) fail(`${at} repeats an earlier surface`);
|
|
@@ -4913,4 +4926,4 @@ var OxcScanner = class {
|
|
|
4913
4926
|
//#endregion
|
|
4914
4927
|
export { isPrunedAgentSurfacePath as C, sourceMayDeclareAgentSurface as E, isAgentSurfaceSourcePath as S, scanSvelteAgentSurface as T, normalizeGlobSeparators as _, extractSmrtImports as a, emptyAgentSurface as b, parseRecipeFile as c, extractRecipes as d, resolveRecipes as f, discoverSourceFiles as g, resolveEnumValues as h, defaultCollectionName as i, parseSource as l, InheritanceResolver as m, parseUiSelectorsFile as n, parseAgentSurfaceFile as o, sourceMayDeclareRecipe as p, ManifestAdapter as r, parseFile as s, OxcScanner as t, deriveHelpFieldRefs as u, relativeGlobToCwd as v, mergeAgentSurfaces as w, extractAgentSurface as x, checkAgentSurfaceToolNames as y };
|
|
4915
4928
|
|
|
4916
|
-
//# sourceMappingURL=scanner-
|
|
4929
|
+
//# sourceMappingURL=scanner-AeB0tDx4.js.map
|