@stacksjs/ts-cloud 0.5.18 → 0.5.20

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.
@@ -4,7 +4,7 @@
4
4
  * this to `TSCLOUD_DASHBOARD_DATA` and the pages' `<script server>` blocks read
5
5
  * it at build time (falling back to representative sample data per-field/per-page
6
6
  * when a value isn't present). Every gather is wrapped so one failing source only
7
- * drops its own slice — the rest still render live. See `ui/pages/*`.
7
+ * drops its own slice — the rest still render live. See `packages/ui/pages/*`.
8
8
  */
9
9
  import type { CloudConfig, EnvironmentType } from '@ts-cloud/core';
10
10
  /** A loosely-typed bag — the pages read named slices, missing ones fall back. */
@@ -2,8 +2,8 @@
2
2
  * Auto-deploy of the ts-cloud management dashboard (the `@ts-cloud/ui` stx app)
3
3
  * on every server provision/deploy.
4
4
  *
5
- * Resolves the UI directory (the repo's local `ui/`, else the prebuilt UI that
6
- * ships inside the installed package at `dist/ui`), derives a `dashboard.<apex>`
5
+ * Resolves the UI directory (the repo's local `packages/ui/`, else the prebuilt
6
+ * UI that ships inside the installed package at `dist/ui`), derives a `dashboard.<apex>`
7
7
  * host, and injects it into `config.sites` as a server-static site. It is served
8
8
  * behind htpasswd ONLY when `TS_CLOUD_UI_PASSWORD` is set; when it is not, the
9
9
  * dashboard is served without auth (no password is invented).
@@ -21,8 +21,8 @@ export interface EnsureDashboardLogger {
21
21
  warn: (msg: string) => void;
22
22
  }
23
23
  /**
24
- * Resolve the UI source to ship. Prefers the repo's local `ui/` (built on the
25
- * deploy machine), then the prebuilt UI bundled in the installed package.
24
+ * Resolve the UI source to ship. Prefers the repo's local `packages/ui/` (built
25
+ * on the deploy machine), then the prebuilt UI bundled in the installed package.
26
26
  * Returns `{ uiRoot, build }` or null when no UI is available.
27
27
  */
28
28
  export declare function resolveUiSource(cwd: string): {
@@ -0,0 +1,15 @@
1
+ export interface AddSiteConfigInput {
2
+ configText: string;
3
+ name: string;
4
+ root: string;
5
+ domain?: string;
6
+ path?: string;
7
+ deploy?: 'bucket' | 'server';
8
+ build?: string;
9
+ start?: string;
10
+ port?: number;
11
+ type?: string;
12
+ pathRewriteStyle?: 'directory' | 'flat';
13
+ }
14
+ export declare function addSiteToCloudConfig(input: AddSiteConfigInput): string;
15
+ export declare function renderSiteSnippet(input: Omit<AddSiteConfigInput, 'configText'>): string;
package/dist/index.js CHANGED
@@ -7642,11 +7642,11 @@ function createServerlessLaravelPreset(options) {
7642
7642
  }
7643
7643
  function createDashboardSite(options) {
7644
7644
  return {
7645
- root: options.root ?? "ui/dist",
7645
+ root: options.root ?? "packages/ui/dist",
7646
7646
  deploy: "server",
7647
7647
  type: "static",
7648
7648
  domain: options.domain,
7649
- build: options.build ?? "cd ui && bun install && bun run build",
7649
+ build: options.build ?? "cd packages/ui && bun install && bun run build",
7650
7650
  ssl: { provider: "letsencrypt" },
7651
7651
  auth: {
7652
7652
  username: options.username ?? "admin",