Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -1,7 +1,7 @@
import { LoaderFunctionArgs } from "react-router";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { t as i18nT } from "i18next";
import { featureKeys } from "@toolctrl/entitlements";
import { featureKeys } from "@hivegrid/entitlements";
import { requireTenantProductAccess } from "~/utils/entitlements/.server/productAccess.server";
export namespace WorkflowEngineApi {
@@ -1,5 +1,5 @@
import { LoaderFunctionArgs, redirect } from "react-router";
import { loadWebConfig } from "@toolctrl/config";
import { loadWebConfig } from "@hivegrid/config";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { WorkflowDto } from "~/modules/workflowEngine/dtos/WorkflowDto";
import { WorkflowExecutionDto } from "~/modules/workflowEngine/dtos/WorkflowExecutionDto";
@@ -1,5 +1,5 @@
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import { loadWebConfig } from "@toolctrl/config";
import { loadWebConfig } from "@hivegrid/config";
import { WorkflowDto } from "~/modules/workflowEngine/dtos/WorkflowDto";
import WorkflowsService from "~/modules/workflowEngine/services/WorkflowsService";
import { getTenantIdOrNull } from "~/utils/services/.server/urlService";
@@ -1,5 +1,5 @@
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import { loadWebConfig } from "@toolctrl/config";
import { loadWebConfig } from "@hivegrid/config";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { WorkflowDto } from "~/modules/workflowEngine/dtos/WorkflowDto";
import { WorkflowExecutionDto } from "~/modules/workflowEngine/dtos/WorkflowExecutionDto";
@@ -1,5 +1,5 @@
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import { loadWebConfig } from "@toolctrl/config";
import { loadWebConfig } from "@hivegrid/config";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { WorkflowDto } from "~/modules/workflowEngine/dtos/WorkflowDto";
import { WorkflowExecutionDto } from "~/modules/workflowEngine/dtos/WorkflowExecutionDto";
@@ -14,7 +14,7 @@ const mocks = vi.hoisted(() => ({
continueExecution: vi.fn(),
}));
vi.mock("@toolctrl/config", () => ({
vi.mock("@hivegrid/config", () => ({
loadWebConfig: () => ({ config: { appName: "Test App" } }),
}));
@@ -1,5 +1,5 @@
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import { loadWebConfig } from "@toolctrl/config";
import { loadWebConfig } from "@hivegrid/config";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { WorkflowDto } from "~/modules/workflowEngine/dtos/WorkflowDto";
import WorkflowsExecutionsService from "~/modules/workflowEngine/services/WorkflowsExecutionsService";
@@ -1,4 +1,4 @@
import { WorkflowCredential } from "@toolctrl/db/prisma-browser";
import { WorkflowCredential } from "@hivegrid/db/prisma-browser";
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { deleteWorkflowCredential, getAllWorkflowCredentials } from "~/modules/workflowEngine/db/workflowCredentials.db.server";
@@ -1,4 +1,4 @@
import { WorkflowCredential } from "@toolctrl/db/prisma-browser";
import { WorkflowCredential } from "@hivegrid/db/prisma-browser";
import { t as i18nT } from "i18next";
import { MetaFunction, useLoaderData } from "react-router";
import { Outlet, useSubmit } from "react-router";
@@ -1,4 +1,4 @@
import { WorkflowVariable } from "@toolctrl/db/prisma-browser";
import { WorkflowVariable } from "@hivegrid/db/prisma-browser";
import { LoaderFunctionArgs } from "react-router";
import { MetaTagsDto } from "~/application/dtos/seo/MetaTagsDto";
import { getAllWorkflowVariables } from "~/modules/workflowEngine/db/workflowVariable.db.server";
@@ -1,4 +1,4 @@
import { WorkflowVariable } from "@toolctrl/db/prisma-browser";
import { WorkflowVariable } from "@hivegrid/db/prisma-browser";
import { ActionFunctionArgs, LoaderFunctionArgs, redirect } from "react-router";
import UrlUtils from "~/utils/app/UrlUtils";
import { deleteWorkflowVariable, getWorkflowVariableById, updateWorkflowVariable } from "~/modules/workflowEngine/db/workflowVariable.db.server";
@@ -502,8 +502,6 @@ describe("workflow producer inventory", () => {
it("publishes application events through the workflow outbox producer", () => {
const eventsServiceSource = readSource(path.join(appRoot, "modules/events/services/.server/EventsService.ts"));
const rowsApiSource = readSource(path.join(appRoot, "utils/api/.server/RowsApi.ts"));
const rowsEditSource = readSource(path.join(appRoot, "modules/rows/routes/Rows_Edit.server.ts"));
expect(eventsServiceSource).toContain("buildWorkflowTriggerOutboxEvent");
expect(eventsServiceSource).toContain("sourceId: item.id");
@@ -511,34 +509,23 @@ describe("workflow producer inventory", () => {
expect(eventsServiceSource.indexOf("const item = await tx.event.create")).toBeLessThan(
eventsServiceSource.indexOf("await publishOutboxEvent(tx, buildWorkflowTriggerOutboxEvent")
);
expect(rowsApiSource).toContain("EventsService.createInTransaction");
expect(rowsApiSource).toContain("EventsService.dispatchPostCommitSideEffects");
expect(rowsApiSource.indexOf("EventsService.createInTransaction")).toBeLessThan(rowsApiSource.indexOf("EventsService.dispatchPostCommitSideEffects"));
expect(rowsApiSource).toContain('event: "row.created"');
expect(rowsApiSource).toContain('event: "row.updated"');
expect(rowsApiSource).toContain('event: "row.deleted"');
expect(rowsEditSource).not.toContain('event: "row.updated"');
expect(rowsEditSource).not.toContain('event: "row.deleted"');
});
it("keeps the workflow outbox documentation honest about row producer coverage", () => {
it("keeps the workflow outbox documentation honest after the entity-builder removal", () => {
const outboxDoc = readSource(path.join(repoRoot, "docs/architecture/outbox-pattern.md"));
const workerQueuesDoc = readSource(path.join(repoRoot, "docs/ops/worker-queues.md"));
const rowsApiSource = readSource(path.join(repoRoot, "apps/web/app/utils/api/.server/RowsApi.ts"));
const workflowBlockSource = readSource(path.join(repoRoot, "apps/web/app/modules/workflowEngine/services/blocks/WorkflowBlockProService.ts"));
expect(outboxDoc).toContain("row.created");
expect(outboxDoc).toContain("row.updated");
expect(outboxDoc).toContain("row.deleted");
expect(outboxDoc).toMatch(/`row\.created`, `row\.updated`, and `row\.deleted`/u);
expect(outboxDoc).toMatch(/in the same transaction/u);
expect(outboxDoc).toContain("Workflow row blocks pass a `workflow` event context");
// R-P6B-β (AD-2): the generic entity-builder row.* outbox producers (RowsApi)
// were removed; workflow row blocks address typed models through the typed
// model registry. The docs must say so, not advertise the deleted producers.
expect(outboxDoc).toContain("removed with the entity-builder");
expect(outboxDoc).toContain("the typed model registry");
expect(outboxDoc).toContain("`row.*` outbox events");
expect(workerQueuesDoc).toContain("only the signed internal trigger bridge may");
expect(workerQueuesDoc).toMatch(/`row\.created`, `row\.updated`,\s+and `row\.deleted` route-backed and workflow-context producers/u);
expect(rowsApiSource).toContain("type RowEventContext =");
expect(rowsApiSource).toContain('source: "request" | "workflow"');
expect(rowsApiSource).toContain("shouldCreateRowEvent(options, request, eventContext)");
expect(workflowBlockSource.match(/eventContext: \{ source: "workflow" \}/gu)).toHaveLength(3);
expect(workerQueuesDoc).toContain("removed with the entity-builder");
expect(workflowBlockSource).not.toContain('eventContext: { source: "workflow" }');
expect(workflowBlockSource).toContain("typed-model-registry");
});
it("does not reintroduce the legacy direct trigger facade", () => {
@@ -1,5 +1,5 @@
import type { Params } from "react-router";
import { featureKeys } from "@toolctrl/entitlements";
import { featureKeys } from "@hivegrid/entitlements";
import { requireTenantProductAccess } from "~/utils/entitlements/.server/productAccess.server";
import { requireSuperAdmin, requireSuperUserOrAdmin } from "~/utils/loaders.middleware";