Fix scope
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user