fix: resolve TypeScript build errors for Docker deployment

- Fix duplicate property in addShapes object literal
- Exclude src/encryptid/ from tsc (pre-existing errors, separate module)
- Add ambient type declaration for @encryptid/sdk/server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-13 14:59:04 -07:00
parent 7b230baa9c
commit 3a04416b10
3 changed files with 28 additions and 3 deletions

View File

@ -367,14 +367,13 @@ export function addShapes(
ids.push(id);
d.shapes[id] = {
type: (shape.type as string) || 'geo',
id,
x: (shape.x as number) ?? 100,
y: (shape.y as number) ?? 100,
width: (shape.width as number) ?? 300,
height: (shape.height as number) ?? 200,
rotation: (shape.rotation as number) ?? 0,
...shape,
id, // ensure id override
id,
} as ShapeData;
}
});

26
server/encryptid-sdk.d.ts vendored Normal file
View File

@ -0,0 +1,26 @@
declare module '@encryptid/sdk/server' {
export function verifyEncryptIDToken(token: string): Promise<EncryptIDClaims>;
export function evaluateSpaceAccess(
slug: string,
token: string | null,
method: string,
options: { getSpaceConfig: (slug: string) => Promise<SpaceAuthConfig | null> },
): Promise<{ allowed: boolean; readOnly: boolean; reason?: string; claims?: EncryptIDClaims }>;
export function extractToken(headers: Headers): string | null;
export function authenticateWSUpgrade(req: Request): Promise<EncryptIDClaims | null>;
export interface EncryptIDClaims {
sub: string;
username?: string;
iat?: number;
exp?: number;
[key: string]: unknown;
}
export interface SpaceAuthConfig {
spaceSlug: string;
visibility: string;
ownerDID?: string;
app?: string;
}
}

View File

@ -21,5 +21,5 @@
}
},
"include": ["**/*.ts", "vite.config.ts"],
"exclude": ["node_modules/**/*", "dist/**/*"]
"exclude": ["node_modules/**/*", "dist/**/*", "src/encryptid/**/*"]
}