rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61) Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com> Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
This commit was merged in pull request #61.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { updateAllocationEntry } from "../index.js";
|
||||
|
||||
@@ -174,5 +174,4 @@ describe("allocation entry resolution helpers", () => {
|
||||
message: "Allocation not found",
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
createAssignment,
|
||||
updateAssignment,
|
||||
updateDemandRequirement,
|
||||
} from "../index.js";
|
||||
import { createAssignment, updateAssignment, updateDemandRequirement } from "../index.js";
|
||||
|
||||
describe("allocation entry update flows", () => {
|
||||
it("excludes the current assignment from conflict checks during update", async () => {
|
||||
@@ -233,5 +229,4 @@ describe("allocation entry update flows", () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { AllocationStatus, type AllocationWithDetails } from "@capakraken/shared";
|
||||
import { AllocationStatus, type AllocationWithDetails } from "@nexus/shared";
|
||||
import { buildAllocationReadModel } from "../index.js";
|
||||
|
||||
function makeAllocation(overrides: Partial<AllocationWithDetails>): AllocationWithDetails {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { countEstimateHandoffPlanningEntries } from "../index.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { countPlanningEntries } from "../index.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
createAssignment,
|
||||
@@ -172,7 +172,6 @@ describe("demand and assignment use-cases", () => {
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
it("fills one seat of a multi-headcount demand requirement", async () => {
|
||||
const initialDemandRequirement = {
|
||||
id: "demand_1",
|
||||
@@ -260,7 +259,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
});
|
||||
const assignmentUpdate = vi.fn();
|
||||
const allocationCreate = vi.fn();
|
||||
@@ -301,7 +299,6 @@ describe("demand and assignment use-cases", () => {
|
||||
id: "demand_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
});
|
||||
expect(demandRequirementUpdate).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -430,7 +427,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.COMPLETED,
|
||||
|
||||
});
|
||||
const allocationUpdate = vi.fn();
|
||||
const allocationDelete = vi.fn().mockResolvedValue({});
|
||||
@@ -468,7 +464,6 @@ describe("demand and assignment use-cases", () => {
|
||||
expect(result.updatedDemandRequirement).toMatchObject({
|
||||
id: "demand_2",
|
||||
status: AllocationStatus.COMPLETED,
|
||||
|
||||
});
|
||||
expect(demandRequirementUpdate).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -551,7 +546,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.COMPLETED,
|
||||
|
||||
});
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
@@ -582,11 +576,10 @@ describe("demand and assignment use-cases", () => {
|
||||
});
|
||||
|
||||
expect(result.assignment.id).toBe("assignment_stale");
|
||||
|
||||
|
||||
expect(result.updatedDemandRequirement).toMatchObject({
|
||||
id: "demand_stale",
|
||||
status: AllocationStatus.COMPLETED,
|
||||
|
||||
});
|
||||
expect(demandRequirementUpdate).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -615,11 +608,14 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
};
|
||||
// loadAllocationEntry reads demand by id for resolution,
|
||||
// then fillDemandRequirement reads it again for the fill operation.
|
||||
const demandIdReads = [initialDemandRequirement, initialDemandRequirement, updatedDemandRequirement];
|
||||
const demandIdReads = [
|
||||
initialDemandRequirement,
|
||||
initialDemandRequirement,
|
||||
updatedDemandRequirement,
|
||||
];
|
||||
const demandRequirementFindUnique = vi.fn().mockImplementation(({ where }) => {
|
||||
if (where.id === "demand_compat") {
|
||||
return Promise.resolve(demandIdReads.shift() ?? null);
|
||||
@@ -798,7 +794,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
});
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
@@ -959,7 +954,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_1",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
});
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
@@ -1097,7 +1091,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_2",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.COMPLETED,
|
||||
|
||||
});
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
@@ -1222,7 +1215,6 @@ describe("demand and assignment use-cases", () => {
|
||||
projectId: "project_3",
|
||||
headcount: 1,
|
||||
status: AllocationStatus.PROPOSED,
|
||||
|
||||
});
|
||||
const auditLogCreate = vi.fn().mockResolvedValue({});
|
||||
|
||||
|
||||
@@ -427,7 +427,7 @@ describe("syncEntitlement", () => {
|
||||
});
|
||||
|
||||
it("accumulates usedDays from APPROVED vacations and pendingDays from PENDING vacations", async () => {
|
||||
const { VacationStatus } = await import("@capakraken/db");
|
||||
const { VacationStatus } = await import("@nexus/db");
|
||||
const existingEnt = makeEntitlement({ entitledDays: 28, carryoverDays: 0 });
|
||||
const updatedEnt = makeEntitlement({
|
||||
entitledDays: 28,
|
||||
@@ -496,7 +496,7 @@ describe("syncEntitlement", () => {
|
||||
});
|
||||
|
||||
it("uses persisted snapshot days when countVacationChargeableDaysFromSnapshot returns a non-null value", async () => {
|
||||
const { VacationStatus } = await import("@capakraken/db");
|
||||
const { VacationStatus } = await import("@nexus/db");
|
||||
const existingEnt = makeEntitlement({ entitledDays: 28, carryoverDays: 0 });
|
||||
const updatedEnt = makeEntitlement({ entitledDays: 28, usedDays: 7, pendingDays: 0 });
|
||||
|
||||
@@ -658,7 +658,7 @@ describe("getEntitlementBalance", () => {
|
||||
});
|
||||
|
||||
it("counts sick days separately from annual leave balance", async () => {
|
||||
const { VacationStatus } = await import("@capakraken/db");
|
||||
const { VacationStatus } = await import("@nexus/db");
|
||||
const syncedEnt = makeEntitlement({
|
||||
entitledDays: 28,
|
||||
carryoverDays: 0,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { EstimateStatus } from "@capakraken/shared";
|
||||
import { EstimateStatus } from "@nexus/shared";
|
||||
import { createEstimate } from "../use-cases/estimate/create-estimate.js";
|
||||
import { cloneEstimate } from "../use-cases/estimate/clone-estimate.js";
|
||||
import { listEstimates } from "../use-cases/estimate/list-estimates.js";
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
EstimateExportFormat,
|
||||
EstimateStatus,
|
||||
EstimateVersionStatus,
|
||||
} from "@capakraken/shared";
|
||||
} from "@nexus/shared";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
approveEstimateVersion,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { fillDemandRequirement } from "../index.js";
|
||||
@@ -40,7 +40,10 @@ function makeAssignment(overrides: Record<string, unknown> = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
function makeDb(demandOverride: Record<string, unknown> = {}, txOverrides: Record<string, unknown> = {}) {
|
||||
function makeDb(
|
||||
demandOverride: Record<string, unknown> = {},
|
||||
txOverrides: Record<string, unknown> = {},
|
||||
) {
|
||||
const demand = {
|
||||
id: "demand_1",
|
||||
projectId: "project_1",
|
||||
@@ -285,7 +288,15 @@ describe("fillDemandRequirement", () => {
|
||||
findUnique: vi.fn().mockResolvedValue({
|
||||
id: "resource_1",
|
||||
lcrCents: 5000,
|
||||
availability: { monday: 8, tuesday: 8, wednesday: 8, thursday: 8, friday: 8, saturday: 0, sunday: 0 },
|
||||
availability: {
|
||||
monday: 8,
|
||||
tuesday: 8,
|
||||
wednesday: 8,
|
||||
thursday: 8,
|
||||
friday: 8,
|
||||
saturday: 0,
|
||||
sunday: 0,
|
||||
},
|
||||
}),
|
||||
},
|
||||
demandRequirement: {
|
||||
@@ -355,7 +366,15 @@ describe("fillDemandRequirement", () => {
|
||||
findUnique: vi.fn().mockResolvedValue({
|
||||
id: "resource_1",
|
||||
lcrCents: 5000,
|
||||
availability: { monday: 8, tuesday: 8, wednesday: 8, thursday: 8, friday: 8, saturday: 0, sunday: 0 },
|
||||
availability: {
|
||||
monday: 8,
|
||||
tuesday: 8,
|
||||
wednesday: 8,
|
||||
thursday: 8,
|
||||
friday: 8,
|
||||
saturday: 0,
|
||||
sunday: 0,
|
||||
},
|
||||
}),
|
||||
},
|
||||
demandRequirement: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { AllocationStatus } from "@nexus/shared";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { fillOpenDemand } from "../index.js";
|
||||
@@ -175,7 +175,10 @@ describe("fillOpenDemand", () => {
|
||||
|
||||
it("propagates CANCELLED demand rejection from fillDemandRequirement", async () => {
|
||||
const db = makeDb({
|
||||
demandRecord: makeDemandRequirement({ status: AllocationStatus.CANCELLED }) as Record<string, unknown>,
|
||||
demandRecord: makeDemandRequirement({ status: AllocationStatus.CANCELLED }) as Record<
|
||||
string,
|
||||
unknown
|
||||
>,
|
||||
});
|
||||
|
||||
// fillDemandRequirement will re-fetch the demand by ID and throw BAD_REQUEST
|
||||
|
||||
@@ -56,7 +56,7 @@ afterEach(async () => {
|
||||
});
|
||||
|
||||
async function makeTempDirectory(): Promise<string> {
|
||||
const directory = await mkdtemp(path.join(os.tmpdir(), "capakraken-read-workbook-"));
|
||||
const directory = await mkdtemp(path.join(os.tmpdir(), "nexus-read-workbook-"));
|
||||
tempDirectories.push(directory);
|
||||
return directory;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { AllocationStatus, type AllocationWithDetails } from "@capakraken/shared";
|
||||
import {
|
||||
buildSplitAllocationReadModel,
|
||||
} from "../index.js";
|
||||
import { AllocationStatus, type AllocationWithDetails } from "@nexus/shared";
|
||||
import { buildSplitAllocationReadModel } from "../index.js";
|
||||
|
||||
const project = {
|
||||
id: "project_1",
|
||||
|
||||
Reference in New Issue
Block a user