@openfairygui/backend 0.2.0-alpha.2 → 0.2.0-alpha.21
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/README.md +48 -2
- package/dist/index.cjs +146 -1
- package/dist/index.d.cts +33 -2
- package/dist/index.d.mts +33 -2
- package/dist/index.mjs +146 -2
- package/dist/node.cjs +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{runtime-OO1sHuCl.d.mts → runtime-B4SwHTRC.d.mts} +89 -10
- package/dist/{runtime-qcSlD_9-.d.cts → runtime-BB_3Ws5y.d.cts} +90 -11
- package/dist/{runtime-BPWzx-Tv.mjs → runtime-CqGK_D9A.mjs} +483 -87
- package/dist/{runtime-BL9Pkfc7.cjs → runtime-D3bShb1X.cjs} +482 -86
- package/package.json +5 -4
- package/src/contracts.ts +8 -0
- package/src/index.ts +25 -12
- package/src/runtime/capabilities.ts +126 -0
- package/src/runtime/contracts.ts +512 -0
- package/src/runtime.ts +67 -540
- package/src/services/authoring-service.ts +520 -80
- package/src/services/context.ts +12 -8
- package/src/services/runtime-service.ts +108 -12
- package/src/services/session-project-writer.ts +64 -0
- package/src/services/session-utils.ts +5 -1
- package/src/storage.ts +194 -0
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import type { UamProject, UamTransactionOperation } from '@openfairygui/core/uam';
|
|
2
|
+
import type { ApplyUamTransactionAppError } from '@openfairygui/functions/uam';
|
|
3
|
+
import type {
|
|
4
|
+
BACKEND_CAPABILITY_SCHEMA_VERSION,
|
|
5
|
+
BACKEND_COMPATIBILITY_POLICY,
|
|
6
|
+
BACKEND_CONTRACT_VERSION,
|
|
7
|
+
BackendDiagnostic,
|
|
8
|
+
BackendResponseMeta,
|
|
9
|
+
} from '../contracts.js';
|
|
10
|
+
import type { PathPolicyViolationError } from '../path-policy.js';
|
|
11
|
+
|
|
12
|
+
export interface BackendFileHandle {
|
|
13
|
+
writeFile(content: string): Promise<void>;
|
|
14
|
+
close(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BackendFileStat {
|
|
18
|
+
isFile(): boolean;
|
|
19
|
+
isDirectory(): boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface BackendFileSystem {
|
|
23
|
+
stat(filePath: string): Promise<BackendFileStat>;
|
|
24
|
+
readdir(dirPath: string): Promise<string[]>;
|
|
25
|
+
readFile(filePath: string): Promise<string>;
|
|
26
|
+
readFileRaw(filePath: string): Promise<Uint8Array>;
|
|
27
|
+
writeFile(filePath: string, content: string): Promise<void>;
|
|
28
|
+
writeFileRaw(filePath: string, data: Uint8Array): Promise<void>;
|
|
29
|
+
mkdir(dirPath: string, options?: { recursive?: boolean }): Promise<void>;
|
|
30
|
+
resolvePath(filePath: string): Promise<string>;
|
|
31
|
+
openExclusive(filePath: string): Promise<BackendFileHandle>;
|
|
32
|
+
unlink(filePath: string): Promise<void>;
|
|
33
|
+
join(...paths: string[]): string;
|
|
34
|
+
dirname(filePath: string): string;
|
|
35
|
+
resolve(...paths: string[]): string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface BackendHostAdapter {
|
|
39
|
+
lockMetadata?(input: { canonicalPathKey: string; canonicalProjectPath: string; lockFilePath: string }): unknown;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface BackendArtifactBridgeCapability {
|
|
43
|
+
available: false;
|
|
44
|
+
requiredHost: 'node';
|
|
45
|
+
executionBoundary: 'external-bridge';
|
|
46
|
+
bridgeEntrypoint: '@openfairygui/backend/node';
|
|
47
|
+
reason: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface BackendCapabilityManifest {
|
|
51
|
+
browserSafe: true;
|
|
52
|
+
rootEntrypoint: '@openfairygui/backend';
|
|
53
|
+
nodeEntrypoint: '@openfairygui/backend/node';
|
|
54
|
+
adapters: {
|
|
55
|
+
fileSystem: {
|
|
56
|
+
injected: true;
|
|
57
|
+
requiredFor: readonly ['openSession', 'saveSession', 'materializeSession'];
|
|
58
|
+
};
|
|
59
|
+
projectStorage: {
|
|
60
|
+
injected: true;
|
|
61
|
+
browserSafe: true;
|
|
62
|
+
requiredFor: readonly ['openProjectSession.writeback', 'saveSession', 'materializeSession'];
|
|
63
|
+
adapterFactory: 'createBackendStorageFileSystem';
|
|
64
|
+
};
|
|
65
|
+
host: {
|
|
66
|
+
injected: true;
|
|
67
|
+
requiredFor: readonly ['advisoryLockMetadata'];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
executionBoundaries: {
|
|
71
|
+
projectSession: 'in-process-browser-safe';
|
|
72
|
+
fileBackedSession: 'adapter-backed';
|
|
73
|
+
artifactPublish: BackendArtifactBridgeCapability;
|
|
74
|
+
artifactRestore: BackendArtifactBridgeCapability;
|
|
75
|
+
};
|
|
76
|
+
diagnostics: {
|
|
77
|
+
stableCodes: true;
|
|
78
|
+
errorDiagnosticMirror: true;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface BackendCapabilities {
|
|
83
|
+
contractVersion: typeof BACKEND_CONTRACT_VERSION;
|
|
84
|
+
capabilitySchemaVersion: typeof BACKEND_CAPABILITY_SCHEMA_VERSION;
|
|
85
|
+
transactionKernelOwner: '@openfairygui/core';
|
|
86
|
+
appSeamOwner: '@openfairygui/functions';
|
|
87
|
+
runtimeOwner: '@openfairygui/backend';
|
|
88
|
+
methods: readonly [
|
|
89
|
+
'getCapabilities',
|
|
90
|
+
'openSession',
|
|
91
|
+
'openProjectSession',
|
|
92
|
+
'getSession',
|
|
93
|
+
'applyTransaction',
|
|
94
|
+
'saveSession',
|
|
95
|
+
'materializeSession',
|
|
96
|
+
'closeSession',
|
|
97
|
+
'getEvents',
|
|
98
|
+
'getJob',
|
|
99
|
+
'listJobs',
|
|
100
|
+
'cancelJob',
|
|
101
|
+
'getCacheSnapshot',
|
|
102
|
+
'refreshCache',
|
|
103
|
+
];
|
|
104
|
+
read: {
|
|
105
|
+
capabilitySnapshot: true;
|
|
106
|
+
sessionSnapshot: true;
|
|
107
|
+
};
|
|
108
|
+
authoring: {
|
|
109
|
+
applyTransaction: true;
|
|
110
|
+
saveSession: true;
|
|
111
|
+
resourceKinds: readonly string[];
|
|
112
|
+
nodeKinds: readonly string[];
|
|
113
|
+
gearKinds: readonly string[];
|
|
114
|
+
transactionScope: {
|
|
115
|
+
resourceKinds: readonly string[];
|
|
116
|
+
nodeKinds: readonly string[];
|
|
117
|
+
gearKinds: readonly string[];
|
|
118
|
+
};
|
|
119
|
+
unsupported: readonly ['artifact.publish', 'artifact.restore'];
|
|
120
|
+
};
|
|
121
|
+
artifact: {
|
|
122
|
+
publish: false;
|
|
123
|
+
restore: false;
|
|
124
|
+
status: 'bridge-required';
|
|
125
|
+
publishBridge: BackendArtifactBridgeCapability;
|
|
126
|
+
restoreBridge: BackendArtifactBridgeCapability;
|
|
127
|
+
};
|
|
128
|
+
manifest: BackendCapabilityManifest;
|
|
129
|
+
compatibilityPolicy: typeof BACKEND_COMPATIBILITY_POLICY;
|
|
130
|
+
runtime: {
|
|
131
|
+
sessionRuntime: true;
|
|
132
|
+
advisoryLocking: true;
|
|
133
|
+
coordinatedSave: true;
|
|
134
|
+
atomicSave: false;
|
|
135
|
+
staleRevisionProtection: true;
|
|
136
|
+
pathPolicy: {
|
|
137
|
+
canonicalization: 'realpath+normalized-casefold';
|
|
138
|
+
sessionIdentity: 'project-root';
|
|
139
|
+
saveTarget: 'opened-project-only';
|
|
140
|
+
outputTargets: 'deferred';
|
|
141
|
+
workspaceBoundary: 'project-root-only';
|
|
142
|
+
};
|
|
143
|
+
events: {
|
|
144
|
+
polling: true;
|
|
145
|
+
subscriptions: false;
|
|
146
|
+
retentionLimit: 1000;
|
|
147
|
+
sequenceScope: 'runtime';
|
|
148
|
+
};
|
|
149
|
+
jobs: {
|
|
150
|
+
inMemory: true;
|
|
151
|
+
cooperativeCancel: true;
|
|
152
|
+
persistent: false;
|
|
153
|
+
supportedKinds: readonly ['cache.refresh'];
|
|
154
|
+
artifactJobs: false;
|
|
155
|
+
completedRetentionLimit: 100;
|
|
156
|
+
};
|
|
157
|
+
cache: {
|
|
158
|
+
derivedReadOnly: true;
|
|
159
|
+
keyedBy: 'canonicalPathKey';
|
|
160
|
+
sourceOfTruth: false;
|
|
161
|
+
refreshMethod: 'refreshCache';
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface BackendSessionSnapshot {
|
|
167
|
+
sessionId: string;
|
|
168
|
+
canonicalProjectPath: string;
|
|
169
|
+
revision: number;
|
|
170
|
+
lastSavedRevision: number;
|
|
171
|
+
dirty: boolean;
|
|
172
|
+
uamFidelity: 'full' | 'unsupported';
|
|
173
|
+
lockHeld: boolean;
|
|
174
|
+
capabilities: BackendCapabilities;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface MaterializeSessionSnapshot extends BackendSessionSnapshot {
|
|
178
|
+
mode: 'fullProject';
|
|
179
|
+
reason?: string;
|
|
180
|
+
materializeRevision: number;
|
|
181
|
+
saveRevision: number;
|
|
182
|
+
writtenPaths: string[];
|
|
183
|
+
skippedPaths: string[];
|
|
184
|
+
diagnostics: BackendDiagnostic[];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface BackendSuccess<T> {
|
|
188
|
+
ok: true;
|
|
189
|
+
meta: BackendResponseMeta;
|
|
190
|
+
data: T;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface BackendFailure<E extends BackendError = BackendError> {
|
|
194
|
+
ok: false;
|
|
195
|
+
meta: BackendResponseMeta;
|
|
196
|
+
error: E;
|
|
197
|
+
session?: BackendSessionSnapshot;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type BackendResult<T, E extends BackendError = BackendError> = BackendSuccess<T> | BackendFailure<E>;
|
|
201
|
+
|
|
202
|
+
export interface SessionNotFoundError {
|
|
203
|
+
code: 'session_not_found';
|
|
204
|
+
message: string;
|
|
205
|
+
sessionId: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface SessionStaleWriteError {
|
|
209
|
+
code: 'stale_write';
|
|
210
|
+
message: string;
|
|
211
|
+
sessionId: string;
|
|
212
|
+
canonicalPathKey: string;
|
|
213
|
+
expectedRevision: number;
|
|
214
|
+
actualRevision: number;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface InProcessLockConflictError {
|
|
218
|
+
code: 'lock_conflict';
|
|
219
|
+
kind: 'in_process_session_exists';
|
|
220
|
+
message: string;
|
|
221
|
+
canonicalPathKey: string;
|
|
222
|
+
holderSessionId: string;
|
|
223
|
+
lockFilePath?: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface AdvisoryLockConflictError {
|
|
227
|
+
code: 'lock_conflict';
|
|
228
|
+
kind: 'advisory_lock_conflict';
|
|
229
|
+
message: string;
|
|
230
|
+
canonicalPathKey: string;
|
|
231
|
+
holderSessionId?: string;
|
|
232
|
+
lockFilePath: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface SavePartialFailureError {
|
|
236
|
+
code: 'save_partial_failure';
|
|
237
|
+
message: string;
|
|
238
|
+
sessionId: string;
|
|
239
|
+
canonicalPathKey: string;
|
|
240
|
+
attemptedRevision: number;
|
|
241
|
+
lastSavedRevision: number;
|
|
242
|
+
committedPaths: string[];
|
|
243
|
+
failedPaths: string[];
|
|
244
|
+
diskMayBePartiallyUpdated: true;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface UamFidelityUnsupportedError {
|
|
248
|
+
code: 'uam_fidelity_unsupported';
|
|
249
|
+
message: string;
|
|
250
|
+
sessionId: string;
|
|
251
|
+
canonicalPathKey: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface MaterializeValidationFailedError {
|
|
255
|
+
code: 'materialize_validation_failed';
|
|
256
|
+
message: string;
|
|
257
|
+
sessionId: string;
|
|
258
|
+
canonicalPathKey: string;
|
|
259
|
+
issueCount: number;
|
|
260
|
+
diagnostics: BackendDiagnostic[];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface MaterializeWriteFailedError {
|
|
264
|
+
code: 'write_failed';
|
|
265
|
+
message: string;
|
|
266
|
+
sessionId: string;
|
|
267
|
+
canonicalPathKey: string;
|
|
268
|
+
attemptedRevision: number;
|
|
269
|
+
lastSavedRevision: number;
|
|
270
|
+
writtenPaths: string[];
|
|
271
|
+
failedPaths: string[];
|
|
272
|
+
skippedPaths: string[];
|
|
273
|
+
diagnostics: BackendDiagnostic[];
|
|
274
|
+
diskMayBePartiallyUpdated: true;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export type BackendEventKind =
|
|
278
|
+
| 'session.opened'
|
|
279
|
+
| 'transaction.applied'
|
|
280
|
+
| 'transaction.rejected'
|
|
281
|
+
| 'save.started'
|
|
282
|
+
| 'save.completed'
|
|
283
|
+
| 'save.failed'
|
|
284
|
+
| 'session.closeRequested'
|
|
285
|
+
| 'session.closed'
|
|
286
|
+
| 'cache.invalidated'
|
|
287
|
+
| 'cache.updated'
|
|
288
|
+
| 'job.created'
|
|
289
|
+
| 'job.started'
|
|
290
|
+
| 'job.progress'
|
|
291
|
+
| 'job.cancelRequested'
|
|
292
|
+
| 'job.cancelled'
|
|
293
|
+
| 'job.completed'
|
|
294
|
+
| 'job.failed';
|
|
295
|
+
|
|
296
|
+
export interface BackendEvent {
|
|
297
|
+
sequence: number;
|
|
298
|
+
kind: BackendEventKind;
|
|
299
|
+
timestamp: string;
|
|
300
|
+
sessionId?: string;
|
|
301
|
+
canonicalPathKey?: string;
|
|
302
|
+
revision?: number;
|
|
303
|
+
cacheRevision?: number;
|
|
304
|
+
jobId?: string;
|
|
305
|
+
diagnostics: BackendDiagnostic[];
|
|
306
|
+
payload?: unknown;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface GetEventsInput {
|
|
310
|
+
sessionId: string;
|
|
311
|
+
after?: string;
|
|
312
|
+
limit?: number;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface GetEventsSnapshot {
|
|
316
|
+
events: BackendEvent[];
|
|
317
|
+
oldestSequence: number;
|
|
318
|
+
currentSequence: number;
|
|
319
|
+
cursorExpired: boolean;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface EventCursorInvalidError {
|
|
323
|
+
code: 'event_cursor_invalid';
|
|
324
|
+
message: string;
|
|
325
|
+
sessionId: string;
|
|
326
|
+
after: string;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export type BackendJobStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
330
|
+
export type BackendJobKind = 'cache.refresh';
|
|
331
|
+
export type BackendJobListStatusFilter = BackendJobStatus | 'active' | 'terminal';
|
|
332
|
+
|
|
333
|
+
export interface BackendJobProgress {
|
|
334
|
+
completed: number;
|
|
335
|
+
total?: number;
|
|
336
|
+
message?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface BackendJobSnapshot {
|
|
340
|
+
jobId: string;
|
|
341
|
+
kind: BackendJobKind;
|
|
342
|
+
status: BackendJobStatus;
|
|
343
|
+
createdAt: string;
|
|
344
|
+
startedAt?: string;
|
|
345
|
+
finishedAt?: string;
|
|
346
|
+
sessionId?: string;
|
|
347
|
+
canonicalPathKey?: string;
|
|
348
|
+
revision?: number;
|
|
349
|
+
cacheRevision?: number;
|
|
350
|
+
diagnostics: BackendDiagnostic[];
|
|
351
|
+
progress?: BackendJobProgress;
|
|
352
|
+
result?: unknown;
|
|
353
|
+
error?: BackendError;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export interface BackendJobListSnapshot {
|
|
357
|
+
jobs: BackendJobSnapshot[];
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface GetJobInput {
|
|
361
|
+
sessionId: string;
|
|
362
|
+
jobId: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface ListJobsInput {
|
|
366
|
+
sessionId: string;
|
|
367
|
+
status?: BackendJobListStatusFilter;
|
|
368
|
+
kind?: BackendJobKind;
|
|
369
|
+
limit?: number;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface CancelJobInput {
|
|
373
|
+
sessionId: string;
|
|
374
|
+
jobId: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface BackendJobNotFoundError {
|
|
378
|
+
code: 'job_not_found';
|
|
379
|
+
message: string;
|
|
380
|
+
sessionId: string;
|
|
381
|
+
jobId: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface BackendJobNotCancellableError {
|
|
385
|
+
code: 'job_not_cancellable';
|
|
386
|
+
message: string;
|
|
387
|
+
sessionId: string;
|
|
388
|
+
jobId: string;
|
|
389
|
+
status: 'completed' | 'failed' | 'cancelled';
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export interface BackendJobCancelledError {
|
|
393
|
+
code: 'job_cancelled';
|
|
394
|
+
message: string;
|
|
395
|
+
sessionId: string;
|
|
396
|
+
jobId: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface CacheRefreshFailedError {
|
|
400
|
+
code: 'cache_refresh_failed';
|
|
401
|
+
message: string;
|
|
402
|
+
sessionId: string;
|
|
403
|
+
jobId: string;
|
|
404
|
+
causeCode?: string;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface BackendCapabilityUnavailableError {
|
|
408
|
+
code: 'capability_unavailable';
|
|
409
|
+
message: string;
|
|
410
|
+
capability: 'fileSystem' | 'artifact.publish' | 'artifact.restore';
|
|
411
|
+
requiredAdapter?: 'BackendFileSystem';
|
|
412
|
+
requiredHost?: 'node';
|
|
413
|
+
bridgeBoundary?: 'external-bridge';
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export type BackendJobErrors =
|
|
417
|
+
| BackendJobNotFoundError
|
|
418
|
+
| BackendJobNotCancellableError
|
|
419
|
+
| BackendJobCancelledError
|
|
420
|
+
| CacheRefreshFailedError;
|
|
421
|
+
|
|
422
|
+
export interface BackendCacheSnapshot {
|
|
423
|
+
cacheRevision: number;
|
|
424
|
+
entries: BackendCacheEntry[];
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface BackendCacheEntry {
|
|
428
|
+
canonicalPathKey: string;
|
|
429
|
+
sessionId?: string;
|
|
430
|
+
revision: number;
|
|
431
|
+
lastSavedRevision: number;
|
|
432
|
+
dirty: boolean;
|
|
433
|
+
valid: boolean;
|
|
434
|
+
indexedAt: string;
|
|
435
|
+
summary: {
|
|
436
|
+
resourceCount: number;
|
|
437
|
+
packageCount?: number;
|
|
438
|
+
diagnostics: BackendDiagnostic[];
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface GetCacheSnapshotInput {
|
|
443
|
+
sessionId: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export interface RefreshCacheInput {
|
|
447
|
+
sessionId: string;
|
|
448
|
+
reason?: 'manual' | 'session_open' | 'after_save';
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export type BackendError =
|
|
452
|
+
| SessionNotFoundError
|
|
453
|
+
| SessionStaleWriteError
|
|
454
|
+
| InProcessLockConflictError
|
|
455
|
+
| AdvisoryLockConflictError
|
|
456
|
+
| SavePartialFailureError
|
|
457
|
+
| UamFidelityUnsupportedError
|
|
458
|
+
| MaterializeValidationFailedError
|
|
459
|
+
| MaterializeWriteFailedError
|
|
460
|
+
| PathPolicyViolationError
|
|
461
|
+
| EventCursorInvalidError
|
|
462
|
+
| BackendJobNotFoundError
|
|
463
|
+
| BackendJobNotCancellableError
|
|
464
|
+
| BackendJobCancelledError
|
|
465
|
+
| CacheRefreshFailedError
|
|
466
|
+
| BackendCapabilityUnavailableError
|
|
467
|
+
| ApplyUamTransactionAppError;
|
|
468
|
+
|
|
469
|
+
export interface ApplySessionTransactionInput {
|
|
470
|
+
sessionId: string;
|
|
471
|
+
expectedRevision: number;
|
|
472
|
+
operations: UamTransactionOperation[];
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export interface OpenProjectSessionInput {
|
|
476
|
+
project: UamProject;
|
|
477
|
+
sessionId?: string;
|
|
478
|
+
canonicalProjectPath?: string;
|
|
479
|
+
canonicalPathKey?: string;
|
|
480
|
+
storage?: BackendProjectSessionStorage;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export interface BackendProjectSessionStorage {
|
|
484
|
+
fileSystem: BackendFileSystem;
|
|
485
|
+
fairyPath: string;
|
|
486
|
+
canonicalProjectPath?: string;
|
|
487
|
+
canonicalPathKey?: string;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export interface SaveSessionInput {
|
|
491
|
+
sessionId: string;
|
|
492
|
+
expectedRevision?: number;
|
|
493
|
+
targetPath?: string;
|
|
494
|
+
fileSystem?: BackendFileSystem;
|
|
495
|
+
force?: boolean;
|
|
496
|
+
mode?: 'materializeCleanSession';
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export interface MaterializeSessionInput {
|
|
500
|
+
sessionId: string;
|
|
501
|
+
expectedRevision?: number;
|
|
502
|
+
storage?: BackendProjectSessionStorage;
|
|
503
|
+
targetPath?: string;
|
|
504
|
+
fileSystem?: BackendFileSystem;
|
|
505
|
+
mode?: 'fullProject';
|
|
506
|
+
reason?: string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface BackendRuntimeOptions {
|
|
510
|
+
fileSystem?: BackendFileSystem;
|
|
511
|
+
host?: BackendHostAdapter;
|
|
512
|
+
}
|