bazis 0.124.0 → 0.124.1
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/core/app/ui/uiSurfaceHttp.ts +2 -0
- package/core/http/Routing/RouterBuilder.ts +2 -1
- package/core/http/Routing/contextOnlyControllers.ts +16 -0
- package/core/infra/connectors/codex/CodexAppServerClient.ts +1 -1
- package/core/workflow/definitions_module/http/Processes.controller.ts +2 -0
- package/core/workflow/runtime_module/http/Instances.controller.ts +2 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contextOnlyController } from "../../http/Routing/contextOnlyControllers";
|
|
1
2
|
import {
|
|
2
3
|
Controller,
|
|
3
4
|
ForbiddenError,
|
|
@@ -183,6 +184,7 @@ export class UiSurfaceHttpController {
|
|
|
183
184
|
return versionedJson(ctx, document, document.metadata.revision);
|
|
184
185
|
}
|
|
185
186
|
}
|
|
187
|
+
contextOnlyController(UiSurfaceHttpController);
|
|
186
188
|
|
|
187
189
|
function validateSurfaceRegistration(
|
|
188
190
|
options: RunAppUiSurfaceOptions,
|
|
@@ -2,6 +2,7 @@ import type { Class, Token } from "../../di";
|
|
|
2
2
|
import { assertConsumes, bindArguments } from "../Binding/ParameterBinder";
|
|
3
3
|
import { resolveGeneratedBindings } from "../Binding/autoBindings";
|
|
4
4
|
import { generatedSourcesAreStale } from "../../generatedFingerprint";
|
|
5
|
+
import { isContextOnlyController } from "./contextOnlyControllers";
|
|
5
6
|
import { controllerMetaOf, type ActionMeta, type ControllerMeta } from "../Decorators/metadata";
|
|
6
7
|
import { HttpSetupError } from "../Errors/HttpError";
|
|
7
8
|
import type { HttpContext } from "../HttpContext/HttpContext";
|
|
@@ -237,7 +238,7 @@ function assertBindingsFresh(
|
|
|
237
238
|
methodName: string | symbol,
|
|
238
239
|
bindings: readonly unknown[] | undefined,
|
|
239
240
|
): void {
|
|
240
|
-
if (bindings !== undefined || !generatedSourcesAreStale()) {
|
|
241
|
+
if (bindings !== undefined || isContextOnlyController(controllerClass) || !generatedSourcesAreStale()) {
|
|
241
242
|
return;
|
|
242
243
|
}
|
|
243
244
|
const method = (controllerClass.prototype as Record<string | symbol, unknown>)[methodName];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const contextOnly = new WeakSet<object>();
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @internal Marks a framework controller whose actions read the `HttpContext`
|
|
5
|
+
* themselves. The application's codegen never covers framework classes, so a
|
|
6
|
+
* stale application codegen says nothing about them and must not stop the start.
|
|
7
|
+
*/
|
|
8
|
+
export function contextOnlyController<T extends object>(controller: T): T {
|
|
9
|
+
contextOnly.add(controller);
|
|
10
|
+
return controller;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export function isContextOnlyController(controller: object): boolean {
|
|
15
|
+
return contextOnly.has(controller);
|
|
16
|
+
}
|
|
@@ -232,7 +232,7 @@ export class CodexAppServerClient implements CodexClient {
|
|
|
232
232
|
if (method === "account/updated") this.modelCache = undefined;
|
|
233
233
|
}, () => { this.clearLogin(); this.modelCache = undefined; });
|
|
234
234
|
const initialized = await client.request("initialize", {
|
|
235
|
-
clientInfo: { name: "bazis", title: "Bazis", version: "0.124.
|
|
235
|
+
clientInfo: { name: "bazis", title: "Bazis", version: "0.124.1" }, capabilities: { experimentalApi: true },
|
|
236
236
|
}, 15_000, signal);
|
|
237
237
|
if (resolve(text(initialized.codexHome, 4096)) !== this.paths.home) throw new CodexError("PROTOCOL_ERROR");
|
|
238
238
|
client.notify("initialized");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contextOnlyController } from "../../../http/Routing/contextOnlyControllers";
|
|
1
2
|
import { Controller, Created, Get, Patch, Post, Put, type HttpContext } from "../../../http";
|
|
2
3
|
import { authorize, body, optionalInteger, optionalString, pagingQuery, param, requiredString } from "../../internal/http";
|
|
3
4
|
import { WorkflowError } from "../../contracts/WorkflowError";
|
|
@@ -90,3 +91,4 @@ export class ProcessesController {
|
|
|
90
91
|
return { data: this.definitions.tools() };
|
|
91
92
|
}
|
|
92
93
|
}
|
|
94
|
+
contextOnlyController(ProcessesController);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contextOnlyController } from "../../../http/Routing/contextOnlyControllers";
|
|
1
2
|
import { Controller, Created, Get, Post, type HttpContext } from "../../../http";
|
|
2
3
|
import { WorkflowError } from "../../contracts/WorkflowError";
|
|
3
4
|
import { authorize, body, optionalString, pagingQuery, param, requiredString } from "../../internal/http";
|
|
@@ -69,4 +70,5 @@ export class InstancesController {
|
|
|
69
70
|
return await this.runtime.retry(instance.id, { actor });
|
|
70
71
|
}
|
|
71
72
|
}
|
|
73
|
+
contextOnlyController(InstancesController);
|
|
72
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bazis",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.1",
|
|
4
4
|
"description": "Modular backend framework for Bun in TypeScript: DI wired by codegen, HTTP, a PostgreSQL ORM, JWT, WebSocket, agents and a CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alexander Alenin",
|