@noldova/checkpoints.protocol 0.0.3 → 0.0.5
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 +1 -1
- package/package.json +5 -4
- package/src/api/index.d.ts +189 -28
- package/src/api/index.js +3 -0
- package/src/api/index.js.map +1 -1
- package/src/exceptions/capture-content-mismatch.exception.js +17 -0
- package/src/exceptions/capture-content-mismatch.exception.js.map +1 -0
- package/src/exceptions/earlier-paths-mismatch.exception.js +17 -0
- package/src/exceptions/earlier-paths-mismatch.exception.js.map +1 -0
- package/src/exceptions/restore-content-mismatch.exception.js +17 -0
- package/src/exceptions/restore-content-mismatch.exception.js.map +1 -0
- package/src/models/capture-mode.js +2 -1
- package/src/models/capture-mode.js.map +1 -1
- package/src/models/capture-outcome.js +4 -2
- package/src/models/capture-outcome.js.map +1 -1
- package/src/models/capture-request.js +19 -5
- package/src/models/capture-request.js.map +1 -1
- package/src/models/capture-result.js +23 -9
- package/src/models/capture-result.js.map +1 -1
- package/src/models/change-side.js +3 -2
- package/src/models/change-side.js.map +1 -1
- package/src/models/change-status.js +2 -1
- package/src/models/change-status.js.map +1 -1
- package/src/models/change.js +7 -6
- package/src/models/change.js.map +1 -1
- package/src/models/checkpoint.js +3 -6
- package/src/models/checkpoint.js.map +1 -1
- package/src/models/compare-outcome.js +2 -1
- package/src/models/compare-outcome.js.map +1 -1
- package/src/models/compare-request.js +2 -1
- package/src/models/compare-request.js.map +1 -1
- package/src/models/delete-folder-outcome.js +2 -1
- package/src/models/delete-folder-outcome.js.map +1 -1
- package/src/models/diff-target.js +2 -1
- package/src/models/diff-target.js.map +1 -1
- package/src/models/folder-usage.js +2 -1
- package/src/models/folder-usage.js.map +1 -1
- package/src/models/keep-reason.js +4 -2
- package/src/models/keep-reason.js.map +1 -1
- package/src/models/path-kind.js +2 -1
- package/src/models/path-kind.js.map +1 -1
- package/src/models/preview-outcome.js +2 -1
- package/src/models/preview-outcome.js.map +1 -1
- package/src/models/preview-result.js +4 -3
- package/src/models/preview-result.js.map +1 -1
- package/src/models/read-outcome.js +2 -1
- package/src/models/read-outcome.js.map +1 -1
- package/src/models/read-request.js +3 -2
- package/src/models/read-request.js.map +1 -1
- package/src/models/restore-action.js +2 -1
- package/src/models/restore-action.js.map +1 -1
- package/src/models/restore-outcome.js +5 -2
- package/src/models/restore-outcome.js.map +1 -1
- package/src/models/restore-plan.js +13 -4
- package/src/models/restore-plan.js.map +1 -1
- package/src/models/restore-result.js +23 -6
- package/src/models/restore-result.js.map +1 -1
- package/src/models/restore-step.js +5 -4
- package/src/models/restore-step.js.map +1 -1
- package/src/models/unread-path.js +2 -1
- package/src/models/unread-path.js.map +1 -1
- package/src/models/unread-reason.js +4 -2
- package/src/models/unread-reason.js.map +1 -1
- package/src/resources.js +15 -2
- package/src/resources.js.map +1 -1
- package/src/services/scope-paths.js +3 -2
- package/src/services/scope-paths.js.map +1 -1
- package/src/services/wire-form.js +15 -4
- package/src/services/wire-form.js.map +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The protocol of the checkpoints module's runtime methods: their requests, results and events, with the folders and checkpoints they name, and their JSON forms.
|
|
4
4
|
Each model reads its JSON form through `@noldova/context.json`'s `JsonReader` and refuses a field it doesn't have; a value that isn't its JSON form throws context's `JsonException`, whose path starts at the model's name, such as `ReadRequest.limit`.
|
|
5
5
|
A model built from values it refuses throws a subclass of `ProtocolException`, such as `InvalidCheckpointIdException`.
|
|
6
|
-
It takes `@noldova/context.exceptions` and `@noldova/context.json` as peers.
|
|
6
|
+
It takes `@noldova/context.core`, `@noldova/context.exceptions` and `@noldova/context.json` as peers.
|
|
7
7
|
|
|
8
8
|
[`@noldova/checkpoints`](https://www.npmjs.com/package/@noldova/checkpoints) depends on it and pins it at its own version; an app that calls the module's methods builds their requests and reads their results with it.
|
|
9
9
|
[documents/ARCHITECTURE.md](https://github.com/noldova-com/checkpoints/blob/main/documents/ARCHITECTURE.md) says what each method does, and the [README](https://github.com/noldova-com/checkpoints#readme) how to build and test it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noldova/checkpoints.protocol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "The checkpoints module's protocol: the requests, results and events of its runtime methods, with the folders and checkpoints they name.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,8 +30,9 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@noldova/context.
|
|
34
|
-
"@noldova/context.
|
|
33
|
+
"@noldova/context.core": ">=0.0.18 <0.1.0",
|
|
34
|
+
"@noldova/context.exceptions": ">=0.0.18 <0.1.0",
|
|
35
|
+
"@noldova/context.json": ">=0.0.18 <0.1.0"
|
|
35
36
|
},
|
|
36
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "f195c110c2f32f8cc3fca566a9ac332a403e9a07"
|
|
37
38
|
}
|
package/src/api/index.d.ts
CHANGED
|
@@ -70,6 +70,30 @@ export declare class CaptureCheckpointMismatchException extends ProtocolExceptio
|
|
|
70
70
|
public constructor(outcome: CaptureOutcome);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Thrown when a capture result holds the content size and its limit other than exactly when its outcome is TooLarge.
|
|
75
|
+
*/
|
|
76
|
+
export declare class CaptureContentMismatchException extends ProtocolException {
|
|
77
|
+
/**
|
|
78
|
+
* The outcome the result was given.
|
|
79
|
+
*/
|
|
80
|
+
public readonly outcome: CaptureOutcome;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Formats the exception's message from its facts.
|
|
84
|
+
*
|
|
85
|
+
* @param outcome The outcome the result was given.
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* import { CaptureContentMismatchException, CaptureOutcome } from "@noldova/checkpoints.protocol";
|
|
89
|
+
*
|
|
90
|
+
* const exception = new CaptureContentMismatchException(CaptureOutcome.Captured);
|
|
91
|
+
* console.log(exception.message, exception.outcome);
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
public constructor(outcome: CaptureOutcome);
|
|
95
|
+
}
|
|
96
|
+
|
|
73
97
|
/**
|
|
74
98
|
* Thrown when a capture result holds the space free and the space needed other than exactly when its outcome is LowDiskSpace.
|
|
75
99
|
*/
|
|
@@ -142,6 +166,30 @@ export declare class CompareChangesMismatchException extends ProtocolException {
|
|
|
142
166
|
public constructor(outcome: CompareOutcome);
|
|
143
167
|
}
|
|
144
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Thrown when a restore plan names an earlier path that none of its steps writes, or names one twice.
|
|
171
|
+
*/
|
|
172
|
+
export declare class EarlierPathsMismatchException extends ProtocolException {
|
|
173
|
+
/**
|
|
174
|
+
* The earlier path the plan refused.
|
|
175
|
+
*/
|
|
176
|
+
public readonly path: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Formats the exception's message from its facts.
|
|
180
|
+
*
|
|
181
|
+
* @param path The earlier path the plan refused.
|
|
182
|
+
* @example
|
|
183
|
+
* ```ts
|
|
184
|
+
* import { EarlierPathsMismatchException } from "@noldova/checkpoints.protocol";
|
|
185
|
+
*
|
|
186
|
+
* const exception = new EarlierPathsMismatchException("src/a.txt");
|
|
187
|
+
* console.log(exception.message, exception.path);
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
public constructor(path: string);
|
|
191
|
+
}
|
|
192
|
+
|
|
145
193
|
/**
|
|
146
194
|
* Thrown when a read result's content is longer than its size.
|
|
147
195
|
*/
|
|
@@ -255,7 +303,7 @@ export declare class InvalidFolderPathException extends ProtocolException {
|
|
|
255
303
|
}
|
|
256
304
|
|
|
257
305
|
/**
|
|
258
|
-
* Thrown when a folder's identity isn't 1 to 64 letters, digits or hyphens.
|
|
306
|
+
* Thrown when a folder's identity isn't 1 to 64 lower-case letters, digits or hyphens.
|
|
259
307
|
*/
|
|
260
308
|
export declare class InvalidIdentityException extends ProtocolException {
|
|
261
309
|
/**
|
|
@@ -519,6 +567,30 @@ export declare class RestoreCheckpointsMismatchException extends ProtocolExcepti
|
|
|
519
567
|
public constructor(outcome: RestoreOutcome);
|
|
520
568
|
}
|
|
521
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Thrown when a restore result holds the content size and its limit other than exactly when its outcome is TooLarge.
|
|
572
|
+
*/
|
|
573
|
+
export declare class RestoreContentMismatchException extends ProtocolException {
|
|
574
|
+
/**
|
|
575
|
+
* The outcome the result was given.
|
|
576
|
+
*/
|
|
577
|
+
public readonly outcome: RestoreOutcome;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Formats the exception's message from its facts.
|
|
581
|
+
*
|
|
582
|
+
* @param outcome The outcome the result was given.
|
|
583
|
+
* @example
|
|
584
|
+
* ```ts
|
|
585
|
+
* import { RestoreContentMismatchException, RestoreOutcome } from "@noldova/checkpoints.protocol";
|
|
586
|
+
*
|
|
587
|
+
* const exception = new RestoreContentMismatchException(RestoreOutcome.MovedOn);
|
|
588
|
+
* console.log(exception.message, exception.outcome);
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
public constructor(outcome: RestoreOutcome);
|
|
592
|
+
}
|
|
593
|
+
|
|
522
594
|
/**
|
|
523
595
|
* Thrown when a side has a size other than exactly when it isn't a folder, or is a folder taken as text.
|
|
524
596
|
*/
|
|
@@ -961,7 +1033,7 @@ export declare class CaptureOutcome {
|
|
|
961
1033
|
public static readonly Captured: CaptureOutcome;
|
|
962
1034
|
|
|
963
1035
|
/**
|
|
964
|
-
* The folder's path is missing, so no checkpoint was taken; a missing folder is never captured as empty.
|
|
1036
|
+
* The folder's path is missing, or the folder was deleted or renamed while it was walked, so no checkpoint was taken; a missing folder is never captured as empty.
|
|
965
1037
|
*/
|
|
966
1038
|
public static readonly FolderMissing: CaptureOutcome;
|
|
967
1039
|
|
|
@@ -976,6 +1048,12 @@ export declare class CaptureOutcome {
|
|
|
976
1048
|
*/
|
|
977
1049
|
public static readonly LowDiskSpace: CaptureOutcome;
|
|
978
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* The new and changed content the checkpoint would write is over 1 GiB, so no checkpoint was taken; the result says the content's size
|
|
1053
|
+
* and the limit. Nothing was written.
|
|
1054
|
+
*/
|
|
1055
|
+
public static readonly TooLarge: CaptureOutcome;
|
|
1056
|
+
|
|
979
1057
|
/**
|
|
980
1058
|
* Whether the capture took a checkpoint.
|
|
981
1059
|
*/
|
|
@@ -1034,6 +1112,11 @@ export declare class UnreadReason {
|
|
|
1034
1112
|
*/
|
|
1035
1113
|
public static readonly InvalidName: UnreadReason;
|
|
1036
1114
|
|
|
1115
|
+
/**
|
|
1116
|
+
* The file is over 10 MiB, more than a checkpoint keeps, so its content isn't read or kept; a restore leaves it as it is.
|
|
1117
|
+
*/
|
|
1118
|
+
public static readonly TooLarge: UnreadReason;
|
|
1119
|
+
|
|
1037
1120
|
/**
|
|
1038
1121
|
* The system gave an error reading the path that is about this one path only, such as a name too long for it, a network share that timed out,
|
|
1039
1122
|
* or a cloud file that isn't on the computer; {@link UnreadPath.code} holds the error's code.
|
|
@@ -1224,7 +1307,7 @@ export declare class Checkpoint {
|
|
|
1224
1307
|
*/
|
|
1225
1308
|
export declare class FolderReference {
|
|
1226
1309
|
/**
|
|
1227
|
-
* The identity the app owns, 1 to 64 letters, digits and `-`, such as a project's id.
|
|
1310
|
+
* The identity the app owns, 1 to 64 lower-case letters, digits and `-`, such as a project's id.
|
|
1228
1311
|
*/
|
|
1229
1312
|
public readonly identity: string;
|
|
1230
1313
|
|
|
@@ -1236,7 +1319,7 @@ export declare class FolderReference {
|
|
|
1236
1319
|
/**
|
|
1237
1320
|
* @param identity The identity the app owns.
|
|
1238
1321
|
* @param path The folder's absolute path on this device now.
|
|
1239
|
-
* @throws {ProtocolException} Thrown synchronously when the identity isn't 1 to 64 letters, digits and `-`, or the path isn't absolute.
|
|
1322
|
+
* @throws {ProtocolException} Thrown synchronously when the identity isn't 1 to 64 lower-case letters, digits and `-`, or the path isn't absolute.
|
|
1240
1323
|
* @example
|
|
1241
1324
|
* ```ts
|
|
1242
1325
|
* import { FolderReference } from "@noldova/checkpoints.protocol";
|
|
@@ -1286,6 +1369,17 @@ export declare class CaptureRequest {
|
|
|
1286
1369
|
*/
|
|
1287
1370
|
public static readonly method: string;
|
|
1288
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* The time the checkpoint stands for, such as when an agent's turn started, or `null` for the folder as the capture reads it. A file
|
|
1374
|
+
* whose modification or change time is at or after it, less 2 seconds for file systems that keep times to 2 seconds, isn't read, nor is
|
|
1375
|
+
* one gone, rewritten or retargeted by the time it's read, nor one gone from a folder changed at or after it, nor one replaced by such a
|
|
1376
|
+
* folder: the checkpoint keeps the earlier checkpoint's copy,
|
|
1377
|
+
* or leaves the file out when that has none. So a capture taken beside the turn, which finishes after the turn changed files, keeps
|
|
1378
|
+
* the folder as the turn began, but for a file changed both since the earlier checkpoint and as the turn began, which it keeps as the
|
|
1379
|
+
* earlier checkpoint had it.
|
|
1380
|
+
*/
|
|
1381
|
+
public readonly asOf: Date | null;
|
|
1382
|
+
|
|
1289
1383
|
/**
|
|
1290
1384
|
* The folder to take a checkpoint of.
|
|
1291
1385
|
*/
|
|
@@ -1296,10 +1390,24 @@ export declare class CaptureRequest {
|
|
|
1296
1390
|
*/
|
|
1297
1391
|
public readonly label: string | null;
|
|
1298
1392
|
|
|
1393
|
+
/**
|
|
1394
|
+
* The paths the capture is limited to, relative to the folder with "/" between names, or `null` for the whole folder. Each must equal
|
|
1395
|
+
* the module's own path for it exactly, letter case and Unicode normalisation included; one holding "\" is refused on every system. The
|
|
1396
|
+
* checkpoint holds each path, and everything at or under one that is a folder, as the capture reads it, an absent path as absent, and
|
|
1397
|
+
* every other path as the newest checkpoint held it; the content limit and the free space count only what the capture reads. A preview
|
|
1398
|
+
* or restore of the checkpoint changes only those paths. The wire form holds the paths, as `null` for the whole folder, and a wire form
|
|
1399
|
+
* without them reads as `null`.
|
|
1400
|
+
*/
|
|
1401
|
+
public readonly paths: readonly string[] | null;
|
|
1402
|
+
|
|
1299
1403
|
/**
|
|
1300
1404
|
* @param folder The folder to take a checkpoint of.
|
|
1301
1405
|
* @param label The label to attach, of up to 1,024 characters, or `null`.
|
|
1302
|
-
* @
|
|
1406
|
+
* @param asOf The time the checkpoint stands for, or `null`, the default, for the folder as the capture reads it; the request keeps a
|
|
1407
|
+
* copy.
|
|
1408
|
+
* @param paths The paths the capture is limited to, or `null`, the default, for the whole folder; the request keeps a copy.
|
|
1409
|
+
* @throws {ProtocolException} Thrown synchronously when the label is longer than 1,024 characters, the time is no date, or a path has
|
|
1410
|
+
* an empty name, "." or "..", or holds "\" on any system.
|
|
1303
1411
|
* @example
|
|
1304
1412
|
* ```ts
|
|
1305
1413
|
* import { CaptureRequest, FolderReference } from "@noldova/checkpoints.protocol";
|
|
@@ -1308,7 +1416,7 @@ export declare class CaptureRequest {
|
|
|
1308
1416
|
* console.log(CaptureRequest.method, request.toJson());
|
|
1309
1417
|
* ```
|
|
1310
1418
|
*/
|
|
1311
|
-
public constructor(folder: FolderReference, label: string | null);
|
|
1419
|
+
public constructor(folder: FolderReference, label: string | null, asOf?: Date | null, paths?: readonly string[] | null);
|
|
1312
1420
|
|
|
1313
1421
|
/**
|
|
1314
1422
|
* Reads a request from its wire form.
|
|
@@ -1322,7 +1430,7 @@ export declare class CaptureRequest {
|
|
|
1322
1430
|
* import { CaptureRequest } from "@noldova/checkpoints.protocol";
|
|
1323
1431
|
*
|
|
1324
1432
|
* const folderJson = { identity: "project-1", path: "/work/project" };
|
|
1325
|
-
* const request = CaptureRequest.fromJson({ folder: folderJson, label: null });
|
|
1433
|
+
* const request = CaptureRequest.fromJson({ folder: folderJson, label: null, asOf: "2026-11-19T03:30:00.000Z" });
|
|
1326
1434
|
* console.log(request.label);
|
|
1327
1435
|
* ```
|
|
1328
1436
|
*/
|
|
@@ -1344,7 +1452,7 @@ export declare class CaptureRequest {
|
|
|
1344
1452
|
|
|
1345
1453
|
/**
|
|
1346
1454
|
* What a capture did: the checkpoint it took, or why it took none, with the space free and the space needed when it took none for want
|
|
1347
|
-
* of space.
|
|
1455
|
+
* of space, and the content's size and its limit when it took none for having too much to write.
|
|
1348
1456
|
*/
|
|
1349
1457
|
export declare class CaptureResult {
|
|
1350
1458
|
/**
|
|
@@ -1352,6 +1460,16 @@ export declare class CaptureResult {
|
|
|
1352
1460
|
*/
|
|
1353
1461
|
public readonly checkpoint: Checkpoint | null;
|
|
1354
1462
|
|
|
1463
|
+
/**
|
|
1464
|
+
* The most new and changed content a checkpoint writes, 1 GiB, when the outcome is `TooLarge`, or `null`.
|
|
1465
|
+
*/
|
|
1466
|
+
public readonly contentLimit: number | null;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* The bytes of new and changed content the checkpoint would have written, when the outcome is `TooLarge`, or `null`.
|
|
1470
|
+
*/
|
|
1471
|
+
public readonly contentSize: number | null;
|
|
1472
|
+
|
|
1355
1473
|
/**
|
|
1356
1474
|
* Whether the capture took a checkpoint.
|
|
1357
1475
|
*/
|
|
@@ -1372,8 +1490,10 @@ export declare class CaptureResult {
|
|
|
1372
1490
|
* @param checkpoint The checkpoint taken, or `null` when none was.
|
|
1373
1491
|
* @param spaceFree The bytes free, when the outcome is `LowDiskSpace`, or `null`.
|
|
1374
1492
|
* @param spaceNeeded The bytes needed, when the outcome is `LowDiskSpace`, or `null`.
|
|
1375
|
-
* @
|
|
1376
|
-
*
|
|
1493
|
+
* @param contentSize The bytes of content to write, when the outcome is `TooLarge`, or `null`, the default.
|
|
1494
|
+
* @param contentLimit The content limit in bytes, when the outcome is `TooLarge`, or `null`, the default.
|
|
1495
|
+
* @throws {ProtocolException} Thrown synchronously when the outcome and the checkpoint, the space or the content disagree, or a size
|
|
1496
|
+
* isn't a whole number of bytes.
|
|
1377
1497
|
* @example
|
|
1378
1498
|
* ```ts
|
|
1379
1499
|
* import { CaptureOutcome, CaptureResult } from "@noldova/checkpoints.protocol";
|
|
@@ -1382,7 +1502,9 @@ export declare class CaptureResult {
|
|
|
1382
1502
|
* console.log(result.spaceNeeded);
|
|
1383
1503
|
* ```
|
|
1384
1504
|
*/
|
|
1385
|
-
public constructor(
|
|
1505
|
+
public constructor(
|
|
1506
|
+
outcome: CaptureOutcome, checkpoint: Checkpoint | null, spaceFree: number | null, spaceNeeded: number | null, contentSize?: number | null,
|
|
1507
|
+
contentLimit?: number | null);
|
|
1386
1508
|
|
|
1387
1509
|
/**
|
|
1388
1510
|
* Reads a result from its wire form.
|
|
@@ -1395,7 +1517,9 @@ export declare class CaptureResult {
|
|
|
1395
1517
|
* ```ts
|
|
1396
1518
|
* import { CaptureResult } from "@noldova/checkpoints.protocol";
|
|
1397
1519
|
*
|
|
1398
|
-
* const result = CaptureResult.fromJson({
|
|
1520
|
+
* const result = CaptureResult.fromJson({
|
|
1521
|
+
* outcome: "FolderMissing", checkpoint: null, spaceFree: null, spaceNeeded: null, contentSize: null, contentLimit: null
|
|
1522
|
+
* });
|
|
1399
1523
|
* console.log(result.outcome.isCaptured);
|
|
1400
1524
|
* ```
|
|
1401
1525
|
*/
|
|
@@ -1797,7 +1921,7 @@ export declare class CompareOutcome {
|
|
|
1797
1921
|
public static readonly Compared: CompareOutcome;
|
|
1798
1922
|
|
|
1799
1923
|
/**
|
|
1800
|
-
* The comparison was with the folder now, and the folder's path is missing; a missing folder is never compared as empty.
|
|
1924
|
+
* The comparison was with the folder now, and the folder's path is missing, or the folder was deleted or renamed while it was walked; a missing folder is never compared as empty.
|
|
1801
1925
|
*/
|
|
1802
1926
|
public static readonly FolderMissing: CompareOutcome;
|
|
1803
1927
|
|
|
@@ -2350,6 +2474,11 @@ export declare class KeepReason {
|
|
|
2350
2474
|
*/
|
|
2351
2475
|
public static readonly LinkUnsupported: KeepReason;
|
|
2352
2476
|
|
|
2477
|
+
/**
|
|
2478
|
+
* The checkpoint didn't keep the file, since it was over 10 MiB when the checkpoint was taken.
|
|
2479
|
+
*/
|
|
2480
|
+
public static readonly TooLarge: KeepReason;
|
|
2481
|
+
|
|
2353
2482
|
/**
|
|
2354
2483
|
* The reason's wire value.
|
|
2355
2484
|
*/
|
|
@@ -2527,6 +2656,13 @@ export declare class RestorePlan {
|
|
|
2527
2656
|
*/
|
|
2528
2657
|
public readonly checkpoint: string;
|
|
2529
2658
|
|
|
2659
|
+
/**
|
|
2660
|
+
* The paths among the steps' that the restore writes as the earlier checkpoint had them, since they changed as the checkpoint's time
|
|
2661
|
+
* began, in their paths' byte order; such a file, if the person also changed it since the earlier checkpoint, comes back as it was
|
|
2662
|
+
* then rather than as the checkpoint's time found it.
|
|
2663
|
+
*/
|
|
2664
|
+
public readonly earlierPaths: readonly string[];
|
|
2665
|
+
|
|
2530
2666
|
/**
|
|
2531
2667
|
* The paths the restore is limited to, as its preview asked, or `null` for the whole folder; the restore plans again with them. The
|
|
2532
2668
|
* wire form always holds the paths, as `null` for the whole folder, and a wire form without them is refused.
|
|
@@ -2562,8 +2698,10 @@ export declare class RestorePlan {
|
|
|
2562
2698
|
* @param spaceNeeded The free space in bytes the restore needs.
|
|
2563
2699
|
* @param state The SHA-256 of the folder's state when planned.
|
|
2564
2700
|
* @param paths The paths the restore is limited to, or `null` for the whole folder.
|
|
2701
|
+
* @param earlierPaths The steps' paths that the restore writes as the earlier checkpoint had them; none by default.
|
|
2565
2702
|
* @throws {ProtocolException} Thrown synchronously when the id isn't a lowercase UUID version 7, a size isn't a whole number of 0 or
|
|
2566
|
-
* more, the state isn't a lowercase SHA-256 in hexadecimal,
|
|
2703
|
+
* more, the state isn't a lowercase SHA-256 in hexadecimal, a path has an empty name, "." or "..", or holds "\" on any system, or an
|
|
2704
|
+
* earlier path is no step's or is named twice.
|
|
2567
2705
|
* @example
|
|
2568
2706
|
* ```ts
|
|
2569
2707
|
* import { KeepReason, KeptPath, RestorePlan } from "@noldova/checkpoints.protocol";
|
|
@@ -2576,7 +2714,7 @@ export declare class RestorePlan {
|
|
|
2576
2714
|
*/
|
|
2577
2715
|
public constructor(
|
|
2578
2716
|
checkpoint: string, steps: readonly RestoreStep[], stays: readonly KeptPath[], bytesToWrite: number, spaceNeeded: number, state: string,
|
|
2579
|
-
paths: readonly string[] | null);
|
|
2717
|
+
paths: readonly string[] | null, earlierPaths?: readonly string[]);
|
|
2580
2718
|
|
|
2581
2719
|
/**
|
|
2582
2720
|
* Reads a plan from its wire form.
|
|
@@ -2591,7 +2729,9 @@ export declare class RestorePlan {
|
|
|
2591
2729
|
*
|
|
2592
2730
|
* const id = "01928f6e-7a3b-7c4d-8e5f-0a1b2c3d4e5f";
|
|
2593
2731
|
* const state = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
2594
|
-
* const plan = RestorePlan.fromJson({
|
|
2732
|
+
* const plan = RestorePlan.fromJson({
|
|
2733
|
+
* checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: ["src"], earlierPaths: []
|
|
2734
|
+
* });
|
|
2595
2735
|
* console.log(plan.paths);
|
|
2596
2736
|
* ```
|
|
2597
2737
|
*/
|
|
@@ -2627,7 +2767,7 @@ export declare class PreviewOutcome {
|
|
|
2627
2767
|
public static readonly CheckpointMissing: PreviewOutcome;
|
|
2628
2768
|
|
|
2629
2769
|
/**
|
|
2630
|
-
* The folder's path is missing.
|
|
2770
|
+
* The folder's path is missing, or the folder was deleted or renamed while it was walked.
|
|
2631
2771
|
*/
|
|
2632
2772
|
public static readonly FolderMissing: PreviewOutcome;
|
|
2633
2773
|
|
|
@@ -2700,7 +2840,8 @@ export declare class PreviewRequest {
|
|
|
2700
2840
|
* the module's own path for it exactly, as a comparison gives it, letter case and Unicode normalisation included; one holding "\"
|
|
2701
2841
|
* is refused on every system. The wire form always holds the paths, as `null` for the whole folder, and a wire form without them is
|
|
2702
2842
|
* refused. The plan changes only paths at or under one of them, and a folder above one that the checkpoint holds as a folder and the
|
|
2703
|
-
* folder now holds as something else; everything else stays as it is now and is left out of the plan's state.
|
|
2843
|
+
* folder now holds as something else; everything else stays as it is now and is left out of the plan's state. A checkpoint captured
|
|
2844
|
+
* with paths is restored only at or under those, whatever paths the preview gives.
|
|
2704
2845
|
*/
|
|
2705
2846
|
public readonly paths: readonly string[] | null;
|
|
2706
2847
|
|
|
@@ -2835,7 +2976,7 @@ export declare class RestoreOutcome {
|
|
|
2835
2976
|
public static readonly CheckpointMissing: RestoreOutcome;
|
|
2836
2977
|
|
|
2837
2978
|
/**
|
|
2838
|
-
* The folder's path is missing.
|
|
2979
|
+
* The folder's path is missing, or the folder was deleted or renamed while it was walked; nothing was restored.
|
|
2839
2980
|
*/
|
|
2840
2981
|
public static readonly FolderMissing: RestoreOutcome;
|
|
2841
2982
|
|
|
@@ -2855,6 +2996,12 @@ export declare class RestoreOutcome {
|
|
|
2855
2996
|
*/
|
|
2856
2997
|
public static readonly RolledBack: RestoreOutcome;
|
|
2857
2998
|
|
|
2999
|
+
/**
|
|
3000
|
+
* The checkpoint taken before the restore would write over 1 GiB of new and changed content, so it wasn't taken and nothing was
|
|
3001
|
+
* changed; the result gives that size and the limit.
|
|
3002
|
+
*/
|
|
3003
|
+
public static readonly TooLarge: RestoreOutcome;
|
|
3004
|
+
|
|
2858
3005
|
/**
|
|
2859
3006
|
* Whether the restore finished.
|
|
2860
3007
|
*/
|
|
@@ -2943,7 +3090,7 @@ export declare class RestoreRequest {
|
|
|
2943
3090
|
* const id = "01928f6e-7a3b-7c4d-8e5f-0a1b2c3d4e5f";
|
|
2944
3091
|
* const state = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
2945
3092
|
* const folderJson = { identity: "project-1", path: "/work/project" };
|
|
2946
|
-
* const request = RestoreRequest.fromJson({ folder: folderJson, plan: { checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: null } });
|
|
3093
|
+
* const request = RestoreRequest.fromJson({ folder: folderJson, plan: { checkpoint: id, steps: [], stays: [], bytesToWrite: 0, spaceNeeded: 0, state, paths: null, earlierPaths: [] } });
|
|
2947
3094
|
* console.log(request.plan.checkpoint);
|
|
2948
3095
|
* ```
|
|
2949
3096
|
*/
|
|
@@ -2976,6 +3123,17 @@ export declare class RestoreResult {
|
|
|
2976
3123
|
*/
|
|
2977
3124
|
public readonly before: Checkpoint | null;
|
|
2978
3125
|
|
|
3126
|
+
/**
|
|
3127
|
+
* The most new and changed content a checkpoint writes, 1 GiB, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`.
|
|
3128
|
+
*/
|
|
3129
|
+
public readonly contentLimit: number | null;
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* The bytes of new and changed content the checkpoint taken before the restore would have written, when the outcome is
|
|
3133
|
+
* {@link RestoreOutcome.TooLarge}, or `null`.
|
|
3134
|
+
*/
|
|
3135
|
+
public readonly contentSize: number | null;
|
|
3136
|
+
|
|
2979
3137
|
/**
|
|
2980
3138
|
* Whether the restore finished.
|
|
2981
3139
|
*/
|
|
@@ -2991,8 +3149,11 @@ export declare class RestoreResult {
|
|
|
2991
3149
|
* @param outcome Whether the restore finished.
|
|
2992
3150
|
* @param before The checkpoint taken before the restore, or `null`.
|
|
2993
3151
|
* @param recovered The checkpoint that keeps what another program wrote, or `null`.
|
|
3152
|
+
* @param contentSize The bytes of content to write, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`, the default.
|
|
3153
|
+
* @param contentLimit The content limit in bytes, when the outcome is {@link RestoreOutcome.TooLarge}, or `null`, the default.
|
|
2994
3154
|
* @throws {ProtocolException} Thrown synchronously when the result holds a checkpoint before other than exactly when its outcome is
|
|
2995
|
-
* {@link RestoreOutcome.Restored} or {@link RestoreOutcome.RolledBack},
|
|
3155
|
+
* {@link RestoreOutcome.Restored} or {@link RestoreOutcome.RolledBack}, a recovered one when it isn't Restored, or the content size
|
|
3156
|
+
* and its limit other than exactly when it is TooLarge, or a size isn't a whole number of bytes.
|
|
2996
3157
|
* @example
|
|
2997
3158
|
* ```ts
|
|
2998
3159
|
* import { RestoreOutcome, RestoreResult } from "@noldova/checkpoints.protocol";
|
|
@@ -3001,7 +3162,7 @@ export declare class RestoreResult {
|
|
|
3001
3162
|
* console.log(result.outcome.isRestored);
|
|
3002
3163
|
* ```
|
|
3003
3164
|
*/
|
|
3004
|
-
public constructor(outcome: RestoreOutcome, before: Checkpoint | null, recovered: Checkpoint | null);
|
|
3165
|
+
public constructor(outcome: RestoreOutcome, before: Checkpoint | null, recovered: Checkpoint | null, contentSize?: number | null, contentLimit?: number | null);
|
|
3005
3166
|
|
|
3006
3167
|
/**
|
|
3007
3168
|
* Reads a result from its wire form.
|
|
@@ -3014,7 +3175,7 @@ export declare class RestoreResult {
|
|
|
3014
3175
|
* ```ts
|
|
3015
3176
|
* import { RestoreResult } from "@noldova/checkpoints.protocol";
|
|
3016
3177
|
*
|
|
3017
|
-
* const result = RestoreResult.fromJson({ outcome: "HeldUp", before: null, recovered: null });
|
|
3178
|
+
* const result = RestoreResult.fromJson({ outcome: "HeldUp", before: null, recovered: null, contentSize: null, contentLimit: null });
|
|
3018
3179
|
* console.log(result.before);
|
|
3019
3180
|
* ```
|
|
3020
3181
|
*/
|
|
@@ -3105,7 +3266,7 @@ export declare class FolderUsage {
|
|
|
3105
3266
|
public readonly path: string | null;
|
|
3106
3267
|
|
|
3107
3268
|
/**
|
|
3108
|
-
* @param identity The identity, 1 to 64 letters, digits and `-`.
|
|
3269
|
+
* @param identity The identity, 1 to 64 lower-case letters, digits and `-`.
|
|
3109
3270
|
* @param path The folder's absolute path at its last capture, or `null`.
|
|
3110
3271
|
* @param bytes The space used, a whole number of bytes, 0 or more.
|
|
3111
3272
|
* @throws {ProtocolException} Thrown synchronously when the identity, the path or the size isn't valid.
|
|
@@ -3384,7 +3545,7 @@ export declare class RestoredEvent {
|
|
|
3384
3545
|
public readonly identity: string;
|
|
3385
3546
|
|
|
3386
3547
|
/**
|
|
3387
|
-
* @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
|
|
3548
|
+
* @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
|
|
3388
3549
|
* @param checkpoint The id of the checkpoint restored.
|
|
3389
3550
|
* @param before The id of the checkpoint taken before the restore.
|
|
3390
3551
|
* @throws {ProtocolException} Thrown synchronously when the identity or an id isn't one.
|
|
@@ -3460,7 +3621,7 @@ export declare class CapturePausedEvent {
|
|
|
3460
3621
|
public readonly spaceNeeded: number;
|
|
3461
3622
|
|
|
3462
3623
|
/**
|
|
3463
|
-
* @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
|
|
3624
|
+
* @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
|
|
3464
3625
|
* @param spaceFree The bytes free.
|
|
3465
3626
|
* @param spaceNeeded The bytes needed.
|
|
3466
3627
|
* @throws {ProtocolException} Thrown synchronously when the identity isn't one, or a size isn't a whole number of bytes.
|
|
@@ -3520,7 +3681,7 @@ export declare class CaptureResumedEvent {
|
|
|
3520
3681
|
public readonly identity: string;
|
|
3521
3682
|
|
|
3522
3683
|
/**
|
|
3523
|
-
* @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
|
|
3684
|
+
* @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
|
|
3524
3685
|
* @throws {ProtocolException} Thrown synchronously when the identity isn't one.
|
|
3525
3686
|
* @example
|
|
3526
3687
|
* ```ts
|
|
@@ -3583,7 +3744,7 @@ export declare class RestoreHeldUpEvent {
|
|
|
3583
3744
|
public readonly paths: readonly string[];
|
|
3584
3745
|
|
|
3585
3746
|
/**
|
|
3586
|
-
* @param identity The folder's identity, 1 to 64 letters, digits or hyphens.
|
|
3747
|
+
* @param identity The folder's identity, 1 to 64 lower-case letters, digits or hyphens.
|
|
3587
3748
|
* @param paths The paths the module couldn't change.
|
|
3588
3749
|
* @throws {ProtocolException} Thrown synchronously when the identity isn't one, or a path isn't relative to the folder.
|
|
3589
3750
|
* @example
|
package/src/api/index.js
CHANGED
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
export { CaptureCheckpointMismatchException } from "../exceptions/capture-checkpoint-mismatch.exception.js";
|
|
9
|
+
export { CaptureContentMismatchException } from "../exceptions/capture-content-mismatch.exception.js";
|
|
9
10
|
export { CaptureSpaceMismatchException } from "../exceptions/capture-space-mismatch.exception.js";
|
|
10
11
|
export { ChangeSidesMismatchException } from "../exceptions/change-sides-mismatch.exception.js";
|
|
11
12
|
export { CompareChangesMismatchException } from "../exceptions/compare-changes-mismatch.exception.js";
|
|
12
13
|
export { ContentTooLongException } from "../exceptions/content-too-long.exception.js";
|
|
14
|
+
export { EarlierPathsMismatchException } from "../exceptions/earlier-paths-mismatch.exception.js";
|
|
13
15
|
export { InvalidBase64Exception } from "../exceptions/invalid-base64.exception.js";
|
|
14
16
|
export { InvalidCheckpointIdException } from "../exceptions/invalid-checkpoint-id.exception.js";
|
|
15
17
|
export { InvalidDateException } from "../exceptions/invalid-date.exception.js";
|
|
@@ -26,6 +28,7 @@ export { ProtocolException } from "../exceptions/protocol.exception.js";
|
|
|
26
28
|
export { ReadCutMismatchException } from "../exceptions/read-cut-mismatch.exception.js";
|
|
27
29
|
export { ReadOutcomeMismatchException } from "../exceptions/read-outcome-mismatch.exception.js";
|
|
28
30
|
export { RestoreCheckpointsMismatchException } from "../exceptions/restore-checkpoints-mismatch.exception.js";
|
|
31
|
+
export { RestoreContentMismatchException } from "../exceptions/restore-content-mismatch.exception.js";
|
|
29
32
|
export { SideSizeMismatchException } from "../exceptions/side-size-mismatch.exception.js";
|
|
30
33
|
export { StepSidesMismatchException } from "../exceptions/step-sides-mismatch.exception.js";
|
|
31
34
|
export { UnknownCaptureModeException } from "../exceptions/unknown-capture-mode.exception.js";
|
package/src/api/index.js.map
CHANGED
|
@@ -1 +1 @@
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O,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { Resources } from "../resources.js";
|
|
9
|
+
import { ProtocolException } from "./protocol.exception.js";
|
|
10
|
+
export class CaptureContentMismatchException extends ProtocolException {
|
|
11
|
+
outcome;
|
|
12
|
+
constructor(outcome) {
|
|
13
|
+
super(Resources.formatContentMismatch(outcome.value));
|
|
14
|
+
this.outcome = outcome;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=capture-content-mismatch.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture-content-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/capture-content-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,+BAAgC,SAAQ,iBAAiB;IACpD,OAAO,CAAiB;IAExC,YAAmB,OAAuB;QACxC,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAEtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { Resources } from "../resources.js";
|
|
9
|
+
import { ProtocolException } from "./protocol.exception.js";
|
|
10
|
+
export class EarlierPathsMismatchException extends ProtocolException {
|
|
11
|
+
path;
|
|
12
|
+
constructor(path) {
|
|
13
|
+
super(Resources.formatEarlierPathsMismatch(path));
|
|
14
|
+
this.path = path;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=earlier-paths-mismatch.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"earlier-paths-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/earlier-paths-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,6BAA8B,SAAQ,iBAAiB;IAClD,IAAI,CAAS;IAE7B,YAAmB,IAAY;QAC7B,KAAK,CAAC,SAAS,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { Resources } from "../resources.js";
|
|
9
|
+
import { ProtocolException } from "./protocol.exception.js";
|
|
10
|
+
export class RestoreContentMismatchException extends ProtocolException {
|
|
11
|
+
outcome;
|
|
12
|
+
constructor(outcome) {
|
|
13
|
+
super(Resources.formatRestoreContentMismatch(outcome.value));
|
|
14
|
+
this.outcome = outcome;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=restore-content-mismatch.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restore-content-mismatch.exception.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/exceptions/restore-content-mismatch.exception.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,OAAO,+BAAgC,SAAQ,iBAAiB;IACpD,OAAO,CAAiB;IAExC,YAAmB,OAAuB;QACxC,KAAK,CAAC,SAAS,CAAC,4BAA4B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* This source code is licensed under the license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
8
9
|
import { UnknownCaptureModeException } from "../exceptions/unknown-capture-mode.exception.js";
|
|
9
10
|
export class CaptureMode {
|
|
10
11
|
static EveryFile = new CaptureMode("EveryFile");
|
|
@@ -16,7 +17,7 @@ export class CaptureMode {
|
|
|
16
17
|
}
|
|
17
18
|
static fromJson(value) {
|
|
18
19
|
const mode = CaptureMode.ALL.find(t => t.value === value);
|
|
19
|
-
if (mode
|
|
20
|
+
if (Object.isUndefined(mode))
|
|
20
21
|
throw new UnknownCaptureModeException(String(value));
|
|
21
22
|
return mode;
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-mode.js","sourceRoot":"","sources":["../../../../../src/noldova.checkpoints.protocol/src/models/capture-mode.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAE9F,MAAM,OAAO,WAAW;IACf,MAAM,CAAU,SAAS,GAAgB,IAAI,WA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