@lukoweb/apitogo 0.2.59 → 0.2.60

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/cli/cli.js CHANGED
@@ -8267,6 +8267,9 @@ function planPortal(profile, manifest) {
8267
8267
  preview: manifest.preview === true
8268
8268
  };
8269
8269
  if (!profile.enabled) return plan2;
8270
+ if (profile.pipelines.search === "pagefind") plan2.search = "pagefind";
8271
+ else if (profile.pipelines.search === "inkeep")
8272
+ skip("search", "inkeep needs keys that portal.search cannot hold yet");
8270
8273
  if (profile.pipelines.openapi) {
8271
8274
  if (!gateway) skip("api reference", "services.json has no gateway entry");
8272
8275
  else if (!serviceReady(gateway))
@@ -8391,6 +8394,7 @@ function buildSiteConfig(resolved, plan2, theme, extras = {}) {
8391
8394
  )
8392
8395
  }
8393
8396
  } : {},
8397
+ ...plan2.search ? { search: { type: plan2.search } } : {},
8394
8398
  ...plan2.apiReference ? {
8395
8399
  apis: [
8396
8400
  {
@@ -11199,7 +11203,7 @@ import {
11199
11203
  // package.json
11200
11204
  var package_default = {
11201
11205
  name: "@lukoweb/apitogo",
11202
- version: "0.2.59",
11206
+ version: "0.2.60",
11203
11207
  type: "module",
11204
11208
  sideEffects: [
11205
11209
  "**/*.css",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.2.59",
3
+ "version": "0.2.60",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -71,6 +71,8 @@ const PLANS_CONSOLE_CAPABILITIES = [
71
71
  export type PortalPlan = {
72
72
  /** Docs pages, navigation and search APItoGo builds. */
73
73
  docs: boolean;
74
+ /** The search box the site shows; only for docs APItoGo hosts. Absent: the site has no search. */
75
+ search?: "pagefind";
74
76
  /** OpenAPI reference pages and playground, built from the gateway's OpenAPI file. */
75
77
  apiReference: boolean;
76
78
  /** Where the reference points its calls, and the header of the API key; set when `apiReference` is true. */
@@ -215,6 +217,12 @@ export function planPortal(
215
217
 
216
218
  if (!profile.enabled) return plan;
217
219
 
220
+ // The build already writes the Pagefind index for hosted docs; the site shows the search box only when its config
221
+ // names the search. Inkeep needs keys that `portal.search` cannot carry yet, so it is left out, not half-registered.
222
+ if (profile.pipelines.search === "pagefind") plan.search = "pagefind";
223
+ else if (profile.pipelines.search === "inkeep")
224
+ skip("search", "inkeep needs keys that portal.search cannot hold yet");
225
+
218
226
  // The API page is built from the gateway's OpenAPI file and calls the gateway, so it needs the gateway's address.
219
227
  if (profile.pipelines.openapi) {
220
228
  if (!gateway) skip("api reference", "services.json has no gateway entry");
@@ -390,6 +398,7 @@ export function buildSiteConfig(
390
398
  },
391
399
  }
392
400
  : {}),
401
+ ...(plan.search ? { search: { type: plan.search } } : {}),
393
402
  ...(plan.apiReference
394
403
  ? {
395
404
  apis: [