@rizom/ops 0.2.0-alpha.7 → 0.2.0-alpha.70

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.
Files changed (50) hide show
  1. package/README.md +6 -3
  2. package/dist/age-key-bootstrap.d.ts +17 -0
  3. package/dist/brains-ops.js +262 -156
  4. package/dist/cert-bootstrap.d.ts +3 -3
  5. package/dist/content-repo.d.ts +13 -0
  6. package/dist/default-user-runner.d.ts +1 -1
  7. package/dist/deploy.js +3 -170
  8. package/dist/entries/deploy.d.ts +2 -2
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.js +262 -156
  11. package/dist/load-registry.d.ts +19 -3
  12. package/dist/observed-status.d.ts +1 -1
  13. package/dist/onboard-user.d.ts +2 -2
  14. package/dist/origin-ca.d.ts +1 -1
  15. package/dist/parse-args.d.ts +2 -0
  16. package/dist/push-secrets.d.ts +1 -1
  17. package/dist/reconcile-all.d.ts +2 -2
  18. package/dist/reconcile-cohort.d.ts +2 -2
  19. package/dist/reconcile-lib.d.ts +4 -2
  20. package/dist/run-command.d.ts +1 -2
  21. package/dist/run-subprocess.d.ts +1 -0
  22. package/dist/schema.d.ts +100 -0
  23. package/dist/secrets-encrypt.d.ts +32 -0
  24. package/dist/secrets-push.d.ts +1 -1
  25. package/dist/ssh-key-bootstrap.d.ts +1 -1
  26. package/dist/user-add.d.ts +15 -0
  27. package/dist/user-runner.d.ts +5 -0
  28. package/package.json +7 -3
  29. package/templates/rover-pilot/.env.schema +11 -0
  30. package/templates/rover-pilot/.github/workflows/build.yml +4 -4
  31. package/templates/rover-pilot/.github/workflows/deploy.yml +75 -20
  32. package/templates/rover-pilot/.github/workflows/reconcile.yml +16 -2
  33. package/templates/rover-pilot/README.md +6 -3
  34. package/templates/rover-pilot/deploy/scripts/decrypt-user-secrets.ts +83 -0
  35. package/templates/rover-pilot/deploy/scripts/provision-server.ts +1 -1
  36. package/templates/rover-pilot/deploy/scripts/resolve-deploy-handles.ts +15 -4
  37. package/templates/rover-pilot/deploy/scripts/resolve-user-config.ts +12 -12
  38. package/templates/rover-pilot/deploy/scripts/sync-content-repo.ts +179 -0
  39. package/templates/rover-pilot/deploy/scripts/update-dns.ts +14 -4
  40. package/templates/rover-pilot/docs/onboarding-checklist.md +28 -12
  41. package/templates/rover-pilot/docs/operator-playbook.md +43 -5
  42. package/templates/rover-pilot/docs/user-onboarding.md +292 -99
  43. package/templates/rover-pilot/package.json +3 -0
  44. package/templates/rover-pilot/pilot.yaml +4 -0
  45. package/templates/rover-pilot/users/alice.yaml +5 -1
  46. package/dist/user-secret-names.d.ts +0 -6
  47. package/templates/rover-pilot/.kamal/hooks/pre-deploy +0 -9
  48. package/templates/rover-pilot/deploy/Caddyfile +0 -66
  49. package/templates/rover-pilot/deploy/Dockerfile +0 -38
  50. package/templates/rover-pilot/deploy/kamal/deploy.yml +0 -39
@@ -1,4 +1,4 @@
1
- import { type FetchLike } from "@brains/utils/origin-ca";
1
+ import { type FetchLike } from "@brains/deploy-support/origin-ca";
2
2
  import { type RunCommand } from "./run-subprocess";
3
3
  export interface CertBootstrapOptions {
4
4
  env?: NodeJS.ProcessEnv | undefined;
@@ -15,8 +15,8 @@ export interface CertBootstrapResult {
15
15
  privateKeyPath: string;
16
16
  certificatePem: string;
17
17
  }
18
- export declare function runPilotCertBootstrap(rootDir: string, handle: string, options?: CertBootstrapOptions): Promise<{
18
+ export declare function runPilotCertBootstrap(rootDir: string, options?: CertBootstrapOptions): Promise<{
19
19
  success: boolean;
20
20
  message?: string;
21
21
  }>;
22
- export declare function bootstrapPilotOriginCertificate(rootDir: string, handle: string, options?: CertBootstrapOptions): Promise<CertBootstrapResult>;
22
+ export declare function bootstrapPilotOriginCertificate(rootDir: string, options?: CertBootstrapOptions): Promise<CertBootstrapResult>;
@@ -0,0 +1,13 @@
1
+ import type { ResolvedUser } from "./load-registry";
2
+ import { type RunCommand } from "./run-subprocess";
3
+ import type { ContentRepoFile } from "./user-runner";
4
+ type FetchImpl = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
5
+ export interface ContentRepoSyncOptions {
6
+ env?: NodeJS.ProcessEnv | undefined;
7
+ runCommand?: RunCommand | undefined;
8
+ fetchImpl?: FetchImpl | undefined;
9
+ contentRepoRemoteResolver?: ((user: ResolvedUser, githubOrg: string, token: string | undefined) => string | undefined) | undefined;
10
+ contentRepoAdminTokenSelector?: string | undefined;
11
+ }
12
+ export declare function syncUserContentRepo(rootDir: string, githubOrg: string, user: ResolvedUser, files: ContentRepoFile[], options?: ContentRepoSyncOptions): Promise<void>;
13
+ export {};
@@ -1,3 +1,3 @@
1
1
  import type { ResolvedUser } from "./load-registry";
2
- import type { UserRunResult } from "./reconcile-lib";
2
+ import type { UserRunResult } from "./user-runner";
3
3
  export declare function createDefaultUserRunner(githubOrg: string): (user: ResolvedUser) => Promise<UserRunResult>;