@feltdb/core 0.12.1 → 0.13.0
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.
- package/dist/build-identity.json +13 -4
- package/dist/cli/commands.js +96 -45
- package/dist/cli/workspace-integration.js +8 -0
- package/dist/collection.d.ts +41 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +116 -47
- package/dist/composition.d.ts.map +1 -1
- package/dist/composition.js +11 -1
- package/dist/create/build-identity.json +13 -4
- package/dist/create/cli.js +49 -40
- package/dist/create/create.js +32 -19
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/Cargo.lock +18 -3
- package/dist/create/server-source/Cargo.toml +4 -2
- package/dist/create/server-source/crates/feltdb/Cargo.toml +20 -0
- package/dist/create/server-source/crates/feltdb/LICENSE +21 -0
- package/dist/create/server-source/crates/feltdb/README.md +75 -0
- package/dist/create/server-source/crates/feltdb/src/agent_state.rs +320 -0
- package/dist/create/server-source/crates/feltdb/src/agent_transition_contract.rs +1545 -0
- package/dist/create/server-source/crates/feltdb/src/authority.rs +145 -15
- package/dist/create/server-source/crates/feltdb/src/lib.rs +227 -23
- package/dist/create/server-source/crates/feltdb/src/state_model.rs +1 -5
- package/dist/create/server-source/crates/feltdb/src/worker_mesh.rs +204 -1
- package/dist/create/server-source/crates/feltdb/src/workload.rs +685 -53
- package/dist/create/server-source/crates/feltdb/tests/agent_state_native.rs +1188 -0
- package/dist/create/server-source/crates/feltdb/tests/agent_transition_contract_conformance.rs +2884 -0
- package/dist/create/server-source/crates/feltdb/tests/authority_transaction_identity.rs +534 -0
- package/dist/create/server-source/crates/feltdb/tests/fixtures/agent_transition_corpus.json +23340 -0
- package/dist/create/server-source/crates/feltdb/tests/production_readiness_contract.rs +18 -12
- package/dist/create/server-source/crates/feltdb/tests/workload_envelope_contract.rs +17 -5
- package/dist/create/server-source/crates/feltdb-client/Cargo.toml +29 -0
- package/dist/create/server-source/crates/feltdb-client/LICENSE +21 -0
- package/dist/create/server-source/crates/feltdb-client/README.md +70 -0
- package/dist/create/server-source/crates/feltdb-client/src/application.rs +527 -0
- package/dist/create/server-source/crates/feltdb-client/src/authority.rs +679 -0
- package/dist/create/server-source/crates/feltdb-client/src/control.rs +292 -0
- package/dist/create/server-source/crates/feltdb-client/src/error.rs +227 -0
- package/dist/create/server-source/crates/feltdb-client/src/events.rs +146 -0
- package/dist/create/server-source/crates/feltdb-client/src/lib.rs +466 -0
- package/dist/create/server-source/crates/feltdb-client/tests/fixtures/README.md +4 -0
- package/dist/create/server-source/crates/feltdb-client/tests/fixtures/private-ca.pem +20 -0
- package/dist/create/server-source/crates/feltdb-client/tests/fixtures/server-key.pem +28 -0
- package/dist/create/server-source/crates/feltdb-client/tests/fixtures/server.pem +20 -0
- package/dist/create/server-source/crates/feltdb-client/tests/private_ca.rs +95 -0
- package/dist/create/server-source/crates/feltdb-server/Cargo.toml +20 -1
- package/dist/create/server-source/crates/feltdb-server/LICENSE +21 -0
- package/dist/create/server-source/crates/feltdb-server/README.md +12 -1
- package/dist/create/server-source/crates/feltdb-server/src/agent_execution.rs +511 -0
- package/dist/create/server-source/crates/feltdb-server/src/auth.rs +28 -0
- package/dist/create/server-source/crates/feltdb-server/src/backup.rs +6 -2
- package/dist/create/server-source/crates/feltdb-server/src/lib.rs +21 -0
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +845 -138
- package/dist/create/server-source/crates/feltdb-server/tests/rust_client.rs +683 -0
- package/dist/create/server-source/crates/feltdb-wasm/Cargo.toml +3 -1
- package/dist/create/setup-summary.js +40 -0
- package/dist/create/template/default-project/README.md +12 -7
- package/dist/create/template/default-project/src/pages/Dashboard.tsx +1 -1
- package/dist/create/template/dot-feltdb-README.md +3 -3
- package/dist/db.d.ts +27 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +60 -21
- package/dist/development-runtime-bridge.d.ts +20 -0
- package/dist/development-runtime-bridge.d.ts.map +1 -1
- package/dist/development-runtime-bridge.js +74 -4
- package/dist/embedded-transaction.d.ts +75 -8
- package/dist/embedded-transaction.d.ts.map +1 -1
- package/dist/embedded-transaction.js +124 -18
- package/dist/error-codes.d.ts +2 -0
- package/dist/error-codes.d.ts.map +1 -1
- package/dist/error-codes.js +2 -0
- package/dist/feltdb.d.ts +1 -11
- package/dist/feltdb.d.ts.map +1 -1
- package/dist/file-db.d.ts +6 -0
- package/dist/file-db.d.ts.map +1 -1
- package/dist/file-db.js +43 -11
- package/dist/http-db.d.ts +13 -0
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +33 -4
- package/dist/indexeddb-db.d.ts.map +1 -1
- package/dist/indexeddb-db.js +65 -41
- package/dist/memory-db.d.ts.map +1 -1
- package/dist/memory-db.js +29 -8
- package/dist/studio/{KeyManagementPanel-DZuSeWBK.js → KeyManagementPanel-skUNnKRw.js} +36 -28
- package/dist/studio/app.d.ts +8 -1
- package/dist/studio/app.d.ts.map +1 -1
- package/dist/studio/components/KeyManagementPanel.d.ts.map +1 -1
- package/dist/studio/components/KeyManagementPanel.js +1 -1
- package/dist/studio/components/RouteErrorBoundary.d.ts +5 -0
- package/dist/studio/components/RouteErrorBoundary.d.ts.map +1 -0
- package/dist/studio/components/index.js +2 -2
- package/dist/studio/{components-Bivm2lX6.js → components-BSGmHfif.js} +6 -6
- package/dist/studio/control-plane/Agents.d.ts.map +1 -1
- package/dist/studio/control-plane/Data.d.ts.map +1 -1
- package/dist/studio/control-plane/Instance.d.ts +4 -1
- package/dist/studio/control-plane/Instance.d.ts.map +1 -1
- package/dist/studio/control-plane/Operations.d.ts +4 -1
- package/dist/studio/control-plane/Operations.d.ts.map +1 -1
- package/dist/studio/control-plane/Overview.d.ts.map +1 -1
- package/dist/studio/control-plane/Schema.d.ts.map +1 -1
- package/dist/studio/control-plane/context.d.ts +4 -1
- package/dist/studio/control-plane/context.d.ts.map +1 -1
- package/dist/studio/control-plane/index.js +2 -2
- package/dist/studio/control-plane/primitives.d.ts +24 -0
- package/dist/studio/control-plane/primitives.d.ts.map +1 -1
- package/dist/studio/{control-plane-CLm69XwX.js → control-plane-CaBA7Rgv.js} +1374 -1298
- package/dist/studio/index.d.ts +1 -0
- package/dist/studio/index.d.ts.map +1 -1
- package/dist/studio/index.js +415 -237
- package/dist/studio/navigation.d.ts +57 -0
- package/dist/studio/navigation.d.ts.map +1 -0
- package/dist/studio/studio.css +1 -1
- package/dist/studio/utils/control-plane-api.d.ts +2 -0
- package/dist/studio/utils/control-plane-api.d.ts.map +1 -1
- package/dist/studio/utils/control-plane-api.js +9 -4
- package/dist/studio/utils/service-api.d.ts.map +1 -1
- package/dist/studio/utils/service-api.js +5 -4
- package/dist/studio-app/assets/{feltdb_wasm-DACcD-zs.js → feltdb_wasm-3hDngl1h.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-CFQT4gCy.wasm +0 -0
- package/dist/studio-app/assets/index-Dql1hS5m.js +30 -0
- package/dist/studio-app/assets/{index-CiC8VY-a.css → index-vi21oEQa.css} +1 -1
- package/dist/studio-app/index.html +2 -2
- package/dist/telemetry.d.ts +1 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +4 -3
- package/dist/transaction-identity.d.ts +62 -0
- package/dist/transaction-identity.d.ts.map +1 -0
- package/dist/transaction-identity.js +138 -0
- package/dist/transaction.d.ts +50 -5
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +28 -0
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/wasm/package.json +1 -1
- package/dist/workspace/local-development-authority.d.ts +19 -0
- package/dist/workspace/local-development-authority.d.ts.map +1 -1
- package/dist/workspace/local-development-authority.js +335 -15
- package/package.json +1 -1
- package/dist/create/server-source/crates/feltdb-wasm/test.db +0 -0
- package/dist/studio-app/assets/feltdb_wasm_bg-BejThWID.wasm +0 -0
- package/dist/studio-app/assets/index-CoZaxnlm.js +0 -30
package/dist/studio/index.js
CHANGED
|
@@ -1,445 +1,623 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u,
|
|
2
|
-
import { C as
|
|
3
|
-
import { ServiceApiError as
|
|
4
|
-
import { StudioProposalApi as
|
|
5
|
-
import { t as
|
|
6
|
-
import { CapabilitySet as
|
|
7
|
-
import { ManagedInstanceUtil as
|
|
8
|
-
import { ManagedInstancePanel as
|
|
9
|
-
import { capitalize as
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { BrowserRouter as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { parseFlowSpec as
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as ee, d as _, f as v, g as te, h as y, i as b, j as ne, k as x, l as S, m as re, n as C, o as w, p as T, r as E, s as D, t as ie, u as O, v as ae, w as oe, x as k, y as A, z as se } from "./control-plane-CaBA7Rgv.js";
|
|
2
|
+
import { C as j, E as ce, S as le, T as ue, _ as M, a as de, b as N, c as fe, d as pe, f as P, g as F, h as I, i as me, l as L, m as R, n as he, o as ge, p as z, r as _e, s as ve, t as ye, u as B, v as V, w as be, x as xe, y as H } from "./components-BSGmHfif.js";
|
|
3
|
+
import { ServiceApiError as Se, StudioServiceApi as Ce, isSecretField as we, resolveStudioApplicationId as Te, safeDisplayValue as Ee, serviceApiErrorMessage as De } from "./utils/service-api.js";
|
|
4
|
+
import { StudioProposalApi as Oe, proposalErrorMessage as ke, proposalSections as Ae } from "./utils/proposal-api.js";
|
|
5
|
+
import { t as U } from "./KeyManagementPanel-skUNnKRw.js";
|
|
6
|
+
import { CapabilitySet as je, ControlPlaneApi as Me, ControlPlaneError as Ne, controlPlaneErrorMessage as Pe, formatStatePath as Fe } from "./utils/control-plane-api.js";
|
|
7
|
+
import { ManagedInstanceUtil as Ie } from "./utils/managed-instance.js";
|
|
8
|
+
import { ManagedInstancePanel as Le } from "./components/ManagedInstancePanel.js";
|
|
9
|
+
import { capitalize as Re, fetchDashboardStats as ze, fetchDiagnostics as Be, fetchPeers as Ve, fetchProvenance as He, formatBytes as Ue, formatReference as We, formatRelativeTime as Ge, formatTime as Ke, searchReferences as qe } from "./utils/index.js";
|
|
10
|
+
import Je, { useEffect as W, useRef as Ye, useState as G } from "react";
|
|
11
|
+
import { BrowserRouter as Xe, Route as K, Routes as Ze, useLocation as q, useNavigate as Qe } from "react-router-dom";
|
|
12
|
+
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
13
|
+
import { parseFlowSpec as $e } from "@feltdb/core";
|
|
14
14
|
//#region vendor/stack-ui/core/src/dom.js
|
|
15
|
-
function
|
|
15
|
+
function Z(e, t) {
|
|
16
16
|
let n = t || document;
|
|
17
17
|
if (e == null || e === !1 || e === !0) return n.createDocumentFragment();
|
|
18
18
|
if (typeof e == "string" || typeof e == "number") return n.createTextNode(String(e));
|
|
19
19
|
if (Array.isArray(e)) {
|
|
20
20
|
let t = n.createDocumentFragment();
|
|
21
|
-
for (let r of e) t.appendChild(
|
|
21
|
+
for (let r of e) t.appendChild(Z(r, n));
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
24
|
-
if (
|
|
24
|
+
if (se(e)) {
|
|
25
25
|
let t = n.createElement(e.t);
|
|
26
26
|
for (let [n, r] of Object.entries(e.a)) r != null && r !== !1 && t.setAttribute(n, r === !0 ? "" : String(r));
|
|
27
27
|
for (let [n, r] of Object.entries(e.on || {})) t.addEventListener(n, r);
|
|
28
|
-
for (let r of e.c) t.appendChild(
|
|
28
|
+
for (let r of e.c) t.appendChild(Z(r, n));
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
31
|
if (e && typeof e.nodeType == "number") return e;
|
|
32
32
|
throw TypeError("toDom: unsupported child");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function et(e, t) {
|
|
35
35
|
let n = (t || document).getElementById(String(e || "stack-main").replace(/[^A-Za-z0-9_-]/g, "-"));
|
|
36
36
|
n && typeof n.focus == "function" && n.focus({ preventScroll: !0 });
|
|
37
37
|
}
|
|
38
|
-
Object.freeze(Object.fromEntries(Object.entries(
|
|
38
|
+
Object.freeze(Object.fromEntries(Object.entries(d).map(([e, t]) => [e, (e, n) => Z(t(e || {}), n)])));
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region src/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
authorityUrl: e.configuredAuthority
|
|
48
|
-
} : e.injected ? {
|
|
49
|
-
source: "injected",
|
|
50
|
-
authorityUrl: ""
|
|
51
|
-
} : {
|
|
52
|
-
source: "browser",
|
|
53
|
-
authorityUrl: ""
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function Ze({ registration: e }) {
|
|
57
|
-
return /* @__PURE__ */ Q("div", {
|
|
58
|
-
className: "runtime-notice",
|
|
59
|
-
children: ["Application connection: ", e ? `Connected ✓${e.namespace ? ` (namespace ${e.namespace})` : ""}` : "Not connected"]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
var Qe = [
|
|
40
|
+
//#region src/navigation.ts
|
|
41
|
+
var Q = [
|
|
42
|
+
"Run",
|
|
43
|
+
"Build",
|
|
44
|
+
"Operate",
|
|
45
|
+
"Settings"
|
|
46
|
+
], $ = [
|
|
63
47
|
{
|
|
64
48
|
path: "/overview",
|
|
65
|
-
label: "Overview"
|
|
49
|
+
label: "Overview",
|
|
50
|
+
group: "Run",
|
|
51
|
+
capabilities: ["overview.instance"]
|
|
66
52
|
},
|
|
67
53
|
{
|
|
68
54
|
path: "/data",
|
|
69
|
-
label: "Data"
|
|
55
|
+
label: "Data",
|
|
56
|
+
group: "Run",
|
|
57
|
+
capabilities: ["data.records.browse"]
|
|
70
58
|
},
|
|
71
59
|
{
|
|
72
|
-
path: "/
|
|
73
|
-
label: "
|
|
60
|
+
path: "/executions",
|
|
61
|
+
label: "Executions",
|
|
62
|
+
group: "Run"
|
|
74
63
|
},
|
|
75
64
|
{
|
|
76
|
-
path: "/
|
|
77
|
-
label: "
|
|
65
|
+
path: "/activity",
|
|
66
|
+
label: "Activity",
|
|
67
|
+
group: "Run",
|
|
68
|
+
live: !0
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
path: "/",
|
|
72
|
+
label: "Application",
|
|
73
|
+
group: "Build"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
path: "/contract",
|
|
77
|
+
label: "Schema",
|
|
78
|
+
group: "Build"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: "/capabilities",
|
|
82
|
+
label: "Capabilities",
|
|
83
|
+
group: "Build"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
path: "/policies",
|
|
87
|
+
label: "Policies",
|
|
88
|
+
group: "Build"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: "/workflows",
|
|
92
|
+
label: "Workflows",
|
|
93
|
+
group: "Build"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
path: "/agent-definitions",
|
|
97
|
+
label: "Agents",
|
|
98
|
+
group: "Build"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: "/modules",
|
|
102
|
+
label: "Modules",
|
|
103
|
+
group: "Build"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
path: "/proposals",
|
|
107
|
+
label: "Proposals",
|
|
108
|
+
group: "Build",
|
|
109
|
+
requiresApplication: !0
|
|
78
110
|
},
|
|
79
111
|
{
|
|
80
112
|
path: "/state",
|
|
81
|
-
label: "State"
|
|
113
|
+
label: "State",
|
|
114
|
+
group: "Operate",
|
|
115
|
+
capabilities: ["state.resources.list", "state.history"]
|
|
82
116
|
},
|
|
83
117
|
{
|
|
84
118
|
path: "/operations",
|
|
85
|
-
label: "Operations"
|
|
119
|
+
label: "Operations",
|
|
120
|
+
group: "Operate",
|
|
121
|
+
capabilities: [
|
|
122
|
+
"provenance.transactions",
|
|
123
|
+
"operations.recent",
|
|
124
|
+
"operations.events"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
path: "/schema",
|
|
129
|
+
label: "Instance schema",
|
|
130
|
+
group: "Operate",
|
|
131
|
+
capabilities: ["data.schema.inspect"]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
path: "/agents",
|
|
135
|
+
label: "Agent principals",
|
|
136
|
+
group: "Operate",
|
|
137
|
+
capabilities: ["agents.list"]
|
|
86
138
|
},
|
|
87
139
|
{
|
|
88
140
|
path: "/replication",
|
|
89
|
-
label: "Replication"
|
|
141
|
+
label: "Replication",
|
|
142
|
+
group: "Operate",
|
|
143
|
+
capabilities: ["replication.health"]
|
|
90
144
|
},
|
|
91
145
|
{
|
|
92
146
|
path: "/applications",
|
|
93
|
-
label: "Applications"
|
|
147
|
+
label: "Applications",
|
|
148
|
+
group: "Operate",
|
|
149
|
+
capabilities: ["applications.list"]
|
|
94
150
|
},
|
|
95
151
|
{
|
|
96
152
|
path: "/monitoring",
|
|
97
|
-
label: "Monitoring"
|
|
153
|
+
label: "Monitoring",
|
|
154
|
+
group: "Operate",
|
|
155
|
+
capabilities: ["monitoring.metrics", "monitoring.latency"]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
path: "/connection",
|
|
159
|
+
label: "Connection",
|
|
160
|
+
group: "Settings"
|
|
98
161
|
},
|
|
99
162
|
{
|
|
100
163
|
path: "/settings",
|
|
101
|
-
label: "
|
|
164
|
+
label: "Instance",
|
|
165
|
+
group: "Settings"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
path: "/api-keys",
|
|
169
|
+
label: "API keys",
|
|
170
|
+
group: "Settings"
|
|
102
171
|
},
|
|
103
172
|
{
|
|
104
173
|
path: "/developer",
|
|
105
|
-
label: "Developer"
|
|
174
|
+
label: "Developer access",
|
|
175
|
+
group: "Settings",
|
|
176
|
+
capabilities: ["developer.access"]
|
|
106
177
|
}
|
|
107
178
|
];
|
|
108
|
-
function
|
|
109
|
-
|
|
110
|
-
|
|
179
|
+
function tt(e) {
|
|
180
|
+
return $.filter((t) => !t.live || e.liveActivity).map((t) => t.requiresApplication && !e.applicationSelected ? {
|
|
181
|
+
destination: t,
|
|
182
|
+
available: !1,
|
|
183
|
+
reason: "Needs a deployed application"
|
|
184
|
+
} : t.capabilities && e.usable && !t.capabilities.some(e.usable) ? {
|
|
185
|
+
destination: t,
|
|
186
|
+
available: !1,
|
|
187
|
+
reason: "Not part of this instance"
|
|
188
|
+
} : {
|
|
189
|
+
destination: t,
|
|
190
|
+
available: !0,
|
|
191
|
+
reason: ""
|
|
192
|
+
}).sort((e, t) => Q.indexOf(e.destination.group) - Q.indexOf(t.destination.group));
|
|
193
|
+
}
|
|
194
|
+
function nt(e) {
|
|
195
|
+
return $.find((t) => t.path === e);
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/components/RouteErrorBoundary.tsx
|
|
199
|
+
var rt = class extends Je.Component {
|
|
200
|
+
constructor(...e) {
|
|
201
|
+
super(...e), this.state = {};
|
|
202
|
+
}
|
|
203
|
+
static getDerivedStateFromError(e) {
|
|
204
|
+
return { error: e };
|
|
205
|
+
}
|
|
206
|
+
componentDidCatch(e, t) {
|
|
207
|
+
console.error(`Studio screen failed to render (${this.props.routeKey}):`, e, t.componentStack);
|
|
208
|
+
}
|
|
209
|
+
render() {
|
|
210
|
+
let { error: e } = this.state;
|
|
211
|
+
return e ? /* @__PURE__ */ X("section", {
|
|
212
|
+
role: "alert",
|
|
213
|
+
className: "cp-notice",
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ Y("h2", { children: "This screen could not be displayed" }),
|
|
216
|
+
/* @__PURE__ */ Y("p", { children: e.message || "An unexpected error occurred while rendering this screen." }),
|
|
217
|
+
/* @__PURE__ */ Y("p", {
|
|
218
|
+
className: "cp-muted",
|
|
219
|
+
children: "The rest of Studio is unaffected. Choose another screen from the navigation, or reload to try again."
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ Y("button", {
|
|
222
|
+
className: "btn btn-ghost",
|
|
223
|
+
onClick: () => this.setState({ error: void 0 }),
|
|
224
|
+
children: "Try again"
|
|
225
|
+
})
|
|
226
|
+
]
|
|
227
|
+
}) : this.props.children;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
function it({ children: e }) {
|
|
231
|
+
let { pathname: t } = q();
|
|
232
|
+
return /* @__PURE__ */ Y(rt, {
|
|
233
|
+
routeKey: t,
|
|
234
|
+
children: e
|
|
235
|
+
}, t);
|
|
236
|
+
}
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/app.tsx
|
|
239
|
+
function at(e) {
|
|
240
|
+
return e.explicitAuthority ? {
|
|
241
|
+
source: "explicit-authority",
|
|
242
|
+
authorityUrl: e.explicitAuthority
|
|
243
|
+
} : e.configuredAuthority ? {
|
|
244
|
+
source: "configured-authority",
|
|
245
|
+
authorityUrl: e.configuredAuthority
|
|
246
|
+
} : e.injected ? {
|
|
247
|
+
source: "injected",
|
|
248
|
+
authorityUrl: ""
|
|
249
|
+
} : {
|
|
250
|
+
source: "browser",
|
|
251
|
+
authorityUrl: ""
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
function ot({ registration: e, session: t = "reachable", applicationUrl: n }) {
|
|
255
|
+
return e ? /* @__PURE__ */ X("div", {
|
|
256
|
+
className: "runtime-notice",
|
|
257
|
+
"data-connection": "connected",
|
|
258
|
+
children: ["Application connection: Connected ✓", e.namespace ? ` (namespace ${e.namespace})` : ""]
|
|
259
|
+
}) : t === "unreachable" ? /* @__PURE__ */ X("div", {
|
|
260
|
+
className: "runtime-notice",
|
|
261
|
+
"data-connection": "session-unreachable",
|
|
262
|
+
children: [
|
|
263
|
+
"Application connection: unknown — Studio cannot reach the ",
|
|
264
|
+
/* @__PURE__ */ Y("code", { children: "feltdb dev" }),
|
|
265
|
+
" session. Check that it is still running, then reload."
|
|
266
|
+
]
|
|
267
|
+
}) : /* @__PURE__ */ X("div", {
|
|
268
|
+
className: "runtime-notice",
|
|
269
|
+
"data-connection": "waiting",
|
|
270
|
+
children: [
|
|
271
|
+
"Application connection: waiting for the application.",
|
|
272
|
+
" ",
|
|
273
|
+
n ? /* @__PURE__ */ X(J, { children: [
|
|
274
|
+
"Open it at ",
|
|
275
|
+
/* @__PURE__ */ Y("a", {
|
|
276
|
+
href: n,
|
|
277
|
+
target: "_blank",
|
|
278
|
+
rel: "noreferrer",
|
|
279
|
+
children: n
|
|
280
|
+
}),
|
|
281
|
+
". "
|
|
282
|
+
] }) : "Open the application. ",
|
|
283
|
+
"If it is already open, its browser console names what keeps it from connecting."
|
|
284
|
+
]
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
function st({ db: e, remoteUrl: t = "", token: n = "", namespace: r = "default", deploymentRuntime: i = "browser", applicationUrl: a = "", applicationId: o = "", environment: s = "production", developmentSession: c, managedPublish: l, sourceSync: d, onConnect: f }) {
|
|
288
|
+
let [p, h] = G(null), g = j(e || null, r), [_, v] = G([]), [ne, x] = G("reachable"), [S, D] = G([]), [O, ae] = G(0), [oe, k] = G();
|
|
289
|
+
W(() => {
|
|
111
290
|
let t = !0;
|
|
112
291
|
return fetch("/_feltdb/project", { cache: "no-store" }).then(async (e) => {
|
|
113
292
|
if (!e.ok) throw Error("No project model endpoint");
|
|
114
293
|
let n = await e.json();
|
|
115
|
-
t && h(
|
|
294
|
+
t && h($e(n.source));
|
|
116
295
|
}).catch(async () => {
|
|
117
296
|
let n = e ? await e.collection("_flow_apps").all() : [];
|
|
118
297
|
t && n[0]?.spec && h(n[0].spec);
|
|
119
298
|
}), () => {
|
|
120
299
|
t = !1;
|
|
121
300
|
};
|
|
122
|
-
}, [e]),
|
|
123
|
-
if (!
|
|
124
|
-
let e = !0, t = () => void fetch("/_feltdb/runtime", { cache: "no-store" }).then((e) =>
|
|
125
|
-
e
|
|
301
|
+
}, [e]), W(() => {
|
|
302
|
+
if (!c?.sessionId) return;
|
|
303
|
+
let e = !0, t = () => void fetch("/_feltdb/runtime", { cache: "no-store" }).then((e) => {
|
|
304
|
+
if (!e.ok) throw Error(`development session answered ${e.status}`);
|
|
305
|
+
return e.json();
|
|
306
|
+
}).then((t) => {
|
|
307
|
+
e && (x("reachable"), v(t.runtimes || []));
|
|
126
308
|
}).catch(() => {
|
|
127
|
-
e &&
|
|
309
|
+
e && (x("unreachable"), v([]));
|
|
128
310
|
});
|
|
129
311
|
t();
|
|
130
312
|
let n = window.setInterval(t, 2e3);
|
|
131
313
|
return () => {
|
|
132
314
|
e = !1, window.clearInterval(n);
|
|
133
315
|
};
|
|
134
|
-
}, [
|
|
135
|
-
let e =
|
|
316
|
+
}, [c?.sessionId]), W(() => {
|
|
317
|
+
let e = _[0]?.runtimeInstanceId;
|
|
136
318
|
if (!e) {
|
|
137
|
-
|
|
319
|
+
D([]);
|
|
138
320
|
return;
|
|
139
321
|
}
|
|
140
322
|
let t = !0, n = 0, r = () => void fetch(`/_feltdb/observations?runtimeInstanceId=${encodeURIComponent(e)}&cursor=${n}&limit=100`, { cache: "no-store" }).then((e) => e.ok ? e.json() : { observations: [] }).then((e) => {
|
|
141
|
-
t && (n = e.nextCursor ?? n,
|
|
323
|
+
t && (n = e.nextCursor ?? n, ae(e.dropped || 0), D((t) => [...t, ...e.observations || []].slice(-200)));
|
|
142
324
|
}).catch(() => void 0);
|
|
143
325
|
r();
|
|
144
326
|
let i = window.setInterval(r, 1e3);
|
|
145
327
|
return () => {
|
|
146
328
|
t = !1, window.clearInterval(i);
|
|
147
329
|
};
|
|
148
|
-
}, [
|
|
149
|
-
let
|
|
150
|
-
|
|
330
|
+
}, [_[0]?.runtimeInstanceId]);
|
|
331
|
+
let A = (e, t) => {
|
|
332
|
+
k({
|
|
151
333
|
collection: e,
|
|
152
334
|
id: t
|
|
153
335
|
});
|
|
154
336
|
let n = window.location.search;
|
|
155
337
|
window.history.pushState({}, "", `/data${n}`), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
156
338
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ Y(u, {
|
|
158
340
|
options: {
|
|
159
341
|
baseUrl: t,
|
|
160
342
|
token: n,
|
|
161
343
|
applicationId: o,
|
|
162
|
-
environment:
|
|
344
|
+
environment: s
|
|
163
345
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
346
|
+
runtime: i,
|
|
347
|
+
children: /* @__PURE__ */ Y(Xe, { children: /* @__PURE__ */ Y(lt, {
|
|
348
|
+
namespace: g?.namespace,
|
|
349
|
+
liveActivity: !!c?.sessionId,
|
|
350
|
+
applicationSelected: !!o,
|
|
351
|
+
search: /* @__PURE__ */ Y(F, {
|
|
168
352
|
db: e,
|
|
169
|
-
model:
|
|
353
|
+
model: p
|
|
170
354
|
}),
|
|
171
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ X("div", {
|
|
172
356
|
className: "studio-content",
|
|
173
|
-
children: [
|
|
174
|
-
|
|
357
|
+
children: [c?.sessionId && /* @__PURE__ */ Y(ot, {
|
|
358
|
+
registration: _[0],
|
|
359
|
+
session: ne,
|
|
360
|
+
applicationUrl: a
|
|
361
|
+
}), /* @__PURE__ */ Y(it, { children: /* @__PURE__ */ X(Ze, { children: [
|
|
362
|
+
/* @__PURE__ */ Y(K, {
|
|
175
363
|
path: "/overview",
|
|
176
|
-
element: /* @__PURE__ */
|
|
364
|
+
element: /* @__PURE__ */ Y(m, {})
|
|
177
365
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ Y(K, {
|
|
179
367
|
path: "/data",
|
|
180
|
-
element: /* @__PURE__ */
|
|
181
|
-
focus:
|
|
182
|
-
onFocusHandled: () =>
|
|
368
|
+
element: /* @__PURE__ */ Y(te, {
|
|
369
|
+
focus: oe,
|
|
370
|
+
onFocusHandled: () => k(void 0)
|
|
183
371
|
})
|
|
184
372
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ Y(K, {
|
|
186
374
|
path: "/schema",
|
|
187
|
-
element: /* @__PURE__ */
|
|
375
|
+
element: /* @__PURE__ */ Y(y, {})
|
|
188
376
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ Y(K, {
|
|
190
378
|
path: "/agents",
|
|
191
|
-
element: /* @__PURE__ */
|
|
379
|
+
element: /* @__PURE__ */ Y(re, { onOpenRecord: A })
|
|
192
380
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ Y(K, {
|
|
194
382
|
path: "/state",
|
|
195
|
-
element: /* @__PURE__ */
|
|
383
|
+
element: /* @__PURE__ */ Y(T, {})
|
|
196
384
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ Y(K, {
|
|
198
386
|
path: "/operations",
|
|
199
|
-
element: /* @__PURE__ */
|
|
387
|
+
element: /* @__PURE__ */ Y(ee, { onOpenRecord: A })
|
|
200
388
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ Y(K, {
|
|
202
390
|
path: "/replication",
|
|
203
|
-
element: /* @__PURE__ */
|
|
391
|
+
element: /* @__PURE__ */ Y(b, {})
|
|
204
392
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ Y(K, {
|
|
206
394
|
path: "/applications",
|
|
207
|
-
element: /* @__PURE__ */
|
|
395
|
+
element: /* @__PURE__ */ Y(ie, {})
|
|
208
396
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ Y(K, {
|
|
210
398
|
path: "/monitoring",
|
|
211
|
-
element: /* @__PURE__ */
|
|
399
|
+
element: /* @__PURE__ */ Y(E, {})
|
|
212
400
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ Y(K, {
|
|
214
402
|
path: "/settings",
|
|
215
|
-
element: /* @__PURE__ */
|
|
403
|
+
element: /* @__PURE__ */ Y(w, {})
|
|
216
404
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ Y(K, {
|
|
218
406
|
path: "/developer",
|
|
219
|
-
element: /* @__PURE__ */
|
|
407
|
+
element: /* @__PURE__ */ Y(C, {})
|
|
220
408
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ Y(K, {
|
|
222
410
|
path: "/",
|
|
223
|
-
element: /* @__PURE__ */
|
|
411
|
+
element: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(R, {
|
|
224
412
|
configuration: d,
|
|
225
413
|
onApplied: () => window.location.reload()
|
|
226
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ Y(I, {
|
|
227
415
|
db: e,
|
|
228
416
|
namespace: r,
|
|
229
|
-
projectSpec:
|
|
230
|
-
managedPublish:
|
|
417
|
+
projectSpec: p,
|
|
418
|
+
managedPublish: l,
|
|
231
419
|
onSpecChange: h
|
|
232
420
|
})] })
|
|
233
421
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ Y(K, {
|
|
235
423
|
path: "/capabilities",
|
|
236
|
-
element: /* @__PURE__ */
|
|
424
|
+
element: /* @__PURE__ */ Y(L, {
|
|
237
425
|
db: e,
|
|
238
|
-
model:
|
|
426
|
+
model: p
|
|
239
427
|
})
|
|
240
428
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ Y(K, {
|
|
242
430
|
path: "/contract",
|
|
243
|
-
element: /* @__PURE__ */
|
|
244
|
-
model:
|
|
431
|
+
element: /* @__PURE__ */ Y(B, {
|
|
432
|
+
model: p,
|
|
245
433
|
section: "schema"
|
|
246
434
|
})
|
|
247
435
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ Y(K, {
|
|
249
437
|
path: "/policies",
|
|
250
|
-
element: /* @__PURE__ */
|
|
251
|
-
model:
|
|
438
|
+
element: /* @__PURE__ */ Y(B, {
|
|
439
|
+
model: p,
|
|
252
440
|
section: "policies"
|
|
253
441
|
})
|
|
254
442
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ Y(K, {
|
|
256
444
|
path: "/workflows",
|
|
257
|
-
element: /* @__PURE__ */
|
|
445
|
+
element: /* @__PURE__ */ Y(H, {
|
|
258
446
|
db: e,
|
|
259
|
-
model:
|
|
447
|
+
model: p
|
|
260
448
|
})
|
|
261
449
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ Y(K, {
|
|
263
451
|
path: "/agent-definitions",
|
|
264
|
-
element: /* @__PURE__ */
|
|
452
|
+
element: /* @__PURE__ */ Y(V, {
|
|
265
453
|
db: e,
|
|
266
|
-
model:
|
|
454
|
+
model: p
|
|
267
455
|
})
|
|
268
456
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ Y(K, {
|
|
270
458
|
path: "/modules",
|
|
271
|
-
element: /* @__PURE__ */
|
|
459
|
+
element: /* @__PURE__ */ Y(P, { model: p })
|
|
272
460
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ Y(K, {
|
|
274
462
|
path: "/executions",
|
|
275
|
-
element: /* @__PURE__ */
|
|
463
|
+
element: /* @__PURE__ */ Y(N, {
|
|
276
464
|
db: e,
|
|
277
|
-
model:
|
|
465
|
+
model: p
|
|
278
466
|
})
|
|
279
467
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ Y(K, {
|
|
281
469
|
path: "/proposals",
|
|
282
|
-
element: o ? /* @__PURE__ */
|
|
470
|
+
element: o ? /* @__PURE__ */ Y(z, {
|
|
283
471
|
serviceUrl: t,
|
|
284
472
|
token: n,
|
|
285
473
|
applicationId: o,
|
|
286
|
-
environment:
|
|
287
|
-
applicationName:
|
|
474
|
+
environment: s,
|
|
475
|
+
applicationName: p?.app,
|
|
288
476
|
sourceSync: d
|
|
289
|
-
}) : /* @__PURE__ */
|
|
477
|
+
}) : /* @__PURE__ */ X("div", {
|
|
290
478
|
className: "model-empty",
|
|
291
|
-
children: "
|
|
479
|
+
children: [/* @__PURE__ */ Y("h1", { children: "Proposals" }), /* @__PURE__ */ X("p", { children: [
|
|
480
|
+
"Proposals review changes to a deployed application before they are promoted. A development session applies changes to ",
|
|
481
|
+
/* @__PURE__ */ Y("code", { children: "feltdb.flow" }),
|
|
482
|
+
" directly, so there is nothing to review here; connect Studio to a deployed application to see its proposals."
|
|
483
|
+
] })]
|
|
292
484
|
})
|
|
293
485
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ Y(K, {
|
|
295
487
|
path: "/activity",
|
|
296
|
-
element: /* @__PURE__ */
|
|
488
|
+
element: /* @__PURE__ */ X("div", {
|
|
297
489
|
className: "runtime-activity",
|
|
298
490
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
|
|
491
|
+
/* @__PURE__ */ Y("h1", { children: "Live Activity" }),
|
|
492
|
+
/* @__PURE__ */ X("p", { children: [
|
|
493
|
+
S.some((e) => Date.now() - e.timestamp < 5e3) ? "Active" : "Idle",
|
|
302
494
|
" · FeltDB client instance ",
|
|
303
|
-
|
|
495
|
+
_[0]?.runtimeInstanceId || "not connected"
|
|
304
496
|
] }),
|
|
305
|
-
|
|
497
|
+
O > 0 && /* @__PURE__ */ X("p", {
|
|
306
498
|
className: "runtime-notice",
|
|
307
499
|
children: [
|
|
308
500
|
"Observation is incomplete: ",
|
|
309
|
-
|
|
501
|
+
O,
|
|
310
502
|
" events dropped."
|
|
311
503
|
]
|
|
312
504
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
] }) }), /* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ X("table", { children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [
|
|
506
|
+
/* @__PURE__ */ Y("th", { children: "Time" }),
|
|
507
|
+
/* @__PURE__ */ Y("th", { children: "Operation" }),
|
|
508
|
+
/* @__PURE__ */ Y("th", { children: "Collection" }),
|
|
509
|
+
/* @__PURE__ */ Y("th", { children: "Status" }),
|
|
510
|
+
/* @__PURE__ */ Y("th", { children: "Duration" })
|
|
511
|
+
] }) }), /* @__PURE__ */ Y("tbody", { children: [...S].reverse().map((e) => /* @__PURE__ */ X("tr", { children: [
|
|
512
|
+
/* @__PURE__ */ Y("td", { children: new Date(e.timestamp).toLocaleTimeString() }),
|
|
513
|
+
/* @__PURE__ */ Y("td", { children: e.operation?.type }),
|
|
514
|
+
/* @__PURE__ */ Y("td", { children: e.operation?.collection || "—" }),
|
|
515
|
+
/* @__PURE__ */ Y("td", { children: e.status }),
|
|
516
|
+
/* @__PURE__ */ Y("td", { children: e.durationMs === void 0 ? "—" : `${e.durationMs} ms` })
|
|
325
517
|
] }, e.cursor || e.eventId)) })] })
|
|
326
518
|
]
|
|
327
519
|
})
|
|
328
520
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ Y(K, {
|
|
330
522
|
path: "/connection",
|
|
331
|
-
element: /* @__PURE__ */
|
|
523
|
+
element: /* @__PURE__ */ Y(M, {
|
|
332
524
|
db: e,
|
|
333
525
|
remoteUrl: t,
|
|
334
526
|
token: n,
|
|
335
527
|
applicationUrl: a,
|
|
336
528
|
feltDBRuntime: i,
|
|
337
|
-
authorityUrl:
|
|
529
|
+
authorityUrl: c?.authorityUrl || t,
|
|
338
530
|
onConnect: f
|
|
339
531
|
})
|
|
340
532
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ Y(K, {
|
|
342
534
|
path: "/api-keys",
|
|
343
|
-
element: /* @__PURE__ */
|
|
535
|
+
element: /* @__PURE__ */ X("div", {
|
|
344
536
|
style: { padding: "2rem" },
|
|
345
|
-
children: [/* @__PURE__ */
|
|
537
|
+
children: [/* @__PURE__ */ Y("h1", { children: "API keys" }), /* @__PURE__ */ Y(U, {
|
|
346
538
|
apiUrl: t,
|
|
347
539
|
token: n,
|
|
348
540
|
namespace: r,
|
|
349
|
-
onConfigure: () => window.location.assign(
|
|
541
|
+
onConfigure: () => window.location.assign(`/connection${window.location.search}`)
|
|
350
542
|
})]
|
|
351
543
|
})
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ Y(K, {
|
|
546
|
+
path: "*",
|
|
547
|
+
element: /* @__PURE__ */ Y(ct, {})
|
|
352
548
|
})
|
|
353
|
-
] })]
|
|
549
|
+
] }) })]
|
|
354
550
|
})
|
|
355
551
|
}) })
|
|
356
552
|
});
|
|
357
553
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
path: "/modules",
|
|
385
|
-
label: "Modules"
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
path: "/proposals",
|
|
389
|
-
label: "Proposals"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
path: "/activity",
|
|
393
|
-
label: "Live Activity",
|
|
394
|
-
live: !0
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
path: "/executions",
|
|
398
|
-
label: "Executions"
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
path: "/connection",
|
|
402
|
-
label: "Connection"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
path: "/api-keys",
|
|
406
|
-
label: "API Keys"
|
|
407
|
-
}
|
|
408
|
-
];
|
|
409
|
-
function tt({ namespace: e, liveActivity: t, search: n, children: r }) {
|
|
410
|
-
let a = Ge(), o = Ke(), s = He(!0);
|
|
411
|
-
J(() => {
|
|
412
|
-
if (s.current) {
|
|
413
|
-
s.current = !1;
|
|
554
|
+
function ct() {
|
|
555
|
+
let e = q();
|
|
556
|
+
return /* @__PURE__ */ X("div", {
|
|
557
|
+
className: "model-empty",
|
|
558
|
+
"data-route": "not-found",
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ Y("h1", { children: "No such page in Studio" }),
|
|
561
|
+
/* @__PURE__ */ X("p", { children: [
|
|
562
|
+
"Studio has no screen at ",
|
|
563
|
+
/* @__PURE__ */ Y("code", { children: e.pathname }),
|
|
564
|
+
"."
|
|
565
|
+
] }),
|
|
566
|
+
/* @__PURE__ */ Y("p", { children: /* @__PURE__ */ Y("a", {
|
|
567
|
+
href: `/overview${e.search}`,
|
|
568
|
+
children: "Go to the overview"
|
|
569
|
+
}) })
|
|
570
|
+
]
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
function lt({ namespace: e, liveActivity: t, applicationSelected: n, search: r, children: a }) {
|
|
574
|
+
let s = q(), { capabilities: c } = i(), l = Qe(), u = Ye(!0);
|
|
575
|
+
W(() => {
|
|
576
|
+
if (u.current) {
|
|
577
|
+
u.current = !1;
|
|
414
578
|
return;
|
|
415
579
|
}
|
|
416
|
-
|
|
417
|
-
}, [
|
|
418
|
-
let
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
580
|
+
et("studio-main");
|
|
581
|
+
}, [s.pathname]);
|
|
582
|
+
let d = tt({
|
|
583
|
+
usable: c.loaded ? (e) => c.usable(e) : null,
|
|
584
|
+
liveActivity: t,
|
|
585
|
+
applicationSelected: n
|
|
586
|
+
}).map(({ destination: e, available: t, reason: n }, r) => ({
|
|
587
|
+
id: e.path,
|
|
588
|
+
label: t ? e.label : /* @__PURE__ */ X(J, { children: [e.label, /* @__PURE__ */ X("span", {
|
|
589
|
+
className: "nav-note",
|
|
590
|
+
children: [" · ", n.toLowerCase()]
|
|
591
|
+
})] }),
|
|
592
|
+
href: `${e.path}${s.search}`,
|
|
593
|
+
group: e.group,
|
|
594
|
+
order: r,
|
|
595
|
+
current: s.pathname === e.path,
|
|
596
|
+
...t ? {} : {
|
|
597
|
+
className: "nav-unavailable",
|
|
598
|
+
attrs: {
|
|
599
|
+
title: n,
|
|
600
|
+
"data-availability": "unavailable"
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}));
|
|
604
|
+
return /* @__PURE__ */ Y(o, {
|
|
427
605
|
product: {
|
|
428
606
|
name: "FeltDB Studio",
|
|
429
|
-
homeHref: `/overview${
|
|
607
|
+
homeHref: `/overview${s.search}`,
|
|
430
608
|
mark: "F"
|
|
431
609
|
},
|
|
432
610
|
mainId: "studio-main",
|
|
433
|
-
context: e ? /* @__PURE__ */
|
|
611
|
+
context: e ? /* @__PURE__ */ Y("span", {
|
|
434
612
|
className: "instance-info",
|
|
435
613
|
title: "Namespace",
|
|
436
614
|
children: e
|
|
437
615
|
}) : void 0,
|
|
438
|
-
search:
|
|
439
|
-
navigation:
|
|
440
|
-
onNavigate: (e) =>
|
|
441
|
-
children:
|
|
616
|
+
search: r,
|
|
617
|
+
navigation: d,
|
|
618
|
+
onNavigate: (e) => l(e),
|
|
619
|
+
children: a
|
|
442
620
|
});
|
|
443
621
|
}
|
|
444
622
|
//#endregion
|
|
445
|
-
export {
|
|
623
|
+
export { V as AgentExplorer, re as Agents, ot as ApplicationConnectionNotice, I as ApplicationDesigner, ie as Applications, R as AskFeltDB, ae as BrowserRuntimeNotice, L as CapabilityExplorer, je as CapabilitySet, A as Capable, _ as CommittedRevision, _e as ConflictExplorer, B as ContractInspector, Me as ControlPlaneApi, Ne as ControlPlaneError, u as ControlPlaneProvider, te as DataBrowser, C as Developer, g as Disconnected, k as Empty, N as ExecutionViewer, f as Failure, F as GlobalSearch, ye as HealthCenter, v as INTEGRITY_CHECK, t as Identity, m as InstanceOverview, oe as Json, U as KeyManagementPanel, p as Loading, Le as ManagedInstancePanel, Ie as ManagedInstanceUtil, P as ModuleExplorer, E as Monitoring, ee as OperationsConsole, de as OperationsExplorer, fe as OverviewDashboard, r as Page, n as PartialNotice, l as Path, me as PeerMap, z as ProposalBrowser, he as ProvenanceViewer, ge as ReferenceExplorer, b as Replication, h as ReplicationHealthUnavailable, Q as STUDIO_GROUPS, $ as STUDIO_NAVIGATION, y as SchemaExplorer, Se as ServiceApiError, w as Settings, M as SettingsPanel, x as Stat, ve as StateExplorer, T as StateWorkbench, e as StatusPill, st as StudioApp, Oe as StudioProposalApi, Ce as StudioServiceApi, ne as Tabs, s as Timestamp, S as TransactionObservabilityUnavailable, c as Unavailable, H as WorkflowVisualizer, Re as capitalize, Pe as controlPlaneErrorMessage, pe as dataCollectionLocation, ze as fetchDashboardStats, Be as fetchDiagnostics, Ve as fetchPeers, He as fetchProvenance, Ue as formatBytes, We as formatReference, Ge as formatRelativeTime, Fe as formatStatePath, Ke as formatTime, we as isSecretField, O as operationsAvailability, ke as proposalErrorMessage, Ae as proposalSections, D as replicationAvailability, Te as resolveStudioApplicationId, at as resolveStudioConnection, Ee as safeDisplayValue, qe as searchReferences, De as serviceApiErrorMessage, nt as studioDestination, tt as studioNavigation, xe as useCollection, i as useControlPlane, a as useControlPlaneResource, le as useDashboardStats, j as useFeltDB, be as usePeers, ue as useProvenance, ce as useRuntimeDiagnostics };
|