@almadar/workspace 0.7.0 → 0.8.0
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/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/service.d.ts +1 -0
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/dist/service.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare class WorkspaceServiceImpl implements WorkspaceService {
|
|
|
74
74
|
clearCompiled(): Promise<void>;
|
|
75
75
|
readFile(relPath: string): Promise<string | null>;
|
|
76
76
|
writeFile(relPath: string, content: string): Promise<void>;
|
|
77
|
+
removeFile(relPath: string): Promise<void>;
|
|
77
78
|
listTree(relPath?: string): Promise<FileTreeNode[]>;
|
|
78
79
|
exists(relPath: string): Promise<boolean>;
|
|
79
80
|
commitAndPush(opts: {
|
package/dist/types.d.ts
CHANGED
|
@@ -90,6 +90,9 @@ export type WorkspaceWriteEvent = {
|
|
|
90
90
|
kind: 'file';
|
|
91
91
|
relPath: string;
|
|
92
92
|
content: string;
|
|
93
|
+
} | {
|
|
94
|
+
kind: 'file-removed';
|
|
95
|
+
relPath: string;
|
|
93
96
|
} | {
|
|
94
97
|
kind: 'workspace-index';
|
|
95
98
|
orbital: string;
|
|
@@ -274,6 +277,8 @@ export interface WorkspaceService {
|
|
|
274
277
|
clearCompiled(): Promise<void>;
|
|
275
278
|
readFile(relPath: string): Promise<string | null>;
|
|
276
279
|
writeFile(relPath: string, content: string): Promise<void>;
|
|
280
|
+
/** Delete a sandboxed file and emit a `file-removed` event (unmirrors downstream). No-op if absent. */
|
|
281
|
+
removeFile(relPath: string): Promise<void>;
|
|
277
282
|
listTree(relPath?: string): Promise<FileTreeNode[]>;
|
|
278
283
|
exists(relPath: string): Promise<boolean>;
|
|
279
284
|
commitAndPush(opts: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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",
|