@plume-canvas/server 0.1.37 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +42 -42
- package/dist/index.d.ts +11 -0
- package/dist/index.js +29 -29
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -780,6 +780,17 @@ export declare class CanvasResourceStore {
|
|
|
780
780
|
* 见 routes/canvases.ts 里按 isSlotName 分流的 cache-control。
|
|
781
781
|
*/
|
|
782
782
|
saveSlot(canvasId: string, slotId: string, bytes: Uint8Array, ext?: string): Promise<SavedResource>;
|
|
783
|
+
/**
|
|
784
|
+
* 资源文件的元信息(校验 ETag 用)。
|
|
785
|
+
*
|
|
786
|
+
* 为什么单独提供:槽位资源地址不变、内容会变,浏览器要能在「内容没变」时拿 304,
|
|
787
|
+
* 「内容变了」时重新取 —— 只靠长度不够稳,需要修改时间一起参与校验。
|
|
788
|
+
* 文件不存在返回 undefined(调用方按无 ETag 处理)。
|
|
789
|
+
*/
|
|
790
|
+
stat(canvasId: string, hashName: string): Promise<{
|
|
791
|
+
size: number;
|
|
792
|
+
mtimeMs: number;
|
|
793
|
+
} | undefined>;
|
|
783
794
|
/** 读本画布某个资源;名字不合法或不存在 → undefined */
|
|
784
795
|
read(canvasId: string, hashName: string): Promise<Uint8Array<ArrayBuffer> | undefined>;
|
|
785
796
|
/**
|