blogwright 0.4.0 → 0.5.0
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 +4 -1
- package/agent/agent-manifest.json +1 -1
- package/agent/server.js +2610 -616
- package/dist/adapters/process-aws-login.d.ts +19 -0
- package/dist/adapters/process-aws-login.js +28 -0
- package/dist/agent-package.js +2 -3
- package/dist/artifacts.d.ts +73 -0
- package/dist/artifacts.js +218 -0
- package/dist/aws-session.d.ts +118 -0
- package/dist/aws-session.js +360 -0
- package/dist/bin.js +6 -2
- package/dist/cache-control.d.ts +66 -0
- package/dist/cache-control.js +176 -0
- package/dist/cli.d.ts +22 -3
- package/dist/cli.js +122 -31
- package/dist/commands.d.ts +41 -9
- package/dist/commands.js +135 -126
- package/dist/context.d.ts +27 -5
- package/dist/context.js +59 -19
- package/dist/deploy.d.ts +78 -6
- package/dist/deploy.js +136 -52
- package/dist/init.d.ts +14 -2
- package/dist/init.js +145 -4
- package/dist/known-commands.d.ts +11 -9
- package/dist/known-commands.js +15 -9
- package/dist/live-release.d.ts +78 -0
- package/dist/live-release.js +159 -0
- package/dist/lock.d.ts +50 -0
- package/dist/lock.js +120 -0
- package/dist/nodes.d.ts +18 -0
- package/dist/nodes.js +405 -30
- package/dist/plugin-commands.d.ts +21 -0
- package/dist/plugin-commands.js +54 -3
- package/dist/plugins.d.ts +11 -9
- package/dist/plugins.js +29 -16
- package/dist/ports.d.ts +22 -1
- package/dist/releases.d.ts +54 -0
- package/dist/releases.js +527 -0
- package/dist/render.d.ts +18 -1
- package/dist/render.js +38 -6
- package/dist/repo.js +2 -3
- package/dist/rkey.d.ts +4 -3
- package/dist/rkey.js +4 -3
- package/dist/serving.d.ts +28 -0
- package/dist/serving.js +47 -0
- package/dist/verify.d.ts +45 -0
- package/dist/verify.js +183 -0
- package/dist/whoami.d.ts +23 -0
- package/dist/whoami.js +88 -0
- package/package.json +8 -8
package/dist/plugin-commands.js
CHANGED
|
@@ -134,8 +134,9 @@ const DEFAULT_ENV = 'production';
|
|
|
134
134
|
* Flags forwarded into a plugin action's `args`, in this fixed order so the
|
|
135
135
|
* rendered array is deterministic regardless of property-iteration order.
|
|
136
136
|
* `env` is excluded - it is consumed as the environment override, never
|
|
137
|
-
* forwarded as a data flag; `plain` and `help` are session-level
|
|
138
|
-
* `main` itself, never a plugin action's business
|
|
137
|
+
* forwarded as a data flag; `plain`, `profile` and `help` are session-level
|
|
138
|
+
* concerns of `main` itself, never a plugin action's business - a plugin sees
|
|
139
|
+
* the profile's effect through `ctx.clients`.
|
|
139
140
|
*/
|
|
140
141
|
const FORWARDED_FLAGS = [
|
|
141
142
|
'domain',
|
|
@@ -575,6 +576,7 @@ export async function runPlugin(command, rest, values, terminal, logger, makeCon
|
|
|
575
576
|
configPath: values.config,
|
|
576
577
|
domain: values.domain,
|
|
577
578
|
endpointOverride: values.endpoint,
|
|
579
|
+
profile: values.profile,
|
|
578
580
|
ports: { terminal, fs: ports.fs, loader: ports.loader },
|
|
579
581
|
});
|
|
580
582
|
// Validated BEFORE `toPluginContext`, which loads the plugin's own scoped
|
|
@@ -586,6 +588,54 @@ export async function runPlugin(command, rest, values, terminal, logger, makeCon
|
|
|
586
588
|
await match.command.run(await toPluginContext(ctx, plugin.name, pluginConfig), args);
|
|
587
589
|
return 0;
|
|
588
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* Run every installed plugin's `afterDeploy` hook (`blogwright-core`'s
|
|
593
|
+
* `plugin.ts`) once `deploy` has published the site - the one point at which
|
|
594
|
+
* a built-in command runs discovery, and only after its own work is done, so
|
|
595
|
+
* a deploy that fails never loads a plugin.
|
|
596
|
+
*
|
|
597
|
+
* Nothing here is fatal, at any step: the site is already live, so a
|
|
598
|
+
* discovery precondition failing, a plugin failing to load, a plugin's config
|
|
599
|
+
* block being refused, and a hook rejecting are each reported as one warning
|
|
600
|
+
* and the deploy still exits 0 - the same contract the pds sync has always
|
|
601
|
+
* had (`syncAfterDeploy`, `packages/pds/src/commands.ts`). One plugin's
|
|
602
|
+
* failure never stops the next plugin's hook.
|
|
603
|
+
*
|
|
604
|
+
* Each hook gets the same context a dispatched command does: the plugin's own
|
|
605
|
+
* block resolved through {@link resolvePluginConfig} and the scoped
|
|
606
|
+
* {@link toPluginContext}, so a hook reads `pluginConfig` and its own state
|
|
607
|
+
* exactly as its commands do.
|
|
608
|
+
*/
|
|
609
|
+
export async function runAfterDeployHooks(ops, ports) {
|
|
610
|
+
let plugins;
|
|
611
|
+
try {
|
|
612
|
+
const discovered = await discover(await findRepoRoot(ports.fs), cliPackageDir(), ports);
|
|
613
|
+
for (const failure of discovered.failures) {
|
|
614
|
+
ops.logger.warn(`${failure.packageName} could not be loaded, so no post-deploy step it adds ran ` +
|
|
615
|
+
`(deploy unaffected): ${failure.reason}`);
|
|
616
|
+
}
|
|
617
|
+
plugins = discovered.plugins;
|
|
618
|
+
}
|
|
619
|
+
catch (err) {
|
|
620
|
+
ops.logger.warn(`plugin discovery failed, so no plugin post-deploy step ran (deploy unaffected): ` +
|
|
621
|
+
err.message);
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
for (const found of plugins) {
|
|
625
|
+
// Widened to `Plugin<unknown>` without a cast, exactly as `runPlugin` does.
|
|
626
|
+
const plugin = found;
|
|
627
|
+
if (typeof plugin.afterDeploy !== 'function')
|
|
628
|
+
continue;
|
|
629
|
+
try {
|
|
630
|
+
const pluginConfig = resolvePluginConfig(plugin, ops.configDocument);
|
|
631
|
+
await plugin.afterDeploy(await toPluginContext(ops, plugin.name, pluginConfig));
|
|
632
|
+
}
|
|
633
|
+
catch (err) {
|
|
634
|
+
ops.logger.warn(`plugin "${plugin.name}" post-deploy step failed (deploy unaffected): ` +
|
|
635
|
+
err.message);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
589
639
|
/*
|
|
590
640
|
* TASK 17 - the built-in `plugin` namespace.
|
|
591
641
|
*
|
|
@@ -594,7 +644,7 @@ export async function runPlugin(command, rest, values, terminal, logger, makeCon
|
|
|
594
644
|
* can ever claim the name, and `cli.ts` dispatches it directly. It is
|
|
595
645
|
* dispatched BEFORE `createContext` - beside the `init` branch, not from the
|
|
596
646
|
* built-in `switch` - because `createContext` loads the environment's config
|
|
597
|
-
* and calls `sts
|
|
647
|
+
* and calls `sts:GetCallerIdentity`, neither of which holds on the repo this
|
|
598
648
|
* namespace exists to serve: `blogwright plugin list` on a checkout with no
|
|
599
649
|
* `config/<env>.jsonc` and no AWS credentials would otherwise fail with `no
|
|
600
650
|
* config found for environment "production"` instead of printing the
|
|
@@ -863,6 +913,7 @@ async function destroyBeforeRemoval(plugin, nodesOf, env, ports, terminal, deps)
|
|
|
863
913
|
configPath: deps.values.config,
|
|
864
914
|
domain: deps.values.domain,
|
|
865
915
|
endpointOverride: deps.values.endpoint,
|
|
916
|
+
profile: deps.values.profile,
|
|
866
917
|
ports: { terminal, fs: ports.fs, loader: ports.loader },
|
|
867
918
|
});
|
|
868
919
|
const pluginConfig = resolvePluginConfig(plugin, ops.configDocument);
|
package/dist/plugins.d.ts
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* default export against core's `Plugin` contract.
|
|
5
5
|
*
|
|
6
6
|
* The candidate set is the UNION of two sources, each resolved from its own
|
|
7
|
-
* directory - see `collectCandidates` below - because a
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* directory - see `collectCandidates` below - because a plugin listed in the
|
|
8
|
+
* CLI's own `dependencies` reaches a consuming repo that depends on
|
|
9
|
+
* `blogwright` alone, and scanning the consumer's `package.json` would never
|
|
10
|
+
* find it. The CLI bundles no plugin today - pds and analytics are both
|
|
11
|
+
* installed by the sites that use them (`blogwright plugin add`) - but the
|
|
12
|
+
* bundled half stays, and reads only `dependencies`, never `devDependencies`.
|
|
11
13
|
*
|
|
12
14
|
* Collect, never throw, for anything candidate-specific: a broken plugin -
|
|
13
15
|
* one that fails to resolve, whose manifest is malformed, or whose default
|
|
@@ -37,17 +39,17 @@
|
|
|
37
39
|
* now BREAK the namespace rather than merely shadow it. Task 29 deleted
|
|
38
40
|
* `cli.ts`'s hardcoded `command === 'pds'` branch: there is no built-in
|
|
39
41
|
* `pds` command left for a reservation to protect, and `blogwright pds
|
|
40
|
-
* <action>` is answered by the
|
|
41
|
-
* declares the plugin name `pds` and is discovered here like any other
|
|
42
|
+
* <action>` is answered by the `blogwright-pds` package a site installs,
|
|
43
|
+
* which declares the plugin name `pds` and is discovered here like any other
|
|
42
44
|
* plugin. Reserving the name would therefore aim
|
|
43
|
-
* `resolveNamespaceCollisions` below at that
|
|
45
|
+
* `resolveNamespaceCollisions` below at that plugin itself: it would
|
|
44
46
|
* become a `failures` entry rather than an installed one, and the namespace
|
|
45
47
|
* would stop working outright - `blogwright pds sync` exiting 1 with `no
|
|
46
48
|
* built-in command or installed plugin claims "pds"`, `blogwright --help`
|
|
47
49
|
* listing none of its six actions, and `blogwright plugin list` reporting it
|
|
48
50
|
* as reserved for a built-in command that no longer exists. Verified by
|
|
49
|
-
* adding `'pds'` to the set: discovery rejects the real
|
|
50
|
-
* this file's real-disk integration cases fail on exactly that reason
|
|
51
|
+
* adding `'pds'` to the set: discovery rejects the real installed package
|
|
52
|
+
* and this file's real-disk integration cases fail on exactly that reason
|
|
51
53
|
* string. So the name stays unreserved on purpose, pinned by a test below.
|
|
52
54
|
*
|
|
53
55
|
* DECISION (task 13, record here for task 16 to find): a plugin's declared
|
package/dist/plugins.js
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* default export against core's `Plugin` contract.
|
|
5
5
|
*
|
|
6
6
|
* The candidate set is the UNION of two sources, each resolved from its own
|
|
7
|
-
* directory - see `collectCandidates` below - because a
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* directory - see `collectCandidates` below - because a plugin listed in the
|
|
8
|
+
* CLI's own `dependencies` reaches a consuming repo that depends on
|
|
9
|
+
* `blogwright` alone, and scanning the consumer's `package.json` would never
|
|
10
|
+
* find it. The CLI bundles no plugin today - pds and analytics are both
|
|
11
|
+
* installed by the sites that use them (`blogwright plugin add`) - but the
|
|
12
|
+
* bundled half stays, and reads only `dependencies`, never `devDependencies`.
|
|
11
13
|
*
|
|
12
14
|
* Collect, never throw, for anything candidate-specific: a broken plugin -
|
|
13
15
|
* one that fails to resolve, whose manifest is malformed, or whose default
|
|
@@ -37,17 +39,17 @@
|
|
|
37
39
|
* now BREAK the namespace rather than merely shadow it. Task 29 deleted
|
|
38
40
|
* `cli.ts`'s hardcoded `command === 'pds'` branch: there is no built-in
|
|
39
41
|
* `pds` command left for a reservation to protect, and `blogwright pds
|
|
40
|
-
* <action>` is answered by the
|
|
41
|
-
* declares the plugin name `pds` and is discovered here like any other
|
|
42
|
+
* <action>` is answered by the `blogwright-pds` package a site installs,
|
|
43
|
+
* which declares the plugin name `pds` and is discovered here like any other
|
|
42
44
|
* plugin. Reserving the name would therefore aim
|
|
43
|
-
* `resolveNamespaceCollisions` below at that
|
|
45
|
+
* `resolveNamespaceCollisions` below at that plugin itself: it would
|
|
44
46
|
* become a `failures` entry rather than an installed one, and the namespace
|
|
45
47
|
* would stop working outright - `blogwright pds sync` exiting 1 with `no
|
|
46
48
|
* built-in command or installed plugin claims "pds"`, `blogwright --help`
|
|
47
49
|
* listing none of its six actions, and `blogwright plugin list` reporting it
|
|
48
50
|
* as reserved for a built-in command that no longer exists. Verified by
|
|
49
|
-
* adding `'pds'` to the set: discovery rejects the real
|
|
50
|
-
* this file's real-disk integration cases fail on exactly that reason
|
|
51
|
+
* adding `'pds'` to the set: discovery rejects the real installed package
|
|
52
|
+
* and this file's real-disk integration cases fail on exactly that reason
|
|
51
53
|
* string. So the name stays unreserved on purpose, pinned by a test below.
|
|
52
54
|
*
|
|
53
55
|
* DECISION (task 13, record here for task 16 to find): a plugin's declared
|
|
@@ -142,10 +144,10 @@ async function readDependencyManifest(fs, packageJsonPath, role) {
|
|
|
142
144
|
}
|
|
143
145
|
return parsed;
|
|
144
146
|
}
|
|
145
|
-
/** Every
|
|
146
|
-
function pluginDependencyNames(pkg) {
|
|
147
|
+
/** Every name starting with `blogwright-` in the given dependency maps, deduplicated and sorted. */
|
|
148
|
+
function pluginDependencyNames(pkg, fields = ['dependencies', 'devDependencies']) {
|
|
147
149
|
const names = new Set();
|
|
148
|
-
for (const deps of
|
|
150
|
+
for (const deps of fields.map((field) => pkg[field])) {
|
|
149
151
|
if (!deps)
|
|
150
152
|
continue;
|
|
151
153
|
for (const name of Object.keys(deps)) {
|
|
@@ -158,7 +160,7 @@ function pluginDependencyNames(pkg) {
|
|
|
158
160
|
/**
|
|
159
161
|
* Build the candidate set: the consumer's own `blogwright-*` dependencies
|
|
160
162
|
* (resolved from `repoRoot`) union the CLI's own bundled `blogwright-*`
|
|
161
|
-
* dependencies (resolved from `cliPackageDir`). Both halves are required and
|
|
163
|
+
* `dependencies` (resolved from `cliPackageDir`). Both halves are required and
|
|
162
164
|
* each is resolved from its own directory - see the module comment. Neither
|
|
163
165
|
* `blogwright` nor `blogwright/package.json` is ever a candidate: the bare
|
|
164
166
|
* name never matches the `blogwright-` prefix, so it is filtered out before
|
|
@@ -166,7 +168,7 @@ function pluginDependencyNames(pkg) {
|
|
|
166
168
|
*
|
|
167
169
|
* A package name present in BOTH manifests - e.g. a plugin `blogwright
|
|
168
170
|
* plugin add` (task 18) pinned directly into the consuming repo, which
|
|
169
|
-
*
|
|
171
|
+
* also sits in the CLI's own bundled dependencies - is one installed
|
|
170
172
|
* package, not two: it is deduped here, consumer half winning, so it is
|
|
171
173
|
* probed exactly once. Without this, the same package would reach
|
|
172
174
|
* `resolveNamespaceCollisions` as two `InstalledPlugin` entries sharing one
|
|
@@ -176,7 +178,10 @@ async function collectCandidates(ports, repoRoot, cliPackageDir) {
|
|
|
176
178
|
const consumerPkg = await readDependencyManifest(ports.fs, join(repoRoot, 'package.json'), 'the consuming repo');
|
|
177
179
|
const cliPkg = await readDependencyManifest(ports.fs, join(cliPackageDir, 'package.json'), "the CLI's own package");
|
|
178
180
|
const consumerNames = pluginDependencyNames(consumerPkg);
|
|
179
|
-
const consumerCandidates = consumerNames.map((packageName) => ({
|
|
181
|
+
const consumerCandidates = consumerNames.map((packageName) => ({
|
|
182
|
+
packageName,
|
|
183
|
+
fromDir: repoRoot,
|
|
184
|
+
}));
|
|
180
185
|
// The bundled half is NOT filtered against the consumer's names here. A name
|
|
181
186
|
// in both manifests must still be probed from both directories, because a
|
|
182
187
|
// consumer can DECLARE a plugin it cannot resolve - a pruned devDependency,
|
|
@@ -186,7 +191,15 @@ async function collectCandidates(ports, repoRoot, cliPackageDir) {
|
|
|
186
191
|
// two-source union exists to prevent. `discover` instead skips the bundled
|
|
187
192
|
// probe only once the consumer's has actually resolved, so the consumer still
|
|
188
193
|
// wins wherever both work.
|
|
189
|
-
|
|
194
|
+
//
|
|
195
|
+
// Only the CLI's `dependencies` are bundled: its `devDependencies` are never
|
|
196
|
+
// installed with a published CLI, and reading them would let this workspace
|
|
197
|
+
// discover a plugin (blogwright-pds, a CLI devDependency for its integration
|
|
198
|
+
// tests) that no consuming site gets without installing it.
|
|
199
|
+
const bundledCandidates = pluginDependencyNames(cliPkg, ['dependencies']).map((packageName) => ({
|
|
200
|
+
packageName,
|
|
201
|
+
fromDir: cliPackageDir,
|
|
202
|
+
}));
|
|
190
203
|
return [...consumerCandidates, ...bundledCandidates];
|
|
191
204
|
}
|
|
192
205
|
/** Validate a raw `blogwright` field into a `PluginManifest`, or `undefined` when it does not hold. */
|
package/dist/ports.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface AddPackageOptions {
|
|
|
31
31
|
*
|
|
32
32
|
* Deliberately NOT a member of {@link Ports}. Its only two callers -
|
|
33
33
|
* `blogwright plugin add` and `plugin remove` - dispatch BEFORE any
|
|
34
|
-
* `OpsContext` exists, and must: `createContext` calls `sts
|
|
34
|
+
* `OpsContext` exists, and must: `createContext` calls `sts:GetCallerIdentity`,
|
|
35
35
|
* while installing a plugin is what an operator does on a repo that has no
|
|
36
36
|
* config and no credentials yet. A member of `Ports` is therefore unreachable
|
|
37
37
|
* from the only code that wants this port, and every `deploy`, `status` and
|
|
@@ -103,6 +103,26 @@ export interface ModuleLoader {
|
|
|
103
103
|
/** Import the module at `path`. The caller validates the result's shape at the boundary. */
|
|
104
104
|
load(path: string): Promise<unknown>;
|
|
105
105
|
}
|
|
106
|
+
/** How an `aws` sign-in command ended. */
|
|
107
|
+
export type AwsLoginResult = {
|
|
108
|
+
ok: true;
|
|
109
|
+
} | {
|
|
110
|
+
ok: false;
|
|
111
|
+
reason: 'not-installed';
|
|
112
|
+
} | {
|
|
113
|
+
ok: false;
|
|
114
|
+
reason: 'exit';
|
|
115
|
+
code: number;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Runs an AWS CLI sign-in (`aws sso login`, `aws login`) with the operator's
|
|
119
|
+
* terminal attached, so its browser or device-code prompts reach them.
|
|
120
|
+
* Blogwright never stores credentials itself; the AWS CLI writes its own cache.
|
|
121
|
+
*/
|
|
122
|
+
export interface AwsLogin {
|
|
123
|
+
/** Run `aws` with `args` (without the leading `aws`) and report how it exited. */
|
|
124
|
+
run(args: readonly string[]): Promise<AwsLoginResult>;
|
|
125
|
+
}
|
|
106
126
|
/** The ports domain code reaches side effects through; adapters are wired in createContext. */
|
|
107
127
|
export interface Ports {
|
|
108
128
|
fs: FileSystem;
|
|
@@ -110,4 +130,5 @@ export interface Ports {
|
|
|
110
130
|
terminal: Terminal;
|
|
111
131
|
ping: PingBuilder;
|
|
112
132
|
loader: ModuleLoader;
|
|
133
|
+
awsLogin: AwsLogin;
|
|
113
134
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release gating for static sites: `stage` builds once and publishes the
|
|
3
|
+
* output to `releases/<hash>/`, which nothing serves, and records its artifact
|
|
4
|
+
* manifest; `promote` copies those exact bytes into the live `site/` without
|
|
5
|
+
* rebuilding, invalidates what changed, and verifies the result against the
|
|
6
|
+
* manifest. The staged copy stays, so a later promotion of the same hash
|
|
7
|
+
* restores the same bytes - and `rollback <hash>` to a staged hash republishes
|
|
8
|
+
* it through the same checked copy instead of rebuilding.
|
|
9
|
+
*/
|
|
10
|
+
import type { OpsContext } from './context.js';
|
|
11
|
+
import { type AfterDeploy } from './deploy.js';
|
|
12
|
+
import { type LockOptions } from './lock.js';
|
|
13
|
+
export interface StageOptions extends LockOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Re-upload every file into the staged prefix, even content the previous
|
|
16
|
+
* stage of this hash already wrote, so metadata fixes reach the staged copy.
|
|
17
|
+
*/
|
|
18
|
+
refresh?: boolean | undefined;
|
|
19
|
+
}
|
|
20
|
+
/** Build the working copy and publish it to `releases/<hash>/` for a later `promote`. */
|
|
21
|
+
export declare function stage(ctx: OpsContext, opts?: StageOptions): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Run the post-deploy plugin steps after a `promote` or a `rollback` only when
|
|
24
|
+
* the working copy is the revision now live: they publish the working copy's
|
|
25
|
+
* content (the standard.site sync, for one), which matches the live site then
|
|
26
|
+
* and would not match a release built from another revision. Otherwise warn
|
|
27
|
+
* and skip them - whichever plugins are installed.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runAfterPublish(ctx: OpsContext, hash: string, afterDeploy: AfterDeploy): Promise<void>;
|
|
30
|
+
export interface PromoteOptions extends LockOptions {
|
|
31
|
+
/** Copy every file, not only those whose content differs from the live object. */
|
|
32
|
+
refresh?: boolean | undefined;
|
|
33
|
+
/** The post-deploy plugin steps; see {@link runAfterPublish}. */
|
|
34
|
+
afterDeploy: AfterDeploy;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Point production at a staged release without rebuilding: check the staged
|
|
38
|
+
* objects still match the recorded manifest, copy them into `site/`,
|
|
39
|
+
* invalidate the changed paths, and verify the live objects match too.
|
|
40
|
+
*/
|
|
41
|
+
export declare function promote(ctx: OpsContext, hash: string, opts: PromoteOptions): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* `rollback <hash>`'s first choice in a static environment, run holding the
|
|
44
|
+
* environment lock: a hash with a staged release record is republished from
|
|
45
|
+
* its stored bytes, through the same checked copy `promote` makes, and the
|
|
46
|
+
* release that was live is printed beside the one restored. A record that
|
|
47
|
+
* cannot be read, or a staged copy that no longer matches it, refuses with
|
|
48
|
+
* nothing published - a quiet rebuild would publish bytes no review covered.
|
|
49
|
+
* Resolves `not-staged` when the hash has no staged release, for the caller
|
|
50
|
+
* to rebuild.
|
|
51
|
+
*/
|
|
52
|
+
export declare function rollbackToStagedRelease(ctx: OpsContext, hash: string, opts?: {
|
|
53
|
+
refresh?: boolean | undefined;
|
|
54
|
+
}): Promise<'republished' | 'not-staged'>;
|