Fix scope

This commit is contained in:
Matt Kane
2026-04-01 10:58:32 +01:00
parent 482a442f60
commit 2e863566b3
264 changed files with 578 additions and 578 deletions

View File

@@ -1,6 +1,6 @@
import type { AuthAdapter } from "@emdashcms/auth";
import { Role } from "@emdashcms/auth";
import { createKyselyAdapter } from "@emdashcms/auth/adapters/kysely";
import type { AuthAdapter } from "@emdash-cms/auth";
import { Role } from "@emdash-cms/auth";
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
import type { Kysely } from "kysely";
import { describe, it, expect, beforeEach, afterEach } from "vitest";

View File

@@ -2,7 +2,7 @@
* Unit tests for API token generation, hashing, and scope utilities.
*/
import { Role, scopesForRole, clampScopes } from "@emdashcms/auth";
import { Role, scopesForRole, clampScopes } from "@emdash-cms/auth";
import { describe, it, expect } from "vitest";
import {

View File

@@ -1,5 +1,5 @@
import type { AuthAdapter, EmailSendFn } from "@emdashcms/auth";
import type { EmailMessage } from "@emdashcms/auth";
import type { AuthAdapter, EmailSendFn } from "@emdash-cms/auth";
import type { EmailMessage } from "@emdash-cms/auth";
import {
Role,
createInvite,
@@ -9,8 +9,8 @@ import {
InviteError,
escapeHtml,
generateToken,
} from "@emdashcms/auth";
import { createKyselyAdapter } from "@emdashcms/auth/adapters/kysely";
} from "@emdash-cms/auth";
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
import type { Kysely } from "kysely";
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";

View File

@@ -1,6 +1,6 @@
import type { AuthAdapter, Credential, User } from "@emdashcms/auth";
import { Role } from "@emdashcms/auth";
import { createKyselyAdapter } from "@emdashcms/auth/adapters/kysely";
import type { AuthAdapter, Credential, User } from "@emdash-cms/auth";
import { Role } from "@emdash-cms/auth";
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
import type { Kysely } from "kysely";
import { describe, it, expect, beforeEach, afterEach } from "vitest";

View File

@@ -1,5 +1,5 @@
import type { AuthAdapter, EmailSendFn } from "@emdashcms/auth";
import type { EmailMessage } from "@emdashcms/auth";
import type { AuthAdapter, EmailSendFn } from "@emdash-cms/auth";
import type { EmailMessage } from "@emdash-cms/auth";
import {
Role,
canSignup,
@@ -7,8 +7,8 @@ import {
validateSignupToken,
completeSignup,
SignupError,
} from "@emdashcms/auth";
import { createKyselyAdapter } from "@emdashcms/auth/adapters/kysely";
} from "@emdash-cms/auth";
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
import type { Kysely } from "kysely";
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";

View File

@@ -2,7 +2,7 @@
* Tests for the cleanup subsystems.
*
* Note: runSystemCleanup() is not tested directly here because it imports
* from @emdashcms/auth/adapters/kysely, which requires the auth package to
* from @emdash-cms/auth/adapters/kysely, which requires the auth package to
* be built. Instead, we test each subsystem independently:
* - cleanupExpiredChallenges: tested in auth/challenge-store.test.ts
* - deleteExpiredTokens: tested below using direct DB operations

View File

@@ -10,8 +10,8 @@
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
import { Role } from "@emdashcms/auth";
import type { RoleLevel } from "@emdashcms/auth";
import { Role } from "@emdash-cms/auth";
import type { RoleLevel } from "@emdash-cms/auth";
import { afterEach, describe, expect, it, vi } from "vitest";
import type { EmDashHandlers } from "../../../src/astro/types.js";

View File

@@ -40,11 +40,11 @@ describe("definePlugin", () => {
it("accepts valid scoped ID", () => {
const plugin = definePlugin({
id: "@emdashcms/seo-plugin",
id: "@emdash-cms/seo-plugin",
version: "1.0.0",
});
expect(plugin.id).toBe("@emdashcms/seo-plugin");
expect(plugin.id).toBe("@emdash-cms/seo-plugin");
});
it("accepts scoped ID with numbers", () => {