@stacksjs/ts-cloud 0.7.11 → 0.7.13
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 +176 -174
- package/dist/{chunk-1518raqr.js → chunk-fy85hcfy.js} +1 -1
- package/dist/{chunk-nw5nnffj.js → chunk-jg4f2ybx.js} +23 -5
- package/dist/deploy/index.js +2 -2
- package/dist/drivers/aws/driver.d.ts +1 -1
- package/dist/drivers/hetzner/driver.d.ts +2 -1
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/local-box/driver.d.ts +1 -1
- package/dist/drivers/shared/box-provision.d.ts +2 -2
- package/dist/drivers/shared/package-manager.d.ts +14 -14
- package/dist/index.js +2 -2
- package/dist/ssl/acme-client.d.ts +2 -2
- package/dist/ui/index.html +3 -3
- package/dist/ui/server/actions.html +3 -3
- package/dist/ui/server/backups.html +3 -3
- package/dist/ui/server/database.html +3 -3
- package/dist/ui/server/deployments.html +3 -3
- package/dist/ui/server/firewall.html +3 -3
- package/dist/ui/server/logs.html +3 -3
- package/dist/ui/server/services.html +3 -3
- package/dist/ui/server/sites.html +3 -3
- package/dist/ui/server/ssh-keys.html +3 -3
- package/dist/ui/server/terminal.html +3 -3
- package/dist/ui/server/workers.html +3 -3
- package/dist/ui/serverless/alarms.html +3 -3
- package/dist/ui/serverless/assets.html +3 -3
- package/dist/ui/serverless/data.html +3 -3
- package/dist/ui/serverless/deployments.html +3 -3
- package/dist/ui/serverless/functions.html +3 -3
- package/dist/ui/serverless/logs.html +3 -3
- package/dist/ui/serverless/queues.html +3 -3
- package/dist/ui/serverless/scheduler.html +3 -3
- package/dist/ui/serverless/secrets.html +3 -3
- package/dist/ui/serverless/traces.html +3 -3
- package/dist/ui/serverless.html +3 -3
- package/package.json +3 -3
|
@@ -2218,6 +2218,20 @@ async function writeDriverState(stackName, state) {
|
|
|
2218
2218
|
|
|
2219
2219
|
// src/drivers/hetzner/driver.ts
|
|
2220
2220
|
var SSH_MAX_BUFFER = 1024 * 1024 * 256;
|
|
2221
|
+
var SSH_ERROR_OUTPUT_LIMIT = 8000;
|
|
2222
|
+
function sshErrorOutput(value) {
|
|
2223
|
+
const output = Buffer.isBuffer(value) ? value.toString("utf8") : typeof value === "string" ? value : "";
|
|
2224
|
+
return output.replace(/(^|\n)([A-Z][A-Z0-9_]*=).*$/gm, "$1$2[redacted]").replace(/encrypted:[A-Za-z0-9+/=]+/g, "encrypted:[redacted]").trim().slice(-SSH_ERROR_OUTPUT_LIMIT);
|
|
2225
|
+
}
|
|
2226
|
+
function formatSshFailure(error) {
|
|
2227
|
+
const childError = error;
|
|
2228
|
+
const status = typeof childError?.status === "number" ? ` (exit ${childError.status})` : "";
|
|
2229
|
+
const signal = childError?.signal ? ` (signal ${childError.signal})` : "";
|
|
2230
|
+
const output = [sshErrorOutput(childError?.stderr), sshErrorOutput(childError?.stdout)].filter(Boolean).join(`
|
|
2231
|
+
`);
|
|
2232
|
+
return `Remote SSH command failed${status}${signal}${output ? `
|
|
2233
|
+
${output}` : ""}`;
|
|
2234
|
+
}
|
|
2221
2235
|
function expandHome(path) {
|
|
2222
2236
|
return path.startsWith("~/") ? join3(homedir(), path.slice(2)) : path;
|
|
2223
2237
|
}
|
|
@@ -3026,11 +3040,15 @@ ${out}`);
|
|
|
3026
3040
|
}
|
|
3027
3041
|
sshExec(host, script) {
|
|
3028
3042
|
const escaped = script.replace(/'/g, `'\\''`);
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3043
|
+
try {
|
|
3044
|
+
return execSync(`ssh ${this.sshBaseArgs(host).map((a) => `"${a.replace(/"/g, "\\\"")}"`).join(" ")} '${escaped}'`, {
|
|
3045
|
+
encoding: "utf8",
|
|
3046
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
3047
|
+
maxBuffer: SSH_MAX_BUFFER
|
|
3048
|
+
});
|
|
3049
|
+
} catch (error) {
|
|
3050
|
+
throw new Error(formatSshFailure(error));
|
|
3051
|
+
}
|
|
3034
3052
|
}
|
|
3035
3053
|
}
|
|
3036
3054
|
|
package/dist/deploy/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
sanitizeCloudConfig,
|
|
13
13
|
setMaintenance,
|
|
14
14
|
startLocalDashboardServer
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-fy85hcfy.js";
|
|
16
16
|
import {
|
|
17
17
|
buildAndPushServerlessImage
|
|
18
18
|
} from "../chunk-m03vddvr.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveSiteKind,
|
|
30
30
|
resolveUiSource,
|
|
31
31
|
validateDeploymentConfig
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-jg4f2ybx.js";
|
|
33
33
|
import"../chunk-vsgkcpqw.js";
|
|
34
34
|
import"../chunk-93hjhs78.js";
|
|
35
35
|
import {
|
|
@@ -11,7 +11,7 @@ export interface AwsDriverOptions {
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function readPinnedInstanceId(stackName: string): string | null;
|
|
13
13
|
export declare class AwsDriver implements CloudDriver {
|
|
14
|
-
readonly name:
|
|
14
|
+
readonly name: 'aws';
|
|
15
15
|
readonly usesCloudFormation = true;
|
|
16
16
|
private region;
|
|
17
17
|
constructor(options?: AwsDriverOptions);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CloudDriver, ComputeStackOutputs, ComputeTarget, FindComputeTargetsOptions, ProvisionComputeOptions, RemoteDeployResult, RunRemoteDeployOptions, UploadReleaseOptions, UploadReleaseResult } from '@ts-cloud/core';
|
|
2
2
|
import { HetznerClient } from './client';
|
|
3
|
+
export declare function formatSshFailure(error: unknown): string;
|
|
3
4
|
export interface HetznerDriverOptions {
|
|
4
5
|
apiToken?: string;
|
|
5
6
|
sshPrivateKeyPath?: string;
|
|
@@ -30,7 +31,7 @@ export interface HetznerDriverOptions {
|
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
export declare class HetznerDriver implements CloudDriver {
|
|
33
|
-
readonly name:
|
|
34
|
+
readonly name: 'hetzner';
|
|
34
35
|
readonly usesCloudFormation = false;
|
|
35
36
|
private client;
|
|
36
37
|
private sshPrivateKeyPath;
|
package/dist/drivers/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import type { CloudDriver, ComputeStackOutputs, ComputeTarget, FindComputeTarget
|
|
|
9
9
|
* the box; provisioning/upload methods are inert (the box is already up).
|
|
10
10
|
*/
|
|
11
11
|
export declare class LocalBoxDriver implements CloudDriver {
|
|
12
|
-
readonly name:
|
|
12
|
+
readonly name: 'hetzner';
|
|
13
13
|
readonly usesCloudFormation = false;
|
|
14
14
|
getComputeOutputs(): Promise<ComputeStackOutputs>;
|
|
15
15
|
uploadRelease(options: UploadReleaseOptions): Promise<UploadReleaseResult>;
|
|
@@ -63,7 +63,7 @@ export declare const UBUNTU_2404_AMI_PARAM = "/aws/service/canonical/ubuntu/serv
|
|
|
63
63
|
export declare function buildBoxUserData(spec: Pick<BoxSpec, 'sshPublicKey' | 'bootstrapScript'>): string;
|
|
64
64
|
export declare class HetznerBoxProvisioner implements BoxProvisioner {
|
|
65
65
|
private client;
|
|
66
|
-
readonly provider:
|
|
66
|
+
readonly provider: 'hetzner';
|
|
67
67
|
constructor(client: HetznerClient);
|
|
68
68
|
ensureBox(spec: BoxSpec): Promise<ProvisionedBox>;
|
|
69
69
|
destroyBox(name: string): Promise<{
|
|
@@ -79,7 +79,7 @@ export interface AwsBoxProvisionerOptions {
|
|
|
79
79
|
ssm: BoxSsmClient;
|
|
80
80
|
}
|
|
81
81
|
export declare class AwsBoxProvisioner implements BoxProvisioner {
|
|
82
|
-
readonly provider:
|
|
82
|
+
readonly provider: 'aws';
|
|
83
83
|
private ec2;
|
|
84
84
|
private ssm;
|
|
85
85
|
constructor(options: AwsBoxProvisionerOptions);
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
* is a source build carrying the full Laravel extension matrix).
|
|
22
22
|
*/
|
|
23
23
|
export declare const PANTRY_PACKAGES: {
|
|
24
|
-
readonly php:
|
|
25
|
-
readonly nginx:
|
|
26
|
-
readonly composer:
|
|
27
|
-
readonly mysql:
|
|
28
|
-
readonly mariadb:
|
|
29
|
-
readonly postgres:
|
|
30
|
-
readonly redis:
|
|
31
|
-
readonly memcached:
|
|
32
|
-
readonly meilisearch:
|
|
33
|
-
readonly git:
|
|
34
|
-
readonly certbot:
|
|
35
|
-
readonly bun:
|
|
36
|
-
readonly node:
|
|
37
|
-
readonly deno:
|
|
24
|
+
readonly php: 'php.net';
|
|
25
|
+
readonly nginx: 'nginx.org';
|
|
26
|
+
readonly composer: 'getcomposer.org';
|
|
27
|
+
readonly mysql: 'mysql.com';
|
|
28
|
+
readonly mariadb: 'mariadb.com/server';
|
|
29
|
+
readonly postgres: 'postgresql.org';
|
|
30
|
+
readonly redis: 'redis.io';
|
|
31
|
+
readonly memcached: 'memcached.org';
|
|
32
|
+
readonly meilisearch: 'meilisearch.com';
|
|
33
|
+
readonly git: 'git-scm.com';
|
|
34
|
+
readonly certbot: 'certbot.eff.org';
|
|
35
|
+
readonly bun: 'bun.sh';
|
|
36
|
+
readonly node: 'nodejs.org';
|
|
37
|
+
readonly deno: 'deno.land';
|
|
38
38
|
};
|
|
39
39
|
/** Logical package key (`'php'`, `'nginx'`, …). */
|
|
40
40
|
export type PantryPackageKey = keyof typeof PANTRY_PACKAGES;
|
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-fy85hcfy.js";
|
|
59
59
|
import {
|
|
60
60
|
buildAndPushServerlessImage
|
|
61
61
|
} from "./chunk-m03vddvr.js";
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
waitForCloudInit,
|
|
106
106
|
waitForSsh,
|
|
107
107
|
wrapCloudInitUserData
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-jg4f2ybx.js";
|
|
109
109
|
import {
|
|
110
110
|
ABTestManager,
|
|
111
111
|
AI,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This is a pure TypeScript/Bun implementation without external dependencies.
|
|
6
6
|
*/
|
|
7
7
|
export declare const ACME_DIRECTORIES: {
|
|
8
|
-
readonly production:
|
|
9
|
-
readonly staging:
|
|
8
|
+
readonly production: 'https://acme-v02.api.letsencrypt.org/directory';
|
|
9
|
+
readonly staging: 'https://acme-staging-v02.api.letsencrypt.org/directory';
|
|
10
10
|
};
|
|
11
11
|
export interface AcmeClientOptions {
|
|
12
12
|
/**
|