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:
parent
7b230baa9c
commit
3a04416b10
|
|
@ -367,14 +367,13 @@ export function addShapes(
|
||||||
ids.push(id);
|
ids.push(id);
|
||||||
d.shapes[id] = {
|
d.shapes[id] = {
|
||||||
type: (shape.type as string) || 'geo',
|
type: (shape.type as string) || 'geo',
|
||||||
id,
|
|
||||||
x: (shape.x as number) ?? 100,
|
x: (shape.x as number) ?? 100,
|
||||||
y: (shape.y as number) ?? 100,
|
y: (shape.y as number) ?? 100,
|
||||||
width: (shape.width as number) ?? 300,
|
width: (shape.width as number) ?? 300,
|
||||||
height: (shape.height as number) ?? 200,
|
height: (shape.height as number) ?? 200,
|
||||||
rotation: (shape.rotation as number) ?? 0,
|
rotation: (shape.rotation as number) ?? 0,
|
||||||
...shape,
|
...shape,
|
||||||
id, // ensure id override
|
id,
|
||||||
} as ShapeData;
|
} as ShapeData;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -21,5 +21,5 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "vite.config.ts"],
|
"include": ["**/*.ts", "vite.config.ts"],
|
||||||
"exclude": ["node_modules/**/*", "dist/**/*"]
|
"exclude": ["node_modules/**/*", "dist/**/*", "src/encryptid/**/*"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue