@ts-cloud/core 0.5.1 → 0.5.3

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/types.d.ts CHANGED
@@ -918,9 +918,10 @@ export interface SiteConfig {
918
918
  queues?: QueueWorkerConfig[];
919
919
  /**
920
920
  * Run the Laravel scheduler for this site
921
- * (`* * * * * php artisan schedule:run`).
921
+ * (`* * * * * php artisan schedule:run`). `true` enables it with defaults;
922
+ * pass a {@link SchedulerConfig} to attach heartbeat monitoring.
922
923
  */
923
- scheduler?: boolean;
924
+ scheduler?: boolean | SchedulerConfig;
924
925
  /** Arbitrary long-running processes to keep alive (systemd-managed). */
925
926
  daemons?: DaemonConfig[];
926
927
  /** TLS configuration for this site's nginx vhost. */
@@ -955,6 +956,29 @@ export interface SiteConfig {
955
956
  * Composer/npm credentials feature).
956
957
  */
957
958
  credentials?: SiteCredentialsConfig;
959
+ /**
960
+ * Custom nginx for this site's vhost (Forge's "Edit Nginx Configuration").
961
+ * Directives are injected into the generated `server { … }` block, so the
962
+ * managed root/locations/SSL still apply.
963
+ */
964
+ nginx?: SiteNginxConfig;
965
+ }
966
+ /** Per-site nginx customization injected into the generated server block. */
967
+ export interface SiteNginxConfig {
968
+ /**
969
+ * Name of a reusable template defined in
970
+ * {@link ComputeConfig.nginxTemplates}. Its directive lines are injected into
971
+ * this site's server block.
972
+ */
973
+ template?: string;
974
+ /**
975
+ * Raw nginx directive lines added to this site's server block (after the
976
+ * managed directives), e.g. `['gzip on;', 'location /metrics { deny all; }']`.
977
+ * Applied on top of {@link template} when both are set.
978
+ */
979
+ serverSnippet?: string[];
980
+ /** `client_max_body_size` for this vhost (e.g. `'256M'`) for large uploads. */
981
+ clientMaxBodySize?: string;
958
982
  }
959
983
  /** Private package-registry credentials for a site's build. */
960
984
  export interface SiteCredentialsConfig {
@@ -1050,6 +1074,22 @@ export interface SslDnsConfig {
1050
1074
  /** Seconds to wait for DNS propagation before certbot asks the CA to verify. */
1051
1075
  propagationSeconds?: number;
1052
1076
  }
1077
+ /**
1078
+ * Laravel scheduler options for a site (Forge's scheduler + heartbeat
1079
+ * monitoring). The scheduler runs `php artisan schedule:run` every minute.
1080
+ */
1081
+ export interface SchedulerConfig {
1082
+ /**
1083
+ * Heartbeat monitor URL pinged after each successful `schedule:run`
1084
+ * (healthchecks.io, Oh Dear, Better Uptime, …). If the scheduler stops, the
1085
+ * monitor stops receiving pings and alerts you.
1086
+ */
1087
+ heartbeatUrl?: string;
1088
+ /**
1089
+ * HTTP method for the heartbeat ping. @default 'GET'
1090
+ */
1091
+ heartbeatMethod?: 'GET' | 'POST' | 'HEAD';
1092
+ }
1053
1093
  /**
1054
1094
  * A Laravel queue worker (or Horizon supervisor) run as a systemd service.
1055
1095
  * Mirrors Forge's queue configuration. See {@link SiteConfig.queues}.
@@ -1621,6 +1661,18 @@ export interface ServerlessAppConfig {
1621
1661
  storage?: {
1622
1662
  bucket?: string;
1623
1663
  };
1664
+ /**
1665
+ * Mount a shared Elastic File System on the functions (Vapor's `/mnt/local`).
1666
+ * Requires a VPC. `true` provisions an EFS file system + access point;
1667
+ * otherwise attach an existing access point by ARN. The mount path defaults
1668
+ * to `/mnt/local`.
1669
+ */
1670
+ efs?: boolean | {
1671
+ /** Existing EFS Access Point ARN to attach (skips provisioning). */
1672
+ accessPointArn?: string;
1673
+ /** Mount path inside the functions. @default '/mnt/local' */
1674
+ mountPath?: string;
1675
+ };
1624
1676
  /** Managed WAF in front of the HTTP API / CloudFront. */
1625
1677
  firewall?: WafConfig;
1626
1678
  /** Custom domain(s) for the app's HTTP API (overrides {@link EnvironmentConfig.domain}). */
@@ -1636,6 +1688,19 @@ export interface ServerlessAppConfig {
1636
1688
  hostedZoneId?: string;
1637
1689
  /** Local directory whose contents are uploaded to S3/CloudFront as versioned assets. */
1638
1690
  assets?: string;
1691
+ /**
1692
+ * Serve assets from a custom CDN host instead of the default CloudFront domain
1693
+ * (Vapor `asset-domain`). Requires a us-east-1 ACM cert via assetCertificateArn.
1694
+ */
1695
+ assetDomain?: string;
1696
+ /** us-east-1 ACM certificate ARN for {@link assetDomain} (CloudFront requirement). */
1697
+ assetCertificateArn?: string;
1698
+ /** Include dotfiles when uploading assets (Vapor `dot-files-as-assets`). @default false */
1699
+ dotFilesAsAssets?: boolean;
1700
+ /** Serve assets from the app/root domain too (Vapor `serve_assets`). Injected as env. */
1701
+ serveAssets?: boolean;
1702
+ /** Redirect robots.txt to the asset CDN (Vapor `redirect_robots_txt`). Injected as env. @default true */
1703
+ redirectRobotsTxt?: boolean;
1639
1704
  /** PHP version for the runtime layer. @default '8.3' */
1640
1705
  phpVersion?: PhpVersion;
1641
1706
  /** CPU architecture. @default 'x86_64' */
@@ -2141,6 +2206,13 @@ export interface ComputeConfig {
2141
2206
  * @default 'nginx'
2142
2207
  */
2143
2208
  webServer?: 'nginx' | 'rpx';
2209
+ /**
2210
+ * Reusable nginx config templates, keyed by name. A site references one via
2211
+ * `site.nginx.template`, and its directive lines are injected into that
2212
+ * site's server block — define a hardening/caching/proxy snippet once and
2213
+ * share it across sites (Forge's nginx templates).
2214
+ */
2215
+ nginxTemplates?: Record<string, string[]>;
2144
2216
  /**
2145
2217
  * On-box managed services to install (Forge's single-server model): the
2146
2218
  * database engine, cache, and search. Each may be `true` for defaults or an
@@ -2228,6 +2300,19 @@ export interface ComputePhpConfig {
2228
2300
  * e.g. `['imagick', 'swoole']`.
2229
2301
  */
2230
2302
  extensions?: string[];
2303
+ /**
2304
+ * Apply the production OPcache + php.ini tuning (Forge's "Optimize for
2305
+ * Production"): OPcache on with timestamp validation off, larger file/string
2306
+ * buffers, and a bigger realpath cache. Deploys restart php-fpm, so disabled
2307
+ * timestamp validation is safe. @default true
2308
+ */
2309
+ optimizeForProduction?: boolean;
2310
+ /**
2311
+ * Extra `php.ini` directives merged on top of the production tuning (and
2312
+ * applied even when {@link optimizeForProduction} is false), e.g.
2313
+ * `{ memory_limit: '512M', upload_max_filesize: '128M' }`.
2314
+ */
2315
+ ini?: Record<string, string>;
2231
2316
  }
2232
2317
  /**
2233
2318
  * On-box managed services (database / cache / search) for a compute box.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-cloud/core",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
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.5.1"
34
+ "@ts-cloud/aws-types": "0.5.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^5.9.3"