|
2 | 2 |
|
3 | 3 | from dataclasses import dataclass |
4 | 4 |
|
| 5 | +from jupiter.core.domain.app import ( |
| 6 | + AppComponent, |
| 7 | + AppCore, |
| 8 | + AppDistribution, |
| 9 | + AppPlatform, |
| 10 | + AppShell, |
| 11 | + AppVersion, |
| 12 | +) |
5 | 13 | from jupiter.framework_new.component_properties import ComponentProperties |
6 | | -from jupiter.framework_new.value import AtomicValue, EnumValue, enum_value, value |
7 | | - |
8 | | - |
9 | | -@enum_value |
10 | | -class AppComponent(EnumValue): |
11 | | - """The component of the app.""" |
12 | | - |
13 | | - _OLD_WEB = "web" |
14 | | - _OLD_CLI = "cli" |
15 | | - APP = "app" |
16 | | - GC_CRON = "gc-cron" |
17 | | - GEN_CRON = "gen-cron" |
18 | | - STATS_CRON = "stats-cron" |
19 | | - SCHEDULE_EXTERNAL_SYNC_CRON = "schedule-external-sync-cron" |
20 | | - |
21 | | - |
22 | | -@enum_value |
23 | | -class AppCore(EnumValue): |
24 | | - """A client facing application.""" |
25 | | - |
26 | | - CLI = "cli" |
27 | | - WEBUI = "webui" |
28 | | - |
29 | | - |
30 | | -@enum_value |
31 | | -class AppShell(EnumValue): |
32 | | - """A shell that wraps a given app.""" |
33 | | - |
34 | | - CLI = "cli" |
35 | | - BROWSER = "browser" |
36 | | - DESKTOP_ELECTRON = "desktop-electron" |
37 | | - MOBILE_CAPACITOR = "mobile-capacitor" |
38 | | - PWA = "pwa" |
39 | | - |
40 | | - |
41 | | -@enum_value |
42 | | -class AppPlatform(EnumValue): |
43 | | - """The platform on which the app is running.""" |
44 | | - |
45 | | - DESKTOP_MACOS = "desktop-macos" |
46 | | - MOBILE_IOS = "mobile-ios" |
47 | | - MOBILE_ANDROID = "mobile-android" |
48 | | - TABLET_IOS = "tablet-ios" |
49 | | - TABLET_ANDROID = "tablet-android" |
50 | | - |
51 | | - |
52 | | -@enum_value |
53 | | -class AppDistribution(EnumValue): |
54 | | - """The distribution channel of the app.""" |
55 | | - |
56 | | - WEB = "web" |
57 | | - MAC_WEB = "mac-web" |
58 | | - MAC_STORE = "mac-store" |
59 | | - APP_STORE = "app-store" |
60 | | - GOOGLE_PLAY_STORE = "google-play-store" |
61 | | - |
62 | | - |
63 | | -@enum_value |
64 | | -class AppDistributionState(EnumValue): |
65 | | - """The distribution state of the app.""" |
66 | | - |
67 | | - READY = "ready" |
68 | | - IN_REVIEW = "in-review" |
69 | | - NOT_AVAILABLE = "not-available" |
70 | | - |
71 | | - |
72 | | -@value |
73 | | -class AppVersion(AtomicValue[str]): |
74 | | - """The version of the app.""" |
75 | | - |
76 | | - the_version: str |
77 | | - |
78 | | - def __str__(self) -> str: |
79 | | - """Transform this to a string version.""" |
80 | | - return self.the_version |
81 | | - |
| 14 | +from jupiter.framework_new.value import EnumValue |
82 | 15 |
|
83 | 16 |
|
84 | 17 | @dataclass(frozen=True) |
|
0 commit comments