@brickkit/core 0.13.2 → 0.14.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/chunks/client.d.ts +1 -1
- package/dist/chunks/server.d.ts +6 -2
- package/dist/chunks/server.js +938 -258
- package/dist/chunks/server.js.map +1 -1
- package/dist/chunks/types.d.ts +653 -7
- package/dist/client.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/workflow.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as BrickSocketError, Q as BrickSocketConnectOptions,
|
|
1
|
+
import { $ as BrickSocketError, Q as BrickSocketConnectOptions, X as BrickSocketClient, Y as BrickClientSocket, at as BrickSocketStatus, it as BrickSocketSender, nt as BrickSocketReconnectOptions, tt as BrickSocketHandlerError, ut as SocketEventArgs, wt as isControlEvent, xt as STANDARD_ERRORS } from "./chunks/types.js";
|
|
2
2
|
import { a as BrickClientOptions, c as BrickTransportError, d as InferActionInput, f as InferActionOutput, g as ATTR, h as isBrickTransportError, i as BrickClientAction, l as InferActionErrorCodes, m as isBrickServerError, n as BrickCallOptions, o as BrickServerError, p as createBrickClient, r as BrickClient, s as BrickServices, t as BrickActionCaller, u as InferActionFailure, v as SPAN, y as kebabCase } from "./chunks/client.js";
|
|
3
3
|
export { ATTR, BrickActionCaller, BrickCallOptions, BrickClient, BrickClientAction, BrickClientOptions, type BrickClientSocket, BrickServerError, BrickServices, type BrickSocketClient, type BrickSocketConnectOptions, BrickSocketError, type BrickSocketHandlerError, type BrickSocketReconnectOptions, type BrickSocketSender, type BrickSocketStatus, BrickTransportError, InferActionErrorCodes, InferActionFailure, InferActionInput, InferActionOutput, SPAN, STANDARD_ERRORS, type SocketEventArgs, createBrickClient, isBrickServerError, isBrickTransportError, isControlEvent, kebabCase };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as EventsOptions, $t as PluginRouteRegistrar, A as Resource, An as PluginSetupContext, At as defineDatabase, B as ServiceSchema, Bn as resolveSecrets, Bt as foreignKey, C as ErrorDetails, Cn as PluginFactory, Cr as useDeps, Ct as WireError, D as NarrowAuthorizedContext, Dn as PluginLifecycleContext, Dt as EnvInput, E as Logger, En as PluginInstance, Et as DatabaseHandle, F as ResourceConfig, Fn as defineSecret, Ft as BrickSQLiteDatabase, G as ToolConfigWithoutAuthorize, Gn as getHostHooks, Gt as sqliteTable, H as Tool, Hn as HostHooks, Ht as integer, I as ResourceIdentity, In as envSource, It as BunSQLiteDatabase, J as ValidationErrorItem, Jn as EventDelivery, Jt as ContextOf, K as ToolOptions, Kn as CrudEventPayload, Kt as text, L as ResourceTypeOptions, Ln as listSecrets, Lt as SQLiteDatabaseConfig, M as ResourceActionConfig, Mn as SecretOptions, Mt as PostgresDatabase, N as ResourceActionInput, Nn as SecretRef, Nt as PostgresDatabaseConfig, O as PreparationContribution, On as PluginManifest, Ot as PostgresDefinition, P as ResourceChild, Pn as SecretSource, Pt as createPostgresDatabase, Qn as EventWorkflow, Qt as PluginRouteMethod, R as Service, Rn as overrideSecret, Rt as blob, S as ErrorBuilder, Sn as PluginContext, Sr as port, T as InferTableRow, Tn as PluginInstallOptions, Tt as DatabaseDefinition, U as ToolAnnotations, Un as PluginHookArgs, Ut as primaryKey, V as StandardErrorMap, Vn as PluginTableBuilders, Vt as index, W as ToolConfigWithAuthorize, Wn as PluginHooks, Wt as real, Xn as EventListener, Xt as PLUGIN_KIND, Y as BrickClientSocket, Yn as EventEnvelope, Yt as InstalledPlugin, Z as BrickSocketConfig, Zn as EventRecorder, Zt as PluginEndpointContext, _ as CommandDecision, _n as OutboxTable, _r as crudEventSource, _t as stopAllEvents, a as ActionConfigWithoutAuthorize, an as ResourcePluginTypes, ar as WorkflowsOptions, b as DefaultServiceContext, bn as outboxTable, br as Port, bt as OutboxCounts, c as ActionExecutionError, cn as ActionAccessInfo, cr as ScheduleRun, ct as SocketEmitArgs, d as BaseActionConfig, dn as PostgresScheduleTable, dr as defineSchedule, dt as SocketPayloads, en as PluginRouteScope, er as EventsWorld, et as BrickSocketHandle, f as BaseContext, fn as SQLiteScheduleTable, fr as CrudEventOperation, ft as SocketReplay, g as CommandConfig, gn as OutboxStatus, gr as crudEventName, gt as ScheduleControl, h as CommandChildren, hn as scheduleTable, hr as EventRefs, ht as EventsHub, i as ActionConfigWithAuthorize, in as ResourcePluginContext, ir as WorkflowEvent, it as BrickSocketSender, j as ResourceActionAccess, jn as definePlugin, jt as isDatabaseHandle, k as ProxyOptions, kn as PluginServiceContext, kt as SQLiteDefinition, l as ActionSchema, ln as ResourceActionInfo, lr as ScheduleWorkflow, lt as SocketEmitOptions, m as Command, mn as ScheduleTable, mr as EventRef, mt as EventsDefinition, n as ActionAccessPolicy, nn as ResourcePlugin, nr as RetryDecision, o as ActionContext, on as ServicePlugin, or as Schedule, ot as SocketBroker, p as ChildChanges, pn as ScheduleRunRecord, pr as EventCatalog, pt as SocketSchemas, q as ValidationError, qn as DispatchOptions, qt as uniqueIndex, r as ActionConfig, rn as ResourcePluginAPI, rr as ServiceEvents, rt as BrickSocketSchema, s as ActionErrorDefinition, sn as ServicePluginContext, sr as ScheduleConfig, st as SocketBrokerMessage, t as Action, tn as PluginRoutes, tr as ListenerFailure, u as ArchitectureSchema, ur as ScheduleWorkflowRun, ut as SocketEventArgs, v as CommandErrors, vn as PostgresOutboxTable, vr as isCrudEvent, vt as ScheduleState, w as InferTableInsert, wn as PluginInfo, wr as HttpMethod, x as DuplicateNameError, xn as PluginAppContext, xr as Ports, y as CommandRow, yn as SQLiteOutboxTable, yr as DepsOf, yt as Dispatcher, z as ServiceOptions, zn as resetSecrets, zt as createSQLiteDatabase } from "./chunks/types.js";
|
|
2
2
|
import { A as scalarDocsHTML, C as ApiDocument, D as ReferenceOptions, E as ReferenceDocument, M as RouteIR, N as RouteMethod, O as referencePlugin, S as DashboardOptions, T as OpenApiDocument, _ as EndpointContext, a as RequestLoggingOptions, b as EndpointMethod, c as CompiledRoute, d as loadCompiledBrickApp, f as CompiledHandler, g as BrickApp, h as deny, i as CorsOrigin, j as BrickIR, k as registerReferenceRoute, l as bindCompiledApplication, m as HandlerFactory, n as brick, o as requestLoggingPlugin, p as CompiledRoutePlan, r as CorsOptions, s as CompiledApplication, t as CreateServerOptions, u as compileBrickApplication, v as EndpointDefinition, w as DocumentationOptions, x as DashboardAuth, y as EndpointLogger } from "./chunks/server.js";
|
|
3
3
|
import { _ as GLOBAL_SYMBOL, a as BrickClientOptions, c as BrickTransportError, d as InferActionInput, f as InferActionOutput, g as ATTR, h as isBrickTransportError, i as BrickClientAction, l as InferActionErrorCodes, m as isBrickServerError, n as BrickCallOptions, o as BrickServerError, p as createBrickClient, r as BrickClient, s as BrickServices, t as BrickActionCaller, u as InferActionFailure, v as SPAN, y as kebabCase } from "./chunks/client.js";
|
|
4
4
|
import { StepErrorBuilder, defineError, stepErrors, stepFailure } from "./workflow.js";
|
|
@@ -762,5 +762,5 @@ export declare function createMcpHandler(options: McpHandlerOptions): (request:
|
|
|
762
762
|
interface ErrorEnvelope extends WireError {
|
|
763
763
|
requestId: string;
|
|
764
764
|
}
|
|
765
|
-
export { ATTR, Action, type ActionAccessInfo, ActionAccessPolicy, ActionConfig, ActionConfigWithAuthorize, ActionConfigWithoutAuthorize, ActionContext, ActionErrorDefinition, ActionExecutionError, type ActionRoute, ActionSchema, type ApiDocument, ArchitectureSchema, BaseActionConfig, BaseContext, type BrickActionCaller, type BrickApp, type BrickCallOptions, type BrickClient, type BrickClientAction, type BrickClientOptions, type BrickIR, BrickSQLiteDatabase, BrickServerError, type BrickServices, type BrickSocketConfig, type BrickSocketHandle, type BrickSocketSchema, type BrickSocketSender, BrickTransportError, type BunSQLiteDatabase, ChildChanges, Command, CommandChildren, CommandConfig, CommandDecision, CommandErrors, CommandRow, type CompiledApplication, type CompiledHandler, type CompiledRoute, type CompiledRoutePlan, type CorsOptions, type CorsOrigin, type CreateServerOptions, type CrudEventOperation, type CrudEventPayload, type DashboardAuth, type DashboardOptions, DatabaseDefinition, DatabaseHandle, DefaultServiceContext, type DepsOf, type DispatchOptions, Dispatcher, type DocumentationOptions, DuplicateNameError, type EndpointContext, type EndpointDefinition, type EndpointLogger, type EndpointMethod, EnvInput, ErrorBuilder, ErrorDetails, type ErrorEnvelope, type EventCatalog, type EventDelivery, type EventEnvelope, type EventListener, type EventRecorder, type EventRef, type EventRefs, type EventWorkflow, type EventsDefinition, type EventsHub, type EventsOptions, type EventsWorld, GLOBAL_SYMBOL, type HandlerFactory, type HostHooks, type HttpMethod, type InferActionErrorCodes, type InferActionFailure, type InferActionInput, type InferActionOutput, InferTableInsert, InferTableRow, type InstalledPlugin, type ListenerFailure, Logger, type McpHandlerOptions, type McpRegistry, type McpRegistryOptions, type McpToolDefinition, NarrowAuthorizedContext, type OpenApiDocument, type OpenApiGeneratorOptions, type OutboxCounts, type OutboxStatus, type OutboxTable, type PluginAppContext, type PluginContext, type PluginEndpointContext, type PluginFactory, type PluginHookArgs, type PluginHooks, type PluginInfo, type PluginInstallOptions, type PluginInstance, type PluginLifecycleContext, type PluginManifest, type PluginRouteMethod, type PluginRouteRegistrar, type PluginRouteScope, type PluginRoutes, type PluginServiceContext, type PluginSetupContext, type PluginTableBuilders, type Port, type Ports, PostgresDatabase, PostgresDatabaseConfig, PostgresDefinition, type PostgresOutboxTable, PreparationContribution, ProxyOptions, type RedisBrokerOptions, type ReferenceDocument, type ReferenceOptions, type RequestLoggingOptions, Resource, ResourceActionAccess, ResourceActionConfig, type ResourceActionInfo, ResourceActionInput, ResourceChild, ResourceConfig, ResourceIdentity, type ResourcePlugin, type ResourcePluginAPI, type ResourcePluginContext, type ResourcePluginTypes, ResourceTypeOptions, type RetryDecision, type RouteIR, type RouteMethod, SPAN, SQLiteDatabaseConfig, SQLiteDefinition, type SQLiteOutboxTable, type SecretOptions, SecretRef, type SecretSource, Service, type ServiceActionCaller, type ServiceClient, type ServiceEvents, ServiceOptions, type ServicePlugin, type ServicePluginContext, type ServiceRegistry, ServiceSchema, type SocketBroker, type SocketBrokerMessage, type SocketEmitArgs, type SocketEmitOptions, type SocketEventArgs, type SocketPayloads, type SocketReplay, type SocketSchemas, StandardErrorMap, type Static, type StepErrorBuilder, type TSchema, type Table, Tool, ToolAnnotations, ToolConfigWithAuthorize, ToolConfigWithoutAuthorize, ToolOptions, Type, Type as t, type UntypedServiceClient, ValidationError, ValidationErrorItem, type WorkflowEvent, type WorkflowsOptions, and, asc, bindCompiledApplication, blob, brick, compileBrickApplication, createBrickClient, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineDatabase, defineError, definePlugin, defineSecret, deny, desc, envSource, eq, foreignKey, getHostHooks, getTableColumns, getTableName, gt, gte, ilike, inArray, index, integer, is, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, kebabCase, like, listSecrets, loadCompiledBrickApp, lt, lte, ne, not, notInArray, or, outboxTable, overrideSecret, port, primaryKey, real, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, resetSecrets, resolveSecrets, scalarDocsHTML, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, text, uniqueIndex, useDeps };
|
|
765
|
+
export { ATTR, Action, type ActionAccessInfo, ActionAccessPolicy, ActionConfig, ActionConfigWithAuthorize, ActionConfigWithoutAuthorize, ActionContext, ActionErrorDefinition, ActionExecutionError, type ActionRoute, ActionSchema, type ApiDocument, ArchitectureSchema, BaseActionConfig, BaseContext, type BrickActionCaller, type BrickApp, type BrickCallOptions, type BrickClient, type BrickClientAction, type BrickClientOptions, type BrickIR, BrickSQLiteDatabase, BrickServerError, type BrickServices, type BrickSocketConfig, type BrickSocketHandle, type BrickSocketSchema, type BrickSocketSender, BrickTransportError, type BunSQLiteDatabase, ChildChanges, Command, CommandChildren, CommandConfig, CommandDecision, CommandErrors, CommandRow, type CompiledApplication, type CompiledHandler, type CompiledRoute, type CompiledRoutePlan, type CorsOptions, type CorsOrigin, type CreateServerOptions, type CrudEventOperation, type CrudEventPayload, type DashboardAuth, type DashboardOptions, DatabaseDefinition, DatabaseHandle, DefaultServiceContext, type DepsOf, type DispatchOptions, Dispatcher, type DocumentationOptions, DuplicateNameError, type EndpointContext, type EndpointDefinition, type EndpointLogger, type EndpointMethod, EnvInput, ErrorBuilder, ErrorDetails, type ErrorEnvelope, type EventCatalog, type EventDelivery, type EventEnvelope, type EventListener, type EventRecorder, type EventRef, type EventRefs, type EventWorkflow, type EventsDefinition, type EventsHub, type EventsOptions, type EventsWorld, GLOBAL_SYMBOL, type HandlerFactory, type HostHooks, type HttpMethod, type InferActionErrorCodes, type InferActionFailure, type InferActionInput, type InferActionOutput, InferTableInsert, InferTableRow, type InstalledPlugin, type ListenerFailure, Logger, type McpHandlerOptions, type McpRegistry, type McpRegistryOptions, type McpToolDefinition, NarrowAuthorizedContext, type OpenApiDocument, type OpenApiGeneratorOptions, type OutboxCounts, type OutboxStatus, type OutboxTable, type PluginAppContext, type PluginContext, type PluginEndpointContext, type PluginFactory, type PluginHookArgs, type PluginHooks, type PluginInfo, type PluginInstallOptions, type PluginInstance, type PluginLifecycleContext, type PluginManifest, type PluginRouteMethod, type PluginRouteRegistrar, type PluginRouteScope, type PluginRoutes, type PluginServiceContext, type PluginSetupContext, type PluginTableBuilders, type Port, type Ports, PostgresDatabase, PostgresDatabaseConfig, PostgresDefinition, type PostgresOutboxTable, type PostgresScheduleTable, PreparationContribution, ProxyOptions, type RedisBrokerOptions, type ReferenceDocument, type ReferenceOptions, type RequestLoggingOptions, Resource, ResourceActionAccess, ResourceActionConfig, type ResourceActionInfo, ResourceActionInput, ResourceChild, ResourceConfig, ResourceIdentity, type ResourcePlugin, type ResourcePluginAPI, type ResourcePluginContext, type ResourcePluginTypes, ResourceTypeOptions, type RetryDecision, type RouteIR, type RouteMethod, SPAN, SQLiteDatabaseConfig, SQLiteDefinition, type SQLiteOutboxTable, type SQLiteScheduleTable, type Schedule, type ScheduleConfig, type ScheduleControl, type ScheduleRun, type ScheduleRunRecord, type ScheduleState, type ScheduleTable, type ScheduleWorkflow, type ScheduleWorkflowRun, type SecretOptions, SecretRef, type SecretSource, Service, type ServiceActionCaller, type ServiceClient, type ServiceEvents, ServiceOptions, type ServicePlugin, type ServicePluginContext, type ServiceRegistry, ServiceSchema, type SocketBroker, type SocketBrokerMessage, type SocketEmitArgs, type SocketEmitOptions, type SocketEventArgs, type SocketPayloads, type SocketReplay, type SocketSchemas, StandardErrorMap, type Static, type StepErrorBuilder, type TSchema, type Table, Tool, ToolAnnotations, ToolConfigWithAuthorize, ToolConfigWithoutAuthorize, ToolOptions, Type, Type as t, type UntypedServiceClient, ValidationError, ValidationErrorItem, type WorkflowEvent, type WorkflowsOptions, and, asc, bindCompiledApplication, blob, brick, compileBrickApplication, createBrickClient, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineDatabase, defineError, definePlugin, defineSchedule, defineSecret, deny, desc, envSource, eq, foreignKey, getHostHooks, getTableColumns, getTableName, gt, gte, ilike, inArray, index, integer, is, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, kebabCase, like, listSecrets, loadCompiledBrickApp, lt, lte, ne, not, notInArray, or, outboxTable, overrideSecret, port, primaryKey, real, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, resetSecrets, resolveSecrets, scalarDocsHTML, scheduleTable, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, text, uniqueIndex, useDeps };
|
|
766
766
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as segmentClaimant, A as WORKFLOW_BUNDLE, B as requireBrickApp, C as getActionAccess, D as bindCompiledApplication, E as resetGlobalRegistry, F as crudEventName, G as port, H as claimName, I as crudEventSource, J as defineServicePlugin, K as useDeps, L as eventRefs, M as defineListener, N as checkEvent, O as compileBrickApplication, P as checkPayload, Q as isInstallingPlugin, R as isCrudEvent, S as generateOpenApiSpec, T as getGlobalRegistry, U as definitionSite, V as createActionHandler, W as INTERNALS, X as hasPlugin, Y as getPluginEndpoints, Z as installPlugin, _ as envSource, a as defineSchedule, at as deny, b as resetSecrets, c as runInTransaction, ct as Type, d as referencePlugin, dt as traceRoute, et as validateName, f as registerReferenceRoute, ft as withCallSpan, g as defineSecret, h as SecretRef, i as stopAllEvents, it as errorsOf, j as resolveWorkflowPaths, k as loadCompiledBrickApp, l as isOutboxTable, lt as t, m as requestLoggingPlugin, mt as PLUGIN_KIND, n as defineServiceSocket, nt as buildErrorHelpers, o as Dispatcher, ot as baseContext, p as scalarDocsHTML, pt as PLUGIN_COMMIT, q as defineResourcePlugin, r as recordingServices, rt as defineAction, s as onTransactionCommit, st as pickContextEnvelope, t as brick, tt as portOf, u as outboxTable, ut as validateWithSchema, v as listSecrets, w as setActionAccess, x as resolveSecrets, y as overrideSecret, z as isBrickApp } from "./chunks/server.js";
|
|
2
2
|
import { G as DuplicateNameError, H as GLOBAL_SYMBOL, K as ValidationError, S as actionMeta, U as SPAN, V as ATTR, W as ActionExecutionError, a as isBrickTransportError, d as getActionRoute, f as getPluginActionRoute, i as isBrickServerError, j as compareSocketSeq, l as actionOwners, n as BrickTransportError, r as createBrickClient, s as serializeSocketSchema, t as BrickServerError, x as kebabCase } from "./chunks/client.js";
|
|
3
3
|
import { defineError, stepErrors, stepFailure } from "./workflow.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1057,6 +1057,50 @@ function defineResource(service, config) {
|
|
|
1057
1057
|
};
|
|
1058
1058
|
return resource;
|
|
1059
1059
|
}
|
|
1060
|
+
// src/schedules/table.ts
|
|
1061
|
+
const SCHEDULES = Symbol.for("brick.schedules");
|
|
1062
|
+
function sqliteSchedules(name) {
|
|
1063
|
+
const at = (column) => integer$1(column, { mode: "timestamp_ms" });
|
|
1064
|
+
return sqliteTable$1(name, {
|
|
1065
|
+
name: text$1("name").primaryKey(),
|
|
1066
|
+
spec: text$1("spec").notNull(),
|
|
1067
|
+
slot: at("slot").notNull(),
|
|
1068
|
+
nextAt: at("next_at").notNull(),
|
|
1069
|
+
attempts: integer$1("attempts").notNull().default(0),
|
|
1070
|
+
trigger: text$1("trigger").$type().notNull(),
|
|
1071
|
+
runId: text$1("run_id"),
|
|
1072
|
+
startedAt: at("started_at"),
|
|
1073
|
+
leaseUntil: at("lease_until"),
|
|
1074
|
+
lastSuccessAt: at("last_success_at"),
|
|
1075
|
+
runs: text$1("runs", { mode: "json" }).$type().notNull()
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
function postgresSchedules(name) {
|
|
1079
|
+
const at = (column) => timestamp(column, { withTimezone: true });
|
|
1080
|
+
return pgTable(name, {
|
|
1081
|
+
name: text$2("name").primaryKey(),
|
|
1082
|
+
spec: text$2("spec").notNull(),
|
|
1083
|
+
slot: at("slot").notNull(),
|
|
1084
|
+
nextAt: at("next_at").notNull(),
|
|
1085
|
+
attempts: integer$2("attempts").notNull().default(0),
|
|
1086
|
+
trigger: text$2("trigger").$type().notNull(),
|
|
1087
|
+
runId: text$2("run_id"),
|
|
1088
|
+
startedAt: at("started_at"),
|
|
1089
|
+
leaseUntil: at("lease_until"),
|
|
1090
|
+
lastSuccessAt: at("last_success_at"),
|
|
1091
|
+
runs: jsonb("runs").$type().notNull()
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
function scheduleTable(engine, options = {}) {
|
|
1095
|
+
const name = options.name ?? "brick_schedules";
|
|
1096
|
+
const table = engine === "sqlite" ? sqliteSchedules(name) : postgresSchedules(name);
|
|
1097
|
+
Object.defineProperty(table, SCHEDULES, { value: { engine } });
|
|
1098
|
+
return table;
|
|
1099
|
+
}
|
|
1100
|
+
/** Whether a value is a table made by `scheduleTable`. */
|
|
1101
|
+
function isScheduleTable(value) {
|
|
1102
|
+
return typeof value === "object" && value !== null && SCHEDULES in value;
|
|
1103
|
+
}
|
|
1060
1104
|
// src/service.ts
|
|
1061
1105
|
const RESOLVED_SYMBOL = Symbol("resolved");
|
|
1062
1106
|
/** The deps a resolved context was resolved with, to restore them when a plugin's copy comes back. */
|
|
@@ -1240,6 +1284,9 @@ var ServiceImpl = class {
|
|
|
1240
1284
|
getOutbox() {
|
|
1241
1285
|
return Object.values(this.database?.tables ?? {}).find(isOutboxTable);
|
|
1242
1286
|
}
|
|
1287
|
+
getScheduleTable() {
|
|
1288
|
+
return Object.values(this.database?.tables ?? {}).find(isScheduleTable);
|
|
1289
|
+
}
|
|
1243
1290
|
setRecorder(recorder) {
|
|
1244
1291
|
this.recorder = recorder;
|
|
1245
1292
|
}
|
|
@@ -1816,6 +1863,6 @@ function createMcpHandler(options) {
|
|
|
1816
1863
|
}
|
|
1817
1864
|
};
|
|
1818
1865
|
}
|
|
1819
|
-
export { ATTR, ActionExecutionError, BrickServerError, BrickTransportError, Dispatcher, DuplicateNameError, GLOBAL_SYMBOL, SPAN, SecretRef, Table, Type, UnknownToolError, ValidationError, WORKFLOW_BUNDLE, actionOwners, and, asc, attachDatabase, bindCompiledApplication, blob, brick, buildErrorHelpers, buildFtsMatchQuery, columnValue, compileBrickApplication, createActionHandler, createBrickClient, createMcpHandler, createMcpRegistry, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineAction, defineDatabase, defineError, defineListener, definePlugin, defineResource, defineResourcePlugin, defineSecret, defineService, defineServicePlugin, defineTool, deny, desc, drizzleSchema, emitEvent, ensureResourceIndexes, ensureSQLiteFts, envSource, eq, errorsOf, foreignKey, generateOpenApiSpec, generateSQLiteIndexDdl, generateSQLiteTableDdl, getActionAccess, getActionRoute, getGlobalRegistry, getHostHooks, getPluginActionRoute, getPluginEndpoints, getTableColumns, getTableName, gt, gte, idSchema, ilike, inArray, index, integer, is, isBrickApp, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, isTool, kebabCase, like, listSecrets, loadCompiledBrickApp, loadRecord, lt, lte, migrateDatabase, ne, not, notInArray, onTransactionCommit, or, outboxTable, overrideSecret, port, primaryKey, real, redisBroker, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, requireBrickApp, resetGlobalRegistry, resetSecrets, resolveSecrets, resolveWorkflowPaths, runInTransaction, scalarDocsHTML, serializeSocketSchema, setActionAccess, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, syncSchema, t, text, traceRoute, uniqueIndex, useDeps, useService, validateWithSchema };
|
|
1866
|
+
export { ATTR, ActionExecutionError, BrickServerError, BrickTransportError, Dispatcher, DuplicateNameError, GLOBAL_SYMBOL, SPAN, SecretRef, Table, Type, UnknownToolError, ValidationError, WORKFLOW_BUNDLE, actionOwners, and, asc, attachDatabase, bindCompiledApplication, blob, brick, buildErrorHelpers, buildFtsMatchQuery, columnValue, compileBrickApplication, createActionHandler, createBrickClient, createMcpHandler, createMcpRegistry, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineAction, defineDatabase, defineError, defineListener, definePlugin, defineResource, defineResourcePlugin, defineSchedule, defineSecret, defineService, defineServicePlugin, defineTool, deny, desc, drizzleSchema, emitEvent, ensureResourceIndexes, ensureSQLiteFts, envSource, eq, errorsOf, foreignKey, generateOpenApiSpec, generateSQLiteIndexDdl, generateSQLiteTableDdl, getActionAccess, getActionRoute, getGlobalRegistry, getHostHooks, getPluginActionRoute, getPluginEndpoints, getTableColumns, getTableName, gt, gte, idSchema, ilike, inArray, index, integer, is, isBrickApp, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, isTool, kebabCase, like, listSecrets, loadCompiledBrickApp, loadRecord, lt, lte, migrateDatabase, ne, not, notInArray, onTransactionCommit, or, outboxTable, overrideSecret, port, primaryKey, real, redisBroker, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, requireBrickApp, resetGlobalRegistry, resetSecrets, resolveSecrets, resolveWorkflowPaths, runInTransaction, scalarDocsHTML, scheduleTable, serializeSocketSchema, setActionAccess, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, syncSchema, t, text, traceRoute, uniqueIndex, useDeps, useService, validateWithSchema };
|
|
1820
1867
|
|
|
1821
1868
|
//# sourceMappingURL=index.js.map
|