@stacksjs/ts-cloud 0.7.18 → 0.7.19
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/bin/cli.js +697 -571
- package/dist/{chunk-h4pdjzq2.js → chunk-nt2hrnva.js} +744 -52
- package/dist/{chunk-vpyd42tp.js → chunk-xgnxz5dz.js} +98 -34
- package/dist/deploy/dashboard-auth.d.ts +82 -0
- package/dist/deploy/dashboard-auth.test.d.ts +1 -0
- package/dist/deploy/dashboard-guard.d.ts +40 -0
- package/dist/deploy/dashboard-login-page.d.ts +16 -0
- package/dist/deploy/dashboard-pages.test.d.ts +1 -0
- package/dist/deploy/dashboard-policy.d.ts +37 -0
- package/dist/deploy/dashboard-policy.test.d.ts +1 -0
- package/dist/deploy/dashboard-scope.d.ts +24 -0
- package/dist/deploy/dashboard-scope.test.d.ts +1 -0
- package/dist/deploy/dashboard-session.d.ts +52 -0
- package/dist/deploy/dashboard-users.d.ts +60 -0
- package/dist/deploy/index.js +2 -2
- package/dist/deploy/local-dashboard-server.d.ts +1 -0
- package/dist/drivers/hetzner/client.d.ts +9 -1
- package/dist/drivers/hetzner/config.d.ts +83 -0
- package/dist/drivers/hetzner/config.test.d.ts +1 -0
- package/dist/drivers/hetzner/factory-wiring.test.d.ts +1 -0
- package/dist/drivers/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/ui/index.html +4 -4
- package/dist/ui/server/actions.html +4 -4
- package/dist/ui/server/activity.html +1 -1
- package/dist/ui/server/backups.html +4 -4
- package/dist/ui/server/database.html +4 -4
- package/dist/ui/server/deployments.html +4 -4
- package/dist/ui/server/diagnostics.html +1 -1
- package/dist/ui/server/firewall.html +4 -4
- package/dist/ui/server/logs.html +4 -4
- package/dist/ui/server/metrics.html +1 -1
- package/dist/ui/server/security.html +1 -1
- package/dist/ui/server/services.html +4 -4
- package/dist/ui/server/sites.html +4 -4
- package/dist/ui/server/ssh-keys.html +4 -4
- package/dist/ui/server/team.html +1214 -0
- package/dist/ui/server/terminal.html +4 -4
- package/dist/ui/server/workers.html +4 -4
- package/dist/ui/serverless/alarms.html +4 -4
- package/dist/ui/serverless/assets.html +4 -4
- package/dist/ui/serverless/cost.html +1 -1
- package/dist/ui/serverless/data.html +4 -4
- package/dist/ui/serverless/deployments.html +4 -4
- package/dist/ui/serverless/firewall.html +1 -1
- package/dist/ui/serverless/functions.html +4 -4
- package/dist/ui/serverless/logs.html +4 -4
- package/dist/ui/serverless/metrics.html +1 -1
- package/dist/ui/serverless/queues.html +4 -4
- package/dist/ui/serverless/scheduler.html +4 -4
- package/dist/ui/serverless/secrets.html +4 -4
- package/dist/ui/serverless/traces.html +4 -4
- package/dist/ui/serverless.html +4 -4
- package/dist/ui-src/pages/partials/head.stx +7 -0
- package/dist/ui-src/pages/partials/nav.stx +43 -6
- package/dist/ui-src/pages/server/firewall.stx +1 -1
- package/dist/ui-src/pages/server/sites.stx +42 -20
- package/dist/ui-src/pages/server/team.stx +171 -0
- package/package.json +3 -3
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single place Hetzner settings are resolved.
|
|
3
|
+
*
|
|
4
|
+
* Every Hetzner value can come from several sources, and they used to be
|
|
5
|
+
* resolved ad-hoc wherever they were needed: the driver, the API client and the
|
|
6
|
+
* dashboard each had their own chain, with defaults duplicated at call sites.
|
|
7
|
+
* That drifted — the dashboard honored `HETZNER_LOCATION` while the driver did
|
|
8
|
+
* not, so a box provisioned in `fsn1` was reported as being somewhere else.
|
|
9
|
+
*
|
|
10
|
+
* One precedence, applied everywhere:
|
|
11
|
+
*
|
|
12
|
+
* 1. an explicit argument (a driver option — the caller means it)
|
|
13
|
+
* 2. `cloud.config.ts` → `hetzner.*` (checked into the repo, reviewable)
|
|
14
|
+
* 3. environment (`HCLOUD_*`, with the `HETZNER_*` alias) — for secrets and
|
|
15
|
+
* per-machine overrides
|
|
16
|
+
* 4. the documented default in {@link HETZNER_DEFAULTS}
|
|
17
|
+
*
|
|
18
|
+
* Config beats environment deliberately, for every field without exception: a
|
|
19
|
+
* value written in `cloud.config.ts` is the reviewed intent for the project,
|
|
20
|
+
* and a stray shell export should not silently redirect a deploy to another
|
|
21
|
+
* datacenter or another account. One rule, no special cases to remember.
|
|
22
|
+
*
|
|
23
|
+
* In practice the token is simply left out of `cloud.config.ts` (it is a
|
|
24
|
+
* secret), so it comes from `HCLOUD_TOKEN` — but that is a convention, not a
|
|
25
|
+
* different precedence.
|
|
26
|
+
*/
|
|
27
|
+
import type { CloudConfig } from '@ts-cloud/core';
|
|
28
|
+
/** The documented defaults. These are the only place a Hetzner default lives. */
|
|
29
|
+
export declare const HETZNER_DEFAULTS: {
|
|
30
|
+
/** Falkenstein, Germany. */
|
|
31
|
+
readonly location: 'fsn1';
|
|
32
|
+
readonly image: 'ubuntu-24.04';
|
|
33
|
+
readonly sshUser: 'root';
|
|
34
|
+
readonly sshPrivateKeyPath: '~/.ssh/id_ed25519';
|
|
35
|
+
};
|
|
36
|
+
/** `~/…` → an absolute path. Hetzner key paths are user-supplied and often use `~`. */
|
|
37
|
+
export declare function expandHome(path: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* The Hetzner API token, or undefined when none is set.
|
|
40
|
+
*
|
|
41
|
+
* Never defaulted: a missing token must fail loudly at the call site rather
|
|
42
|
+
* than silently targeting the wrong account. Callers that need one should use
|
|
43
|
+
* `requireHetznerApiToken`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveHetznerApiToken(explicit?: string, config?: CloudConfig): string | undefined;
|
|
46
|
+
/** Datacenter location slug, e.g. `fsn1`, `nbg1`, `hel1`. */
|
|
47
|
+
export declare function resolveHetznerLocation(config?: CloudConfig, explicit?: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Server image slug.
|
|
50
|
+
*
|
|
51
|
+
* `infrastructure.compute.image` wins over `hetzner.image`: it is the
|
|
52
|
+
* provider-agnostic way to pin an image (and is what a golden-image bake sets),
|
|
53
|
+
* so it is the more specific statement of intent.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveHetznerImage(config?: CloudConfig, explicit?: string): string;
|
|
56
|
+
/** SSH user for deploy commands. */
|
|
57
|
+
export declare function resolveHetznerSshUser(config?: CloudConfig, explicit?: string): string;
|
|
58
|
+
/** Absolute path to the SSH private key used for deploy commands. */
|
|
59
|
+
export declare function resolveHetznerSshPrivateKeyPath(config?: CloudConfig, explicit?: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Absolute path to the SSH public key uploaded to Hetzner. Defaults to the
|
|
62
|
+
* private key's path with `.pub`, which is where `ssh-keygen` puts it.
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveHetznerSshPublicKeyPath(config?: CloudConfig, explicit?: string, privateKeyPath?: string): string;
|
|
65
|
+
/** Every resolved Hetzner setting, for a driver or a diagnostic to read at once. */
|
|
66
|
+
export interface ResolvedHetznerSettings {
|
|
67
|
+
apiToken?: string;
|
|
68
|
+
location: string;
|
|
69
|
+
image: string;
|
|
70
|
+
sshUser: string;
|
|
71
|
+
sshPrivateKeyPath: string;
|
|
72
|
+
sshPublicKeyPath: string;
|
|
73
|
+
}
|
|
74
|
+
export interface HetznerOverrides {
|
|
75
|
+
apiToken?: string;
|
|
76
|
+
location?: string;
|
|
77
|
+
image?: string;
|
|
78
|
+
sshUser?: string;
|
|
79
|
+
sshPrivateKeyPath?: string;
|
|
80
|
+
sshPublicKeyPath?: string;
|
|
81
|
+
}
|
|
82
|
+
/** Resolve the full Hetzner settings for `config`, applying `overrides` first. */
|
|
83
|
+
export declare function resolveHetznerSettings(config?: CloudConfig, overrides?: HetznerOverrides): ResolvedHetznerSettings;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/drivers/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
sanitizeCloudConfig,
|
|
56
56
|
setMaintenance,
|
|
57
57
|
startLocalDashboardServer
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-nt2hrnva.js";
|
|
59
59
|
import {
|
|
60
60
|
buildAndPushServerlessImage
|
|
61
61
|
} from "./chunk-qgnyzfmx.js";
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
waitForCloudInit,
|
|
106
106
|
waitForSsh,
|
|
107
107
|
wrapCloudInitUserData
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-xgnxz5dz.js";
|
|
109
109
|
import {
|
|
110
110
|
ABTestManager,
|
|
111
111
|
AI,
|