-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig_generated.py
More file actions
67 lines (55 loc) · 1.85 KB
/
Copy pathconfig_generated.py
File metadata and controls
67 lines (55 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"""Generated editables - computed at submit time, not rendered in forms.
These editables use generators to produce values from the merged YAML
data during final submission. Order matters: the list below defines
the execution order, and later generators may depend on values
produced by earlier ones.
"""
from __future__ import annotations
from opi.forms.editables.editable import Editable
from opi.forms.editables.generators import (
AGEKeyPairGenerator,
AttachmentStagingResolveGenerator,
ComponentAliasesEncryptGenerator,
EncryptedAPIKeyGenerator,
EncryptedPrivateKeyGenerator,
ProjectNameGenerator,
UserEnvVarsEncryptGenerator,
)
# --- Pure Editable definitions (data logic only) ---
PROJECT_NAME_EDITABLE = Editable(
yaml_path="name",
generator=ProjectNameGenerator(),
)
AGE_PUBLIC_KEY_GEN_EDITABLE = Editable(
yaml_path="config/age-public-key",
generator=AGEKeyPairGenerator(),
)
AGE_PRIVATE_KEY_GEN_EDITABLE = Editable(
yaml_path="config/age-private-key",
generator=EncryptedPrivateKeyGenerator(),
)
API_KEY_GEN_EDITABLE = Editable(
yaml_path="config/api-key",
generator=EncryptedAPIKeyGenerator(),
)
USER_ENV_VARS_ENCRYPT_GEN_EDITABLE = Editable(
yaml_path="_generated/user-env-vars-encrypted",
generator=UserEnvVarsEncryptGenerator(),
)
ALIASES_ENCRYPT_GEN_EDITABLE = Editable(
yaml_path="_generated/aliases-encrypted",
generator=ComponentAliasesEncryptGenerator(),
)
ATTACHMENTS_RESOLVE_GEN_EDITABLE = Editable(
yaml_path="_generated/attachments-resolved",
generator=AttachmentStagingResolveGenerator(),
)
GENERATED_EDITABLES_PURE: list[Editable] = [
PROJECT_NAME_EDITABLE,
AGE_PUBLIC_KEY_GEN_EDITABLE,
AGE_PRIVATE_KEY_GEN_EDITABLE,
API_KEY_GEN_EDITABLE,
USER_ENV_VARS_ENCRYPT_GEN_EDITABLE,
ALIASES_ENCRYPT_GEN_EDITABLE,
ATTACHMENTS_RESOLVE_GEN_EDITABLE,
]