Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+7
-4
@@ -5,9 +5,8 @@ import {
|
||||
BULK_REINDEX_SUPPORTED_INDEX_NAMES,
|
||||
crmContactsIndex,
|
||||
kbArticlesIndex,
|
||||
rowsIndex,
|
||||
usersIndex,
|
||||
} from "@toolctrl/search";
|
||||
} from "@hivegrid/search";
|
||||
import { enqueueReindexEvents, selectIndexes, selectTenants } from "./reindex.js";
|
||||
|
||||
describe("selectIndexes", () => {
|
||||
@@ -20,7 +19,6 @@ describe("selectIndexes", () => {
|
||||
it("returns the matching schema when a known name is passed", () => {
|
||||
expect(selectIndexes("kb-articles")).toEqual([kbArticlesIndex]);
|
||||
expect(selectIndexes("crm-contacts")).toEqual([crmContactsIndex]);
|
||||
expect(selectIndexes("rows")).toEqual([rowsIndex]);
|
||||
expect(selectIndexes("users")).toEqual([usersIndex]);
|
||||
});
|
||||
|
||||
@@ -29,7 +27,12 @@ describe("selectIndexes", () => {
|
||||
(name) => !(BULK_REINDEX_SUPPORTED_INDEX_NAMES as readonly string[]).includes(name)
|
||||
);
|
||||
|
||||
expect(unsupportedCatalogNames).toEqual(["entities"]);
|
||||
// `files`, `tasks`, `hr-directory` and `hr-locations` are cataloged in
|
||||
// ALL_SEARCH_INDEXES but intentionally have no bulk-reindex pager (not in
|
||||
// BULK_REINDEX_SUPPORTED_INDEX_NAMES), so they must reject in selectIndexes.
|
||||
// HR (P17 — AK-P17a) follows the same per-event-only pattern as `tasks`; a
|
||||
// bulk-reindex pager for HR would be follow-up work.
|
||||
expect(unsupportedCatalogNames).toEqual(["files", "tasks", "hr-directory", "hr-locations"]);
|
||||
for (const name of unsupportedCatalogNames) {
|
||||
expect(() => selectIndexes(name)).toThrow(/Unsupported search reindex target/);
|
||||
}
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
|
||||
import { defineCommand } from "citty";
|
||||
import consola from "consola";
|
||||
import { BULK_REINDEX_SUPPORTED_INDEXES, BULK_REINDEX_SUPPORTED_INDEX_NAMES, searchEventType, type SearchIndexSchema } from "@toolctrl/search";
|
||||
import { BULK_REINDEX_SUPPORTED_INDEXES, BULK_REINDEX_SUPPORTED_INDEX_NAMES, searchEventType, type SearchIndexSchema } from "@hivegrid/search";
|
||||
|
||||
export interface ReindexEnqueueResult {
|
||||
readonly indexName: string;
|
||||
@@ -85,7 +85,7 @@ export const searchReindexCommand = defineCommand({
|
||||
// Lazy-load the Prisma-backed publish so the CLI binary does not pull
|
||||
// in @prisma/client at import time. Imports happen here, inside the
|
||||
// run handler, after argument parsing.
|
||||
const [{ getDbClient }, dbOutbox] = await Promise.all([import("@toolctrl/db/client.server"), import("@toolctrl/db/outbox")]);
|
||||
const [{ getDbClient }, dbOutbox] = await Promise.all([import("@hivegrid/db/client.server"), import("@hivegrid/db/outbox")]);
|
||||
const prisma = getDbClient();
|
||||
const tenantIds = await resolveTenantIds(prisma, tenantArg);
|
||||
if (tenantIds.length === 0) {
|
||||
|
||||
Reference in new issue
Block a user