chore: full technical rename planarchy → capakraken
Complete rename of all technical identifiers across the codebase: Package names (11 packages): - @planarchy/* → @capakraken/* in all package.json, tsconfig, imports Import statements: 277 files, 548 occurrences replaced Database & Docker: - PostgreSQL user/db: planarchy → capakraken - Docker volumes: planarchy_pgdata → capakraken_pgdata - Connection strings updated in docker-compose, .env, CI CI/CD: - GitHub Actions workflow: all filter commands updated - Test database credentials updated Infrastructure: - Redis channel: planarchy:sse → capakraken:sse - Logger service name: planarchy-api → capakraken-api - Anonymization seed updated - Start/stop/restart scripts updated Test data: - Seed emails: @planarchy.dev → @capakraken.dev - E2E test credentials: all 11 spec files updated - Email defaults: @planarchy.app → @capakraken.app - localStorage keys: planarchy_* → capakraken_* Documentation: 30+ .md files updated Verification: - pnpm install: workspace resolution works - TypeScript: only pre-existing TS2589 (no new errors) - Engine: 310/310 tests pass - Staffing: 37/37 tests pass Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus, SystemRole } from "@planarchy/shared";
|
||||
import { AllocationStatus, SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { allocationRouter } from "../router/allocation.js";
|
||||
import { emitAllocationCreated, emitAllocationDeleted } from "../sse/event-bus.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlueprintTarget, FieldType, type BlueprintFieldDefinition } from "@planarchy/shared";
|
||||
import { BlueprintTarget, FieldType, type BlueprintFieldDefinition } from "@capakraken/shared";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { assertBlueprintDynamicFields } from "../router/blueprint-validation.js";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@planarchy/application")>();
|
||||
vi.mock("@capakraken/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
||||
return {
|
||||
...actual,
|
||||
isChargeabilityActualBooking: actual.isChargeabilityActualBooking,
|
||||
@@ -10,7 +10,7 @@ vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
import { listAssignmentBookings } from "@planarchy/application";
|
||||
import { listAssignmentBookings } from "@capakraken/application";
|
||||
import { chargeabilityReportRouter } from "../router/chargeability-report.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldType } from "@planarchy/shared";
|
||||
import { FieldType } from "@capakraken/shared";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildDynamicFieldWhereClauses } from "../router/custom-field-filters.js";
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@planarchy/application")>();
|
||||
vi.mock("@capakraken/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
||||
return {
|
||||
...actual,
|
||||
getDashboardOverview: vi.fn(),
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
getDashboardDemand,
|
||||
getDashboardTopValueResources,
|
||||
getDashboardChargeabilityOverview,
|
||||
} from "@planarchy/application";
|
||||
} from "@capakraken/application";
|
||||
import { dashboardRouter } from "../router/dashboard.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { effortRuleRouter } from "../router/effort-rule.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
// Mock the engine — we focus on the router/DB layer, not the pure engine logic
|
||||
vi.mock("@planarchy/engine", () => ({
|
||||
vi.mock("@capakraken/engine", () => ({
|
||||
expandScopeToEffort: vi.fn().mockReturnValue({
|
||||
lines: [
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { entitlementRouter } from "../router/entitlement.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
// Mock @planarchy/db to provide the enums used in the router
|
||||
vi.mock("@planarchy/db", () => ({
|
||||
// Mock @capakraken/db to provide the enums used in the router
|
||||
vi.mock("@capakraken/db", () => ({
|
||||
VacationType: { ANNUAL: "ANNUAL", SICK: "SICK", OTHER: "OTHER", PUBLIC_HOLIDAY: "PUBLIC_HOLIDAY" },
|
||||
VacationStatus: { APPROVED: "APPROVED", PENDING: "PENDING", REJECTED: "REJECTED" },
|
||||
}));
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
EstimateStatus,
|
||||
EstimateVersionStatus,
|
||||
SystemRole,
|
||||
} from "@planarchy/shared";
|
||||
} from "@capakraken/shared";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { estimateRouter } from "../router/estimate.js";
|
||||
@@ -302,7 +302,7 @@ describe("estimate router", () => {
|
||||
const updated = { ...baseEstimate, name: "Updated Name" };
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
// The router delegates to @planarchy/application updateEstimateDraft.
|
||||
// The router delegates to @capakraken/application updateEstimateDraft.
|
||||
// The application function calls db.estimate.findUnique and then
|
||||
// db.estimateVersion.update (among others). We mock the DB calls
|
||||
// that the application layer uses under the hood.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SSE_EVENT_TYPES } from "@planarchy/shared";
|
||||
import { SSE_EVENT_TYPES } from "@capakraken/shared";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
cancelPendingEvents,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { experienceMultiplierRouter } from "../router/experience-multiplier.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
// Mock the engine — we focus on the router/DB layer, not the pure engine logic
|
||||
vi.mock("@planarchy/engine", () => ({
|
||||
vi.mock("@capakraken/engine", () => ({
|
||||
applyExperienceMultipliers: vi.fn().mockReturnValue({
|
||||
adjustedCostRateCents: 12000,
|
||||
adjustedBillRateCents: 18000,
|
||||
@@ -413,7 +413,7 @@ describe("experienceMultiplier.preview", () => {
|
||||
|
||||
it("reports no changes when rates are unchanged", async () => {
|
||||
// Import the mock to override for this test
|
||||
const { applyExperienceMultipliers } = await import("@planarchy/engine");
|
||||
const { applyExperienceMultipliers } = await import("@capakraken/engine");
|
||||
const mockFn = applyExperienceMultipliers as ReturnType<typeof vi.fn>;
|
||||
mockFn.mockReturnValueOnce({
|
||||
adjustedCostRateCents: 10000,
|
||||
@@ -505,7 +505,7 @@ describe("experienceMultiplier.applyRules", () => {
|
||||
});
|
||||
|
||||
it("skips unchanged lines (no update call)", async () => {
|
||||
const { applyExperienceMultipliersBatch } = await import("@planarchy/engine");
|
||||
const { applyExperienceMultipliersBatch } = await import("@capakraken/engine");
|
||||
const mockFn = applyExperienceMultipliersBatch as ReturnType<typeof vi.fn>;
|
||||
mockFn.mockReturnValueOnce({
|
||||
results: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { notificationRouter } from "../router/notification.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@planarchy/shared";
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { loadProjectPlanningReadModel } from "../router/project-planning-read-model.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@planarchy/shared";
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { projectRouter } from "../router/project.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { OrderType, AllocationType, ProjectStatus, SystemRole } from "@planarchy/shared";
|
||||
import { OrderType, AllocationType, ProjectStatus, SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||
import { projectRouter } from "../router/project.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@planarchy/application")>();
|
||||
vi.mock("@capakraken/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
||||
return {
|
||||
...actual,
|
||||
countPlanningEntries: vi.fn().mockResolvedValue({ countsByProjectId: new Map() }),
|
||||
@@ -433,7 +433,7 @@ describe("project router", () => {
|
||||
},
|
||||
};
|
||||
|
||||
const { listAssignmentBookings } = await import("@planarchy/application");
|
||||
const { listAssignmentBookings } = await import("@capakraken/application");
|
||||
vi.mocked(listAssignmentBookings).mockResolvedValue([]);
|
||||
|
||||
const caller = createControllerCaller(db);
|
||||
@@ -452,7 +452,7 @@ describe("project router", () => {
|
||||
},
|
||||
};
|
||||
|
||||
const { listAssignmentBookings } = await import("@planarchy/application");
|
||||
const { listAssignmentBookings } = await import("@capakraken/application");
|
||||
vi.mocked(listAssignmentBookings).mockResolvedValue([
|
||||
{
|
||||
id: "a1",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@planarchy/application")>();
|
||||
vi.mock("@capakraken/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
||||
return {
|
||||
...actual,
|
||||
isChargeabilityActualBooking: actual.isChargeabilityActualBooking,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { ResourceType } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { ResourceType } from "@capakraken/shared";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@planarchy/application")>();
|
||||
vi.mock("@capakraken/application", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("@capakraken/application")>();
|
||||
return {
|
||||
...actual,
|
||||
isChargeabilityActualBooking: actual.isChargeabilityActualBooking,
|
||||
@@ -13,7 +13,7 @@ vi.mock("@planarchy/application", async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
import { listAssignmentBookings } from "@planarchy/application";
|
||||
import { listAssignmentBookings } from "@capakraken/application";
|
||||
import { resourceRouter } from "../router/resource.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus, SystemRole } from "@planarchy/shared";
|
||||
import { AllocationStatus, SystemRole } from "@capakraken/shared";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { roleRouter } from "../router/role.js";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { staffingRouter } from "../router/staffing.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
// Mock the pure-logic packages — we focus on the router/DB layer
|
||||
vi.mock("@planarchy/staffing", () => ({
|
||||
vi.mock("@capakraken/staffing", () => ({
|
||||
rankResources: vi.fn().mockImplementation((input: { resources: { id: string }[] }) =>
|
||||
input.resources.map((r: { id: string }, i: number) => ({
|
||||
resourceId: r.id,
|
||||
@@ -36,7 +36,7 @@ vi.mock("@planarchy/staffing", () => ({
|
||||
]),
|
||||
}));
|
||||
|
||||
vi.mock("@planarchy/application", () => ({
|
||||
vi.mock("@capakraken/application", () => ({
|
||||
listAssignmentBookings: vi.fn().mockResolvedValue([]),
|
||||
}));
|
||||
|
||||
@@ -159,7 +159,7 @@ describe("staffing.getSuggestions", () => {
|
||||
},
|
||||
};
|
||||
|
||||
const { rankResources } = await import("@planarchy/staffing");
|
||||
const { rankResources } = await import("@capakraken/staffing");
|
||||
const caller = createProtectedCaller(db);
|
||||
await caller.getSuggestions({
|
||||
requiredSkills: ["Compositing"],
|
||||
@@ -277,7 +277,7 @@ describe("staffing.findCapacity", () => {
|
||||
},
|
||||
};
|
||||
|
||||
const { findCapacityWindows } = await import("@planarchy/staffing");
|
||||
const { findCapacityWindows } = await import("@capakraken/staffing");
|
||||
const caller = createProtectedCaller(db);
|
||||
await caller.findCapacity({
|
||||
resourceId: "res_1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus, SystemRole } from "@planarchy/shared";
|
||||
import { AllocationStatus, SystemRole } from "@capakraken/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { timelineRouter } from "../router/timeline.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@planarchy/shared";
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildTimelineShiftPlan } from "../router/timeline-shift-planning.js";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SystemRole } from "@planarchy/shared";
|
||||
import { VacationStatus, VacationType } from "@planarchy/db";
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { VacationStatus, VacationType } from "@capakraken/db";
|
||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||
import { vacationRouter } from "../router/vacation.js";
|
||||
import { createCallerFactory } from "../trpc.js";
|
||||
|
||||
Reference in New Issue
Block a user