redkite 0.1.7 → 0.1.8
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/README.md +313 -25
- package/dist/checks.d.ts.map +1 -1
- package/dist/checks.js +4 -0
- package/dist/checks.js.map +1 -1
- package/dist/cli/agent.d.ts +2 -0
- package/dist/cli/agent.d.ts.map +1 -1
- package/dist/cli/agent.js +23 -1
- package/dist/cli/agent.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +98 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -1
- package/dist/config.js.map +1 -1
- package/dist/deploy.d.ts +4 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +77 -23
- package/dist/deploy.js.map +1 -1
- package/dist/dockerfile.js +6 -7
- package/dist/dockerfile.js.map +1 -1
- package/dist/environment.d.ts +5 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +20 -0
- package/dist/environment.js.map +1 -0
- package/dist/host.d.ts +2 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +6 -0
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/localHost.d.ts.map +1 -1
- package/dist/localHost.js +2 -0
- package/dist/localHost.js.map +1 -1
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +21 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugins/bitwarden.d.ts +11 -0
- package/dist/plugins/bitwarden.d.ts.map +1 -0
- package/dist/plugins/bitwarden.js +40 -0
- package/dist/plugins/bitwarden.js.map +1 -0
- package/dist/plugins/digitalOcean.d.ts +19 -0
- package/dist/plugins/digitalOcean.d.ts.map +1 -0
- package/dist/plugins/digitalOcean.js +71 -0
- package/dist/plugins/digitalOcean.js.map +1 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +5 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/rds.d.ts +14 -0
- package/dist/plugins/rds.d.ts.map +1 -0
- package/dist/plugins/rds.js +86 -0
- package/dist/plugins/rds.js.map +1 -0
- package/dist/plugins/snapshot.d.ts +7 -0
- package/dist/plugins/snapshot.d.ts.map +1 -0
- package/dist/plugins/snapshot.js +29 -0
- package/dist/plugins/snapshot.js.map +1 -0
- package/dist/presets/nodeApp.d.ts +1 -2
- package/dist/presets/nodeApp.d.ts.map +1 -1
- package/dist/presets/nodeApp.js +0 -1
- package/dist/presets/nodeApp.js.map +1 -1
- package/dist/recover.d.ts +19 -0
- package/dist/recover.d.ts.map +1 -0
- package/dist/recover.js +58 -0
- package/dist/recover.js.map +1 -0
- package/dist/secrets/store.d.ts +5 -2
- package/dist/secrets/store.d.ts.map +1 -1
- package/dist/secrets/store.js +25 -14
- package/dist/secrets/store.js.map +1 -1
- package/dist/sshHost.d.ts +2 -0
- package/dist/sshHost.d.ts.map +1 -1
- package/dist/sshHost.js +29 -11
- package/dist/sshHost.js.map +1 -1
- package/dist/steps.d.ts +0 -7
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +6 -3
- package/dist/steps.js.map +1 -1
- package/dist/types.d.ts +4 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/checks.ts +4 -0
- package/src/cli/agent.ts +28 -1
- package/src/cli/index.ts +118 -29
- package/src/config.ts +19 -1
- package/src/deploy.ts +101 -29
- package/src/dockerfile.ts +7 -11
- package/src/environment.ts +24 -0
- package/src/host.ts +11 -0
- package/src/index.ts +4 -1
- package/src/localHost.ts +3 -0
- package/src/plugin.ts +50 -0
- package/src/plugins/bitwarden.ts +57 -0
- package/src/plugins/digitalOcean.ts +111 -0
- package/src/plugins/index.ts +4 -0
- package/src/plugins/rds.ts +126 -0
- package/src/plugins/snapshot.ts +44 -0
- package/src/presets/nodeApp.ts +1 -3
- package/src/recover.ts +90 -0
- package/src/secrets/store.ts +39 -20
- package/src/sshHost.ts +35 -11
- package/src/steps.ts +7 -6
- package/src/types.ts +22 -12
- package/dist/secrets/bitwarden.d.ts +0 -3
- package/dist/secrets/bitwarden.d.ts.map +0 -1
- package/dist/secrets/bitwarden.js +0 -6
- package/dist/secrets/bitwarden.js.map +0 -1
- package/src/secrets/bitwarden.ts +0 -7
package/src/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AnyStep } from "./pipeline.js";
|
|
2
|
+
import type { Plugin } from "./plugin.js";
|
|
2
3
|
|
|
3
4
|
// The shapes a deploy config is written against. Nothing here knows about
|
|
4
5
|
// Docker or git, so a config can be planned and asserted on without a host to
|
|
@@ -33,11 +34,26 @@ export type Environment = {
|
|
|
33
34
|
// the alias the apps know it by
|
|
34
35
|
export type StepNetwork = "host" | "deployment" | "none" | { named: string };
|
|
35
36
|
|
|
37
|
+
// How the deploy host proves it is the machine it says it is, before a key,
|
|
38
|
+
// an environment file or an image is handed to it
|
|
39
|
+
export type HostKeys =
|
|
40
|
+
// Trusted the first time and refused if the key ever changes after that,
|
|
41
|
+
// which is what a host on a stable address wants and needs no setup
|
|
42
|
+
| "accept-new"
|
|
43
|
+
// Refused unless it is already in known_hosts. Nothing is taken on trust,
|
|
44
|
+
// at the cost of putting the key there before the first deploy
|
|
45
|
+
| "strict"
|
|
46
|
+
// Checked not at all. For a host whose address is handed out again and
|
|
47
|
+
// again, and only where nothing on the way to it can be listened to
|
|
48
|
+
| "off";
|
|
49
|
+
|
|
36
50
|
export type DeployHost = {
|
|
37
51
|
// SSH destination, user@address
|
|
38
52
|
bastion: string;
|
|
39
53
|
// Socket path on that machine. Local when absent, deploying to this one
|
|
40
54
|
socket?: string;
|
|
55
|
+
// Defaults to accept-new
|
|
56
|
+
hostKeys?: HostKeys;
|
|
41
57
|
};
|
|
42
58
|
|
|
43
59
|
// One item in a store, named at the point of use rather than through a lookup
|
|
@@ -127,16 +143,6 @@ export type BuildSpec = {
|
|
|
127
143
|
// Shell commands run in the runtime image, for what a package manager cannot
|
|
128
144
|
// install. Above the output copy, so a new commit does not repeat them
|
|
129
145
|
runtimeSteps: string[];
|
|
130
|
-
// Uploads source maps during the build, then deletes them from the image
|
|
131
|
-
sourcemaps?: SourcemapSpec;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export type SourcemapSpec = {
|
|
135
|
-
// Which service receives the maps, "sentry" is the only one today
|
|
136
|
-
provider: "sentry";
|
|
137
|
-
// Env var stripped from the shipped file, it is a build-time credential and
|
|
138
|
-
// has no reason to travel inside the image
|
|
139
|
-
stripFromImage: string;
|
|
140
146
|
};
|
|
141
147
|
|
|
142
148
|
// How a build is decided to work. The commands run in the builder image, which
|
|
@@ -237,7 +243,11 @@ export type Deployment = {
|
|
|
237
243
|
// The applications. Everything derived, addresses, container names, nginx
|
|
238
244
|
// upstreams and location blocks, is a function of this list
|
|
239
245
|
apps: AppSpec[];
|
|
240
|
-
// Work injected into the run
|
|
241
|
-
//
|
|
246
|
+
// Work injected into the run. Addressed by where it runs, so nothing here
|
|
247
|
+
// has to be called
|
|
242
248
|
steps?: AnyStep[];
|
|
249
|
+
// Everything this deployment opts into: the vault that answers its secret
|
|
250
|
+
// refs, and whatever else brings steps of its own. Nothing a plugin carries
|
|
251
|
+
// happens until it is listed here, redkite's own vault included
|
|
252
|
+
plugins?: Plugin[];
|
|
243
253
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitwarden.d.ts","sourceRoot":"","sources":["../../src/secrets/bitwarden.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAE/C"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Names an item in a Bitwarden vault. The id is not a secret, it is a pointer,
|
|
2
|
-
// so it belongs in the config while the credentials arrive at deploy time
|
|
3
|
-
export function bitwarden(id) {
|
|
4
|
-
return { provider: "bitwarden", id };
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=bitwarden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitwarden.js","sourceRoot":"","sources":["../../src/secrets/bitwarden.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,0EAA0E;AAC1E,MAAM,UAAU,SAAS,CAAC,EAAU;IAClC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;AACvC,CAAC"}
|
package/src/secrets/bitwarden.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SecretRef } from "../types.js";
|
|
2
|
-
|
|
3
|
-
// Names an item in a Bitwarden vault. The id is not a secret, it is a pointer,
|
|
4
|
-
// so it belongs in the config while the credentials arrive at deploy time
|
|
5
|
-
export function bitwarden(id: string): SecretRef {
|
|
6
|
-
return { provider: "bitwarden", id };
|
|
7
|
-
}
|