@ts-cloud/core 0.7.0 → 0.7.2

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +40 -0
  2. package/package.json +2 -2
package/dist/types.d.ts CHANGED
@@ -2037,6 +2037,20 @@ export interface ComputeConfig {
2037
2037
  servicesServer?: boolean | {
2038
2038
  size?: InstanceSize;
2039
2039
  };
2040
+ /**
2041
+ * Provision a **dedicated load-balancer box** (its own, typically
2042
+ * smaller/cheaper instance) running only the rpx gateway in load-balancing
2043
+ * mode, fronting the app server(s). Used by providers (e.g. Hetzner) whose
2044
+ * fleet path load-balances via a real box running rpx rather than the
2045
+ * provider's own native load-balancer product. `true` uses a small default
2046
+ * size (e.g. `micro`); an object lets you pick the size explicitly. Only
2047
+ * relevant when the fleet has more than one app server (see
2048
+ * {@link appServers}/{@link instances}) — a single-app-server deploy never
2049
+ * provisions this box.
2050
+ */
2051
+ loadBalancer?: boolean | {
2052
+ size?: InstanceSize;
2053
+ };
2040
2054
  /**
2041
2055
  * Mixed instance fleet for cost optimization
2042
2056
  * Allows combining different sizes and spot instances
@@ -2532,6 +2546,32 @@ export interface ComputeProxyConfig {
2532
2546
  * `buildCloudFrontOriginConfig` for the matching AWS distribution config.
2533
2547
  */
2534
2548
  cdn?: CdnFrontConfig;
2549
+ /**
2550
+ * Load-balancing tuning for a multi-upstream route (a `server-app` site
2551
+ * fronted by more than one app box — see {@link ComputeConfig.appServers}/
2552
+ * {@link ComputeConfig.instances}). Passed straight through to rpx's own
2553
+ * `startProxies({ loadBalancer })` option, so `strategy`/`healthCheck` mirror
2554
+ * rpx's `LoadBalancerConfig` shape exactly. Optional — rpx applies its own
2555
+ * defaults (round-robin, a basic health check) when omitted. Ignored for a
2556
+ * single-upstream route (rpx only load-balances a route with >1 upstream).
2557
+ */
2558
+ loadBalancer?: RpxLoadBalancerConfig;
2559
+ }
2560
+ /**
2561
+ * Mirrors rpx's own `LoadBalancerConfig` (see `@stacksjs/rpx`'s `types.ts`).
2562
+ * Kept as a local, structurally-compatible type here so `@ts-cloud/core` does
2563
+ * not take a runtime dependency on rpx just to describe this passthrough.
2564
+ */
2565
+ export interface RpxLoadBalancerConfig {
2566
+ strategy?: 'round-robin' | 'weighted-round-robin' | 'least-connections';
2567
+ healthCheck?: {
2568
+ enabled?: boolean;
2569
+ path?: string;
2570
+ interval?: number;
2571
+ timeout?: number;
2572
+ healthyThreshold?: number;
2573
+ unhealthyThreshold?: number;
2574
+ };
2535
2575
  }
2536
2576
  /** CDN-in-front-of-gateway configuration (see {@link ComputeProxyConfig.cdn}). */
2537
2577
  export interface CdnFrontConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-cloud/core",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "description": "Core CloudFormation generation library for ts-cloud",
6
6
  "author": "Chris Breuer <chris@stacksjs.com>",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@ts-cloud/aws-types": "0.7.0"
34
+ "@ts-cloud/aws-types": "0.7.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^5.9.3"