@rizom/ops 0.2.0-alpha.167 → 0.2.0-alpha.169
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/brains-ops.js +1 -1
- package/dist/images.d.ts +40 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +57 -56
- package/package.json +1 -1
package/dist/images.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ResolvedSiteOverride } from "./load-registry";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a fleet image tag as a pure function of a single instance's own
|
|
4
|
+
* config. This is the shared contract between the build (which tags the image
|
|
5
|
+
* it pushes) and the deploy (which waits for and runs that tag), so both must
|
|
6
|
+
* import this — never recompute it independently.
|
|
7
|
+
*
|
|
8
|
+
* The default path is deliberately untouched: an instance with no site packages
|
|
9
|
+
* resolves to the plain `brain-{version}` tag every other fleet instance uses.
|
|
10
|
+
* A site override is a per-instance opt-in that hashes only *that instance's*
|
|
11
|
+
* package set into a distinct `brain-{version}-sites-{hash}` image, so it can
|
|
12
|
+
* never collide with — or leak into — the shared default image.
|
|
13
|
+
*/
|
|
14
|
+
export declare function siteImageTag(brainVersion: string, sitePackages: string[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* The npm packages a site override installs into its per-instance image.
|
|
17
|
+
* A @rizom-scoped theme is an independently published package and rides along
|
|
18
|
+
* at the same lockstep version; @brains/* themes are bundled inside
|
|
19
|
+
* @rizom/brain and must not be npm-installed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function sitePackagesFor(siteOverride: ResolvedSiteOverride | undefined): string[];
|
|
22
|
+
/** The per-user slice of the registry that determines which image it runs. */
|
|
23
|
+
export interface ImageRequirementSource {
|
|
24
|
+
brainVersion: string;
|
|
25
|
+
siteOverride?: ResolvedSiteOverride | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface RequiredImage {
|
|
28
|
+
tag: string;
|
|
29
|
+
brainVersion: string;
|
|
30
|
+
/** Sorted, deduped — build args for the image, empty for the default. */
|
|
31
|
+
sitePackages: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The image set the declared fleet state requires: one default
|
|
35
|
+
* `brain-{version}` per distinct brain version in use, plus one
|
|
36
|
+
* `brain-{version}-sites-{hash}` per distinct site-override package set.
|
|
37
|
+
* Derived purely from resolved users (pass `registry.users`), so CI can build
|
|
38
|
+
* exactly what a config push declares — nothing reactive, nothing manual.
|
|
39
|
+
*/
|
|
40
|
+
export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { initPilotRepo } from "./init";
|
|
2
2
|
export { loadPilotRegistry, type LoadPilotRegistryOptions, } from "./load-registry";
|
|
3
|
+
export { siteImageTag, sitePackagesFor, requiredImages, type ImageRequirementSource, type RequiredImage, } from "./images";
|
|
3
4
|
export { writeUsersTable } from "./render-users-table";
|
|
4
5
|
export { onboardUser } from "./onboard-user";
|
|
5
6
|
export { addPilotUser } from "./user-add";
|