@tuongaz/seeflow 0.1.64 → 0.1.65
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/web/assets/{index-BAEA18IR.js → index-DL6aaddE.js} +985 -985
- package/dist/web/assets/{index.es-DZEdTXNJ.js → index.es-CVm3MRo3.js} +1 -1
- package/dist/web/assets/{jspdf.es.min-DT1Li8zz.js → jspdf.es.min-C06OvDJX.js} +3 -3
- package/dist/web/index.html +1 -1
- package/examples/ecommerce-platform/flow.json +28 -30
- package/examples/order-pipeline/flow.json +16 -16
- package/package.json +1 -1
- package/src/api.ts +19 -23
- package/src/cli-e2e.ts +6 -7
- package/src/cli-manifest.ts +3 -5
- package/src/cli.ts +26 -0
- package/src/diagram.ts +8 -5
- package/src/layout.ts +22 -26
- package/src/mcp.ts +2 -2
- package/src/merge.ts +4 -3
- package/src/node-files.ts +1 -1
- package/src/operations.ts +68 -50
- package/src/runtime.ts +37 -0
- package/src/schema-catalog.ts +23 -11
- package/src/schema.ts +147 -271
- package/src/server.ts +1 -1
- package/src/status-runner.ts +2 -1
- package/src/watcher.ts +7 -7
package/src/watcher.ts
CHANGED
|
@@ -75,7 +75,7 @@ export interface FlowWatcher {
|
|
|
75
75
|
): void;
|
|
76
76
|
/**
|
|
77
77
|
* Relative paths (under the project root) currently being watched because
|
|
78
|
-
* they're referenced by a node's `data.path` (
|
|
78
|
+
* they're referenced by a node's `data.path` (type:'image' node). type:'html' node content
|
|
79
79
|
* rides on the file:// resolver via `data.html`, not this list. Sorted for
|
|
80
80
|
* stable assertion order. Used by tests.
|
|
81
81
|
*/
|
|
@@ -96,7 +96,7 @@ interface WatchHandle {
|
|
|
96
96
|
filePath: string;
|
|
97
97
|
/**
|
|
98
98
|
* Per-directory file watchers for files referenced by node data
|
|
99
|
-
* (
|
|
99
|
+
* (type:'image' node `path`). Each directory watcher dispatches to
|
|
100
100
|
* specific basenames in its `files` map.
|
|
101
101
|
*/
|
|
102
102
|
fileWatchers: Map<string, FileWatchEntry>;
|
|
@@ -108,7 +108,7 @@ const resolveFilePath = (repoPath: string, flowPath: string): string =>
|
|
|
108
108
|
const isCleanRelativePath = (p: string): boolean => {
|
|
109
109
|
if (!p) return false;
|
|
110
110
|
// Reject data URLs early — the pre-launch hard-cut (US-004) replaces
|
|
111
|
-
//
|
|
111
|
+
// type:'image' node.data.image with data.path, but defensively skip any lingering
|
|
112
112
|
// base64 payloads so we don't try to fs.watch a 5MB string.
|
|
113
113
|
if (p.startsWith('data:')) return false;
|
|
114
114
|
if (isAbsolute(p) || p.startsWith('/') || p.startsWith('\\')) return false;
|
|
@@ -119,7 +119,7 @@ const isCleanRelativePath = (p: string): boolean => {
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Walk raw flow JSON (pre-schema-parse) collecting referenced file paths:
|
|
122
|
-
* `nodes[].data.path` (
|
|
122
|
+
* `nodes[].data.path` (type:'image' node). type:'html' node content now flows through the
|
|
123
123
|
* `file://nodes/<id>/view.html` ref handled by the file-ref resolver, so it
|
|
124
124
|
* does NOT need a separate fs.watch entry here. Operates on the raw JSON so
|
|
125
125
|
* the watcher works before those fields are formally validated.
|
|
@@ -152,7 +152,7 @@ export interface ReadMergedFlowResult {
|
|
|
152
152
|
error: string | null;
|
|
153
153
|
/** Sorted relative paths under the project root resolved via file://. */
|
|
154
154
|
fileRefs: string[];
|
|
155
|
-
/** Flow file paths referenced via
|
|
155
|
+
/** Flow file paths referenced via type:'image' node.path. */
|
|
156
156
|
staticRefs: string[];
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -337,7 +337,7 @@ export function createWatcher(deps: WatcherDeps): FlowWatcher {
|
|
|
337
337
|
|
|
338
338
|
if (!existsSync(dir)) {
|
|
339
339
|
// Directory hasn't been created on disk yet (e.g. blocks/ before any
|
|
340
|
-
//
|
|
340
|
+
// type:'html' node is dropped). Skip silently — next reparse will retry.
|
|
341
341
|
continue;
|
|
342
342
|
}
|
|
343
343
|
|
|
@@ -397,7 +397,7 @@ export function createWatcher(deps: WatcherDeps): FlowWatcher {
|
|
|
397
397
|
snapshots.set(flowId, next);
|
|
398
398
|
lastSeenMtimes.set(flowId, combinedMtimeMs(filePath));
|
|
399
399
|
|
|
400
|
-
// Reconcile the referenced-file watch set:
|
|
400
|
+
// Reconcile the referenced-file watch set: type:'image' node.path from
|
|
401
401
|
// flow + any file:// targets that resolved cleanly. Schema errors
|
|
402
402
|
// shouldn't drop the watch set — the user is mid-edit and the referenced
|
|
403
403
|
// files are still valid targets, so this reconciles whenever the JSON
|