@aprovan/patchwork-editor 0.1.2-dev.93c7b6a → 0.1.2-dev.9c336a0
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/.turbo/turbo-build.log +1 -1
- package/dist/lib/vfs.d.ts +2 -3
- package/package.json +3 -3
- package/src/lib/vfs.ts +4 -5
package/.turbo/turbo-build.log
CHANGED
package/dist/lib/vfs.d.ts
CHANGED
|
@@ -8,11 +8,10 @@ export declare function getVFSConfig(): Promise<{
|
|
|
8
8
|
}>;
|
|
9
9
|
/**
|
|
10
10
|
* Get the VFS store instance (creates one if needed).
|
|
11
|
-
* Store uses HttpBackend to persist to the stitchery server.
|
|
12
11
|
*/
|
|
13
12
|
export declare function getVFSStore(): VFSStore;
|
|
14
13
|
/**
|
|
15
|
-
* Save a virtual project to disk via the
|
|
14
|
+
* Save a virtual project to disk via the VFS server.
|
|
16
15
|
* Projects are saved under their ID in the VFS directory.
|
|
17
16
|
*/
|
|
18
17
|
export declare function saveProject(project: VirtualProject): Promise<void>;
|
|
@@ -31,6 +30,6 @@ export declare function saveFile(path: string, content: string): Promise<void>;
|
|
|
31
30
|
export declare function loadFile(path: string, encoding?: 'utf8' | 'base64'): Promise<string>;
|
|
32
31
|
export declare function subscribeToChanges(callback: (record: ChangeRecord) => void): () => void;
|
|
33
32
|
/**
|
|
34
|
-
* Check if VFS is available (
|
|
33
|
+
* Check if VFS is available (backend server has /vfs routes enabled).
|
|
35
34
|
*/
|
|
36
35
|
export declare function isVFSAvailable(): Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aprovan/patchwork-editor",
|
|
3
|
-
"version": "0.1.2-dev.
|
|
3
|
+
"version": "0.1.2-dev.9c336a0",
|
|
4
4
|
"description": "Components for facilitating widget generation and editing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"shiki": "^3.22.0",
|
|
28
28
|
"tailwind-merge": "^3.4.0",
|
|
29
29
|
"tiptap-markdown": "^0.9.0",
|
|
30
|
-
"@aprovan/
|
|
31
|
-
"@aprovan/
|
|
30
|
+
"@aprovan/bobbin": "0.1.0-dev.9c336a0",
|
|
31
|
+
"@aprovan/patchwork-compiler": "0.1.2-dev.9c336a0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^18.0.0 || ^19.0.0",
|
package/src/lib/vfs.ts
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from '@aprovan/patchwork-compiler';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* VFS client for persisting virtual projects
|
|
9
|
+
* VFS client for persisting virtual projects via HTTP.
|
|
10
10
|
* Uses HttpBackend which makes HTTP requests to /vfs routes.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
// VFS base URL - points to
|
|
13
|
+
// VFS base URL - points to a backend server's /vfs routes
|
|
14
14
|
const VFS_BASE_URL = '/vfs';
|
|
15
15
|
|
|
16
16
|
// Cached VFS config
|
|
@@ -41,7 +41,6 @@ let storeInstance: VFSStore | null = null;
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Get the VFS store instance (creates one if needed).
|
|
44
|
-
* Store uses HttpBackend to persist to the stitchery server.
|
|
45
44
|
*/
|
|
46
45
|
export function getVFSStore(): VFSStore {
|
|
47
46
|
if (!storeInstance) {
|
|
@@ -55,7 +54,7 @@ export function getVFSStore(): VFSStore {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
|
-
* Save a virtual project to disk via the
|
|
57
|
+
* Save a virtual project to disk via the VFS server.
|
|
59
58
|
* Projects are saved under their ID in the VFS directory.
|
|
60
59
|
*/
|
|
61
60
|
export async function saveProject(project: VirtualProject): Promise<void> {
|
|
@@ -112,7 +111,7 @@ export function subscribeToChanges(
|
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
/**
|
|
115
|
-
* Check if VFS is available (
|
|
114
|
+
* Check if VFS is available (backend server has /vfs routes enabled).
|
|
116
115
|
*/
|
|
117
116
|
export async function isVFSAvailable(): Promise<boolean> {
|
|
118
117
|
try {
|