| 1 | import { GcpEnvironment } from "@/GCP/Environment"; |
| 2 | import { MinimumLogLevel } from "effect/References"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export const logLevel = Effect.provideService( |
| 6 | MinimumLogLevel, |
| 7 | process.env.DEBUG ? "Debug" : "Info", |
| 8 | ); |
| 9 | |
| 10 | export const currentProject = GcpEnvironment.current.pipe( |
| 11 | Effect.map((env) => env.project), |
| 12 | ); |
| 13 | |
| 14 | export const TEST_PKIX_PUBLIC_KEY_PEM = `-----BEGIN PUBLIC KEY----- |
| 15 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWhkM5kl7ac/yZQwut5RYqCF6R9TA |
| 16 | zOV23AIF1+pYxbSAepfNDoU+tfNgHOFHzIjRNKB9Vv42auUzwwieQ6wK3Q== |
| 17 | -----END PUBLIC KEY-----`; |
| 18 | |
| 19 | export const TEST_RESOURCE_URI = |
| 20 | "https://example.com/alchemy-test@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; |
| 21 | |
| 22 | export const TEST_ATTESTATION = { |
| 23 | serializedPayload: btoa("alchemy-payload"), |
| 24 | signatures: [ |
| 25 | { |
| 26 | publicKeyId: "https://example.com/keys/alchemy", |
| 27 | signature: btoa("alchemy-sig"), |
| 28 | }, |
| 29 | ], |
| 30 | }; |
| 31 | |
| 32 | export const TEST_POD = { |
| 33 | apiVersion: "v1", |
| 34 | kind: "Pod", |
| 35 | metadata: { name: "web", namespace: "default" }, |
| 36 | spec: { containers: [{ name: "nginx", image: "nginx" }] }, |
| 37 | }; |