@lukoweb/apitogo 0.2.43 → 0.2.44

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
@@ -8376,6 +8376,7 @@ var FULL_SERVER_SOURCE = "server";
8376
8376
  var FULL_SERVER_RUNTIME = "nodejs";
8377
8377
  var FULL_SERVER_RUNTIME_VERSION = "NODE_22_LTS";
8378
8378
  var FULL_SERVER_HEALTH_PATH = "/health";
8379
+ var FULL_SERVER_TIMEOUT_SECONDS = 120;
8379
8380
  var packageName = (name) => `${name.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "") || "api"}-server`;
8380
8381
  function fullServerFiles(name) {
8381
8382
  return {
@@ -9015,7 +9016,9 @@ async function buildGateway(context) {
9015
9016
  runtime,
9016
9017
  runtimeVersion,
9017
9018
  ...o.exclude?.length ? { exclude: o.exclude } : {},
9018
- ...sampleServer ? { healthPath: FULL_SERVER_HEALTH_PATH } : {}
9019
+ ...sampleServer ? { healthPath: FULL_SERVER_HEALTH_PATH } : {},
9020
+ // A full project's API is hosted by the platform and sleeps when idle; the first call must outlast its start.
9021
+ ...full ? { timeoutSeconds: FULL_SERVER_TIMEOUT_SECONDS } : {}
9019
9022
  };
9020
9023
  }
9021
9024
  let specs;
@@ -10589,7 +10592,7 @@ import {
10589
10592
  // package.json
10590
10593
  var package_default = {
10591
10594
  name: "@lukoweb/apitogo",
10592
- version: "0.2.43",
10595
+ version: "0.2.44",
10593
10596
  type: "module",
10594
10597
  sideEffects: [
10595
10598
  "**/*.css",
@@ -14411,6 +14414,8 @@ var viteModulesPlugin = () => {
14411
14414
  code.push(
14412
14415
  `const userPanel = userPanelModule({`,
14413
14416
  ` ...${JSON.stringify(userPanelConfig)},`,
14417
+ // With billing on, the billing plugin owns the plans page and the account side menu.
14418
+ ` billingNav: ${config2.__meta.pricingEnabled === true},`,
14414
14419
  ` dashboard: {`,
14415
14420
  ` ...${JSON.stringify(userPanelConfig.dashboard)},`,
14416
14421
  ` component: config.modules?.userPanel?.dashboard?.component${dashboardPagePath || useBillingDashboard ? " ?? UserPanelDashboardPage" : ""},`,
@@ -1,8 +1,10 @@
1
1
  import type { UseMutationResult } from "@tanstack/react-query";
2
2
  import type { PlaygroundResult } from "../Playground.js";
3
- export declare const ResultPanel: ({ queryMutation, showLongRunningWarning, onCancel, tip, isFinished, progress, }: {
3
+ export declare const ResultPanel: ({ queryMutation, showLongRunningWarning, isWarmingUp, hasIdentities, onCancel, tip, isFinished, progress, }: {
4
4
  queryMutation: UseMutationResult<PlaygroundResult, Error, any>;
5
5
  showLongRunningWarning?: boolean;
6
+ isWarmingUp?: boolean;
7
+ hasIdentities?: boolean;
6
8
  onCancel?: () => void;
7
9
  isFinished: boolean;
8
10
  progress: number;
@@ -0,0 +1,5 @@
1
+ export declare const WARM_UP_STATUSES: number[];
2
+ export declare function fetchWithWarmUpRetry(request: Request, init: RequestInit, options?: {
3
+ delayMs?: number;
4
+ onRetry?: () => void;
5
+ }): Promise<Response>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukoweb/apitogo",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -9,6 +9,11 @@ export const FULL_SERVER_SOURCE = "server";
9
9
  export const FULL_SERVER_RUNTIME = "nodejs";
10
10
  export const FULL_SERVER_RUNTIME_VERSION = "NODE_22_LTS";
11
11
  export const FULL_SERVER_HEALTH_PATH = "/health";
12
+ /**
13
+ * How long the gateway waits for the API. A hosted API that was idle takes longer than the default 30 seconds to wake
14
+ * up, so the first call after a quiet spell would end in a timeout; 120 is the most the platform allows.
15
+ */
16
+ export const FULL_SERVER_TIMEOUT_SECONDS = 120;
12
17
 
13
18
  const packageName = (name: string) =>
14
19
  `${
@@ -11,6 +11,7 @@ import path from "node:path";
11
11
  import { ApitogoError } from "../../lib/util/invariant.js";
12
12
  import {
13
13
  FULL_SERVER_HEALTH_PATH,
14
+ FULL_SERVER_TIMEOUT_SECONDS,
14
15
  FULL_SERVER_RUNTIME,
15
16
  FULL_SERVER_RUNTIME_VERSION,
16
17
  FULL_SERVER_SOURCE,
@@ -583,6 +584,8 @@ async function buildGateway(
583
584
  runtimeVersion,
584
585
  ...(o.exclude?.length ? { exclude: o.exclude } : {}),
585
586
  ...(sampleServer ? { healthPath: FULL_SERVER_HEALTH_PATH } : {}),
587
+ // A full project's API is hosted by the platform and sleeps when idle; the first call must outlast its start.
588
+ ...(full ? { timeoutSeconds: FULL_SERVER_TIMEOUT_SECONDS } : {}),
586
589
  };
587
590
  }
588
591