sandala 0.1.0__py3-none-any.whl
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.
- sandala/__init__.py +0 -0
- sandala/admin_ui_dist/config.js +4 -0
- sandala/admin_ui_dist/index.html +136 -0
- sandala/admin_ui_dist/static/RichTextField-C--mFWhR.js +146 -0
- sandala/admin_ui_dist/static/app-BeJOszdi.css +1 -0
- sandala/admin_ui_dist/static/app-XZ4Y80CK.js +275 -0
- sandala/admin_ui_dist/static/en-US-BSVPx4WU.js +1 -0
- sandala/admin_ui_dist/static/manifest.json +37 -0
- sandala/admin_ui_dist/static/ru-RU-B1mtu9p_.js +1 -0
- sandala/api/__init__.py +0 -0
- sandala/api/__main__.py +15 -0
- sandala/api/app.py +51 -0
- sandala/api/auth.py +60 -0
- sandala/api/errors.py +122 -0
- sandala/api/payloads.py +90 -0
- sandala/api/route_prefixes.py +1 -0
- sandala/api/routes_admin.py +42 -0
- sandala/api/routes_assets.py +88 -0
- sandala/api/routes_auth.py +168 -0
- sandala/api/routes_entity.py +63 -0
- sandala/api/routes_module.py +63 -0
- sandala/api/routes_node.py +102 -0
- sandala/bootstrap.py +84 -0
- sandala/config.py +149 -0
- sandala/core/__init__.py +0 -0
- sandala/core/access.py +29 -0
- sandala/core/assets/__init__.py +1 -0
- sandala/core/assets/field_resolver.py +72 -0
- sandala/core/assets/image_processor.py +150 -0
- sandala/core/assets/key_builder.py +28 -0
- sandala/core/assets/url_builder.py +7 -0
- sandala/core/errors.py +294 -0
- sandala/core/query/__init__.py +35 -0
- sandala/core/query/acl_filter.py +52 -0
- sandala/core/query/filter_compiler.py +199 -0
- sandala/core/query/lookup_pipeline_builder.py +280 -0
- sandala/core/query/lookup_planner.py +162 -0
- sandala/core/query/path_utils.py +24 -0
- sandala/core/query/pipeline_builder.py +65 -0
- sandala/core/query/projection_normalizer.py +72 -0
- sandala/core/query/reference_resolution_conflicts.py +63 -0
- sandala/core/query/schema_resolver.py +268 -0
- sandala/core/query/schema_utils.py +33 -0
- sandala/core/query/semantic_registry.py +220 -0
- sandala/core/query/system_fields.py +129 -0
- sandala/core/query/visibility_exclusions.py +75 -0
- sandala/core/query_builder.py +367 -0
- sandala/core/security.py +45 -0
- sandala/core/services/__init__.py +0 -0
- sandala/core/services/asset_service.py +320 -0
- sandala/core/services/auth_service.py +328 -0
- sandala/core/services/entity_service.py +267 -0
- sandala/core/services/module_service.py +219 -0
- sandala/core/services/node_hooks.py +152 -0
- sandala/core/services/node_service.py +1462 -0
- sandala/core/time_utils.py +26 -0
- sandala/core/users/__init__.py +7 -0
- sandala/core/users/bootstrap.py +307 -0
- sandala/core/users/hooks.py +622 -0
- sandala/core/users/schemas.py +240 -0
- sandala/core/validation/__init__.py +0 -0
- sandala/core/validation/error_normalizer.py +92 -0
- sandala/core/validation/schema_validator.py +874 -0
- sandala/storage/__init__.py +0 -0
- sandala/storage/blob/__init__.py +1 -0
- sandala/storage/blob/local_fs.py +35 -0
- sandala/storage/blob/s3.py +45 -0
- sandala/storage/errors.py +6 -0
- sandala/storage/mongo/__init__.py +0 -0
- sandala/storage/mongo/asset_repository.py +23 -0
- sandala/storage/mongo/auth_session_repository.py +63 -0
- sandala/storage/mongo/client.py +11 -0
- sandala/storage/mongo/entity_repository.py +56 -0
- sandala/storage/mongo/identity_repository.py +57 -0
- sandala/storage/mongo/module_repository.py +30 -0
- sandala/storage/mongo/node_repository.py +170 -0
- sandala/storage/mongo/pat_repository.py +36 -0
- sandala-0.1.0.dist-info/METADATA +68 -0
- sandala-0.1.0.dist-info/RECORD +82 -0
- sandala-0.1.0.dist-info/WHEEL +5 -0
- sandala-0.1.0.dist-info/licenses/LICENSE +21 -0
- sandala-0.1.0.dist-info/top_level.txt +1 -0
sandala/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en-US">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Sandala Admin UI</title>
|
|
7
|
+
<script>
|
|
8
|
+
(() => {
|
|
9
|
+
const routePrefix = "/_app/";
|
|
10
|
+
const pathname = window.location.pathname;
|
|
11
|
+
const routeIndex = pathname.indexOf(routePrefix);
|
|
12
|
+
const mountPath = routeIndex >= 0
|
|
13
|
+
? pathname.slice(0, routeIndex + 1)
|
|
14
|
+
: pathname.endsWith("/")
|
|
15
|
+
? pathname
|
|
16
|
+
: `${pathname}/`;
|
|
17
|
+
const base = document.createElement("base");
|
|
18
|
+
base.href = new URL(mountPath, window.location.origin).toString();
|
|
19
|
+
document.head.prepend(base);
|
|
20
|
+
window.__SANDALA_RUNTIME_CONFIG__ = { basePath: mountPath };
|
|
21
|
+
})();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<script id="sandala-production-bootstrap">
|
|
25
|
+
(() => {
|
|
26
|
+
const entryKey = "src/main.tsx";
|
|
27
|
+
const mountPath = window.__SANDALA_RUNTIME_CONFIG__?.basePath ?? "/";
|
|
28
|
+
const mountUrl = new URL(mountPath, window.location.origin);
|
|
29
|
+
|
|
30
|
+
function loadClassicScript(url) {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
const script = document.createElement("script");
|
|
33
|
+
script.src = url;
|
|
34
|
+
script.onload = resolve;
|
|
35
|
+
script.onerror = reject;
|
|
36
|
+
document.head.appendChild(script);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function appendStylesheets(manifest) {
|
|
41
|
+
const stylesheets = new Set();
|
|
42
|
+
const visited = new Set();
|
|
43
|
+
|
|
44
|
+
function visit(key) {
|
|
45
|
+
if (visited.has(key)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
visited.add(key);
|
|
49
|
+
const chunk = manifest[key];
|
|
50
|
+
if (chunk === undefined) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
for (const stylesheet of chunk.css ?? []) {
|
|
55
|
+
stylesheets.add(stylesheet);
|
|
56
|
+
}
|
|
57
|
+
for (const importedKey of chunk.imports ?? []) {
|
|
58
|
+
visit(importedKey);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
visit(entryKey);
|
|
63
|
+
for (const stylesheet of stylesheets) {
|
|
64
|
+
const link = document.createElement("link");
|
|
65
|
+
link.rel = "stylesheet";
|
|
66
|
+
link.href = new URL(stylesheet, mountUrl).toString();
|
|
67
|
+
document.head.appendChild(link);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function appendModulePreloads(manifest) {
|
|
72
|
+
const preloads = new Set();
|
|
73
|
+
const visited = new Set();
|
|
74
|
+
|
|
75
|
+
function visit(key) {
|
|
76
|
+
if (visited.has(key)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
visited.add(key);
|
|
80
|
+
const chunk = manifest[key];
|
|
81
|
+
if (chunk === undefined) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (key !== entryKey && typeof chunk.file === "string") {
|
|
86
|
+
preloads.add(chunk.file);
|
|
87
|
+
}
|
|
88
|
+
for (const importedKey of chunk.imports ?? []) {
|
|
89
|
+
visit(importedKey);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
visit(entryKey);
|
|
94
|
+
for (const preload of preloads) {
|
|
95
|
+
const link = document.createElement("link");
|
|
96
|
+
link.rel = "modulepreload";
|
|
97
|
+
link.href = new URL(preload, mountUrl).toString();
|
|
98
|
+
document.head.appendChild(link);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function bootstrap() {
|
|
103
|
+
await loadClassicScript(new URL("config.js", mountUrl).toString());
|
|
104
|
+
const response = await fetch(new URL("static/manifest.json", mountUrl), { cache: "no-cache" });
|
|
105
|
+
if (!response.ok) {
|
|
106
|
+
throw new Error(`Unable to load frontend manifest: ${response.status}`);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const manifest = await response.json();
|
|
110
|
+
const entry = manifest[entryKey];
|
|
111
|
+
if (entry === undefined || typeof entry.file !== "string") {
|
|
112
|
+
throw new Error("Frontend manifest does not contain the application entry");
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
appendStylesheets(manifest);
|
|
116
|
+
appendModulePreloads(manifest);
|
|
117
|
+
|
|
118
|
+
const script = document.createElement("script");
|
|
119
|
+
script.type = "module";
|
|
120
|
+
script.src = new URL(entry.file, mountUrl).toString();
|
|
121
|
+
document.head.appendChild(script);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
void bootstrap().catch((error) => {
|
|
125
|
+
console.error("Sandala Admin UI bootstrap failed", error);
|
|
126
|
+
});
|
|
127
|
+
})();
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</head>
|
|
132
|
+
<body>
|
|
133
|
+
<div id="root"></div>
|
|
134
|
+
|
|
135
|
+
</body>
|
|
136
|
+
</html>
|