@brickkit/core 0.16.0-beta.0 → 0.16.0-beta.2
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/chunks/server.d.ts
CHANGED
|
@@ -155,6 +155,15 @@ interface DashboardOptions {
|
|
|
155
155
|
* lost when it restarts. Needs a folder that outlives the container.
|
|
156
156
|
*/
|
|
157
157
|
historyDays?: number;
|
|
158
|
+
/**
|
|
159
|
+
* Show the Schedules and Workflows views, which `brick dev` always has: each
|
|
160
|
+
* schedule's next run and last runs, and the workflow inspector with every
|
|
161
|
+
* run's steps. Default false, because they do more than monitor: a signed-in
|
|
162
|
+
* user (one `auth.authorize` returned as `{ user }`) can run a schedule now,
|
|
163
|
+
* cancel or replay a run, and resume a hook. Anyone else the dashboard lets
|
|
164
|
+
* in (by token, or by `authorize` returning `true`) can only look.
|
|
165
|
+
*/
|
|
166
|
+
inspector?: boolean;
|
|
158
167
|
}
|
|
159
168
|
type EndpointMethod = HttpMethod;
|
|
160
169
|
/** The logger handed to endpoint handlers (the same one actions get). */
|
package/dist/chunks/server.js
CHANGED
|
@@ -4761,14 +4761,16 @@ const MIN_TOKEN_LENGTH = 16;
|
|
|
4761
4761
|
*/
|
|
4762
4762
|
function normalizeDashboard(options) {
|
|
4763
4763
|
if (options === void 0) return void 0;
|
|
4764
|
-
const { port, host, auth, historyDays } = options;
|
|
4764
|
+
const { port, host, auth, historyDays, inspector } = options;
|
|
4765
4765
|
if (port !== void 0 && (!Number.isInteger(port) || port < 1 || port > 65535)) throw new Error(`Brick: dashboard port must be an integer from 1 to 65535, not ${String(port)}.`);
|
|
4766
4766
|
if (host !== void 0 && (typeof host !== "string" || host.trim() === "")) throw new Error("Brick: dashboard host must be an address, such as '0.0.0.0'.");
|
|
4767
4767
|
if (historyDays !== void 0 && (!Number.isInteger(historyDays) || historyDays < 0)) throw new Error(`Brick: dashboard historyDays must be a whole number of days, not ${String(historyDays)}.`);
|
|
4768
|
+
if (inspector !== void 0 && typeof inspector !== "boolean") throw new Error("Brick: dashboard inspector must be true or false.");
|
|
4768
4769
|
const normalized = {
|
|
4769
4770
|
...port !== void 0 ? { port } : {},
|
|
4770
4771
|
...host !== void 0 ? { host: host.trim() } : {},
|
|
4771
|
-
...historyDays !== void 0 ? { historyDays } : {}
|
|
4772
|
+
...historyDays !== void 0 ? { historyDays } : {},
|
|
4773
|
+
...inspector !== void 0 ? { inspector } : {}
|
|
4772
4774
|
};
|
|
4773
4775
|
if (auth !== void 0) {
|
|
4774
4776
|
const tokens = auth.token === void 0 ? void 0 : typeof auth.token === "string" ? [auth.token] : [...auth.token];
|