@almadar/workspace 0.4.0 → 0.4.1
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.
|
@@ -21,5 +21,8 @@ export declare class LocalBackend implements WorkspaceBackend {
|
|
|
21
21
|
}>;
|
|
22
22
|
rename(srcAbs: string, dstAbs: string): Promise<void>;
|
|
23
23
|
chmod(absPath: string, mode: number): Promise<void>;
|
|
24
|
+
rm(absPath: string, opts?: {
|
|
25
|
+
recursive?: boolean;
|
|
26
|
+
}): Promise<void>;
|
|
24
27
|
watch(absPath: string, onChange: (kind: 'change' | 'rename') => void): () => void;
|
|
25
28
|
}
|
|
@@ -23,6 +23,9 @@ export declare class MemoryBackend implements WorkspaceBackend {
|
|
|
23
23
|
rename(srcAbs: string, dstAbs: string): Promise<void>;
|
|
24
24
|
chmod(): Promise<void>;
|
|
25
25
|
watch(): () => void;
|
|
26
|
+
rm(absPath: string, opts?: {
|
|
27
|
+
recursive?: boolean;
|
|
28
|
+
}): Promise<void>;
|
|
26
29
|
getAll(): Map<string, string>;
|
|
27
30
|
clear(): void;
|
|
28
31
|
}
|
package/dist/internal/types.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export interface WorkspaceBackend {
|
|
|
46
46
|
* way (poll/webhook) — consumers never see the difference.
|
|
47
47
|
*/
|
|
48
48
|
watch(absPath: string, onChange: (kind: 'change' | 'rename') => void): () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Remove a path. With `{ recursive: true }` removes a directory tree; always
|
|
51
|
+
* idempotent (no-op if absent). The `'local'` backend uses `fs.rm`; memory
|
|
52
|
+
* drops the matching key(s). Used by `deleteWorkspace`.
|
|
53
|
+
*/
|
|
54
|
+
rm(absPath: string, opts?: {
|
|
55
|
+
recursive?: boolean;
|
|
56
|
+
}): Promise<void>;
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* The persisted marker that pins an `appId` to a workspace dir on disk.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/workspace",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Storage-agnostic workspace primitives shared by Almadar consumers. One service, six exports, hidden paths, single observer. See docs/Almadar_Workspace.md.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|