@lace-cloud/host 0.37.0 → 0.37.1
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.cjs +245 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +66 -2
- package/dist/index.d.ts +66 -2
- package/dist/index.mjs +245 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -358,7 +358,7 @@ declare enum Reason {
|
|
|
358
358
|
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
359
359
|
REASON_CONFLICT = 6,
|
|
360
360
|
/**
|
|
361
|
-
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
361
|
+
* REASON_SOURCE_REFUSED - Every mutation, save, discard and generate: the session's source tf is refused
|
|
362
362
|
* (`BundleState.source_refused`).
|
|
363
363
|
* module convert and module import: the tree's tf does not parse, has a
|
|
364
364
|
* non-empty residual report, or its Bundle fails its own validation.
|
|
@@ -451,6 +451,14 @@ declare enum Reason {
|
|
|
451
451
|
REASON_NO_LOCKFILE = 22,
|
|
452
452
|
/** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
|
|
453
453
|
REASON_NO_COMMIT = 23,
|
|
454
|
+
/**
|
|
455
|
+
* REASON_STALE_WORKING_STATE - Discard and Restore: the session's working IR is no longer the one the
|
|
456
|
+
* caller showed the developer (`BundleState.working_digest`) -- another
|
|
457
|
+
* holder edited, undid or redid since. Restore also: the saved IR or source
|
|
458
|
+
* tree is no longer the one the backup was captured against. Nothing was
|
|
459
|
+
* discarded or restored; re-read the state and ask again.
|
|
460
|
+
*/
|
|
461
|
+
REASON_STALE_WORKING_STATE = 24,
|
|
454
462
|
UNRECOGNIZED = -1
|
|
455
463
|
}
|
|
456
464
|
|
|
@@ -1118,6 +1126,44 @@ declare const UndoAction: MessageFns<UndoAction>;
|
|
|
1118
1126
|
interface RedoAction {
|
|
1119
1127
|
}
|
|
1120
1128
|
declare const RedoAction: MessageFns<RedoAction>;
|
|
1129
|
+
/**
|
|
1130
|
+
* DiscardAction returns the session's working IR to its saved IR (the
|
|
1131
|
+
* record `state.lace` holds), a working-IR action: it never saves, writes
|
|
1132
|
+
* `state.lace` or the tf, and leaves an open conflict open. The old working
|
|
1133
|
+
* IR becomes an undo entry (an Undo brings the discarded edits back) and the
|
|
1134
|
+
* redo history is cleared. `expected_working_digest` is required: the
|
|
1135
|
+
* `BundleState.working_digest` of the state the caller showed the developer.
|
|
1136
|
+
* The engine refuses (FailedPrecondition, `REASON_STALE_WORKING_STATE`) when
|
|
1137
|
+
* the working IR's digest differs, so an edit another holder made since is
|
|
1138
|
+
* never discarded unseen. A session with nothing unsaved changes nothing:
|
|
1139
|
+
* no frame and no undo entry. Refused while the session is source-refused
|
|
1140
|
+
* (`REASON_SOURCE_REFUSED`) and for an ephemeral session, which has no saved
|
|
1141
|
+
* IR. Like Undo and Redo it is the only action of its batch.
|
|
1142
|
+
*/
|
|
1143
|
+
interface DiscardAction {
|
|
1144
|
+
expected_working_digest: string;
|
|
1145
|
+
}
|
|
1146
|
+
declare const DiscardAction: MessageFns<DiscardAction>;
|
|
1147
|
+
/**
|
|
1148
|
+
* RestoreAction restores a host's captured working IR into a root session.
|
|
1149
|
+
* The bundle, its working digest, saved digest and tree hash must come from
|
|
1150
|
+
* the same BundleState frame; every field is required. The engine verifies
|
|
1151
|
+
* the bundle's digest and refuses if the current session is not clean, is
|
|
1152
|
+
* source-refused, or its saved IR or tree differs from the capture. An open
|
|
1153
|
+
* conflict blocks only generate, so it does not refuse a restore. It also compares expected_working_digest with the current frame,
|
|
1154
|
+
* so another holder's edits are never overwritten unseen. A refusal changes
|
|
1155
|
+
* nothing; the host retains the capture for the developer to choose what to
|
|
1156
|
+
* do with it. A successful restore is undoable and writes neither state.lace
|
|
1157
|
+
* nor source tf. Like Discard it must be the only action in its batch.
|
|
1158
|
+
*/
|
|
1159
|
+
interface RestoreAction {
|
|
1160
|
+
bundle: Bundle | undefined;
|
|
1161
|
+
captured_working_digest: string;
|
|
1162
|
+
captured_saved_digest: string;
|
|
1163
|
+
captured_tree_hash: string;
|
|
1164
|
+
expected_working_digest: string;
|
|
1165
|
+
}
|
|
1166
|
+
declare const RestoreAction: MessageFns<RestoreAction>;
|
|
1121
1167
|
/**
|
|
1122
1168
|
* PlaceModuleAction drops a registry module onto the canvas. Distinct from
|
|
1123
1169
|
* Connect/UpdateInput/etc. in that it names a *source* module (registry
|
|
@@ -1158,6 +1204,8 @@ interface Action {
|
|
|
1158
1204
|
set_directives?: SetDirectivesAction | undefined;
|
|
1159
1205
|
set_meta_arguments?: SetMetaArgumentsAction | undefined;
|
|
1160
1206
|
add_resource?: AddResourceAction | undefined;
|
|
1207
|
+
discard?: DiscardAction | undefined;
|
|
1208
|
+
restore?: RestoreAction | undefined;
|
|
1161
1209
|
}
|
|
1162
1210
|
declare const Action: MessageFns<Action>;
|
|
1163
1211
|
interface ApplyActionRequest {
|
|
@@ -1382,7 +1430,12 @@ interface BundleState {
|
|
|
1382
1430
|
bundle: Bundle | undefined;
|
|
1383
1431
|
can_undo: boolean;
|
|
1384
1432
|
can_redo: boolean;
|
|
1385
|
-
/**
|
|
1433
|
+
/**
|
|
1434
|
+
* True when the working IR differs from the saved IR in `state.lace`. A host
|
|
1435
|
+
* that mirrors a document's dirty state marks it clean only from a frame
|
|
1436
|
+
* whose `unsaved` is false, never from the promise of a save or discard it
|
|
1437
|
+
* requested: edits, saves, undo and Generate from any holder move this flag.
|
|
1438
|
+
*/
|
|
1386
1439
|
unsaved: boolean;
|
|
1387
1440
|
/**
|
|
1388
1441
|
* The engine validator's findings for this state, in the validator's
|
|
@@ -1436,6 +1489,17 @@ interface BundleState {
|
|
|
1436
1489
|
* window is refused (FailedPrecondition).
|
|
1437
1490
|
*/
|
|
1438
1491
|
generating: boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* The content identity of the working IR (`encoding.Digest`): the
|
|
1494
|
+
* value a DiscardAction's `expected_working_digest` names. Empty while
|
|
1495
|
+
* there is no working IR.
|
|
1496
|
+
*/
|
|
1497
|
+
working_digest: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* The content identity of the saved IR (`encoding.Digest`), captured with
|
|
1500
|
+
* this frame's working IR for RestoreAction. Empty if unavailable.
|
|
1501
|
+
*/
|
|
1502
|
+
saved_digest: string;
|
|
1439
1503
|
}
|
|
1440
1504
|
declare const BundleState: MessageFns<BundleState>;
|
|
1441
1505
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -358,7 +358,7 @@ declare enum Reason {
|
|
|
358
358
|
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
359
359
|
REASON_CONFLICT = 6,
|
|
360
360
|
/**
|
|
361
|
-
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
361
|
+
* REASON_SOURCE_REFUSED - Every mutation, save, discard and generate: the session's source tf is refused
|
|
362
362
|
* (`BundleState.source_refused`).
|
|
363
363
|
* module convert and module import: the tree's tf does not parse, has a
|
|
364
364
|
* non-empty residual report, or its Bundle fails its own validation.
|
|
@@ -451,6 +451,14 @@ declare enum Reason {
|
|
|
451
451
|
REASON_NO_LOCKFILE = 22,
|
|
452
452
|
/** REASON_NO_COMMIT - stack create --source: the directory's repository has no commit yet. */
|
|
453
453
|
REASON_NO_COMMIT = 23,
|
|
454
|
+
/**
|
|
455
|
+
* REASON_STALE_WORKING_STATE - Discard and Restore: the session's working IR is no longer the one the
|
|
456
|
+
* caller showed the developer (`BundleState.working_digest`) -- another
|
|
457
|
+
* holder edited, undid or redid since. Restore also: the saved IR or source
|
|
458
|
+
* tree is no longer the one the backup was captured against. Nothing was
|
|
459
|
+
* discarded or restored; re-read the state and ask again.
|
|
460
|
+
*/
|
|
461
|
+
REASON_STALE_WORKING_STATE = 24,
|
|
454
462
|
UNRECOGNIZED = -1
|
|
455
463
|
}
|
|
456
464
|
|
|
@@ -1118,6 +1126,44 @@ declare const UndoAction: MessageFns<UndoAction>;
|
|
|
1118
1126
|
interface RedoAction {
|
|
1119
1127
|
}
|
|
1120
1128
|
declare const RedoAction: MessageFns<RedoAction>;
|
|
1129
|
+
/**
|
|
1130
|
+
* DiscardAction returns the session's working IR to its saved IR (the
|
|
1131
|
+
* record `state.lace` holds), a working-IR action: it never saves, writes
|
|
1132
|
+
* `state.lace` or the tf, and leaves an open conflict open. The old working
|
|
1133
|
+
* IR becomes an undo entry (an Undo brings the discarded edits back) and the
|
|
1134
|
+
* redo history is cleared. `expected_working_digest` is required: the
|
|
1135
|
+
* `BundleState.working_digest` of the state the caller showed the developer.
|
|
1136
|
+
* The engine refuses (FailedPrecondition, `REASON_STALE_WORKING_STATE`) when
|
|
1137
|
+
* the working IR's digest differs, so an edit another holder made since is
|
|
1138
|
+
* never discarded unseen. A session with nothing unsaved changes nothing:
|
|
1139
|
+
* no frame and no undo entry. Refused while the session is source-refused
|
|
1140
|
+
* (`REASON_SOURCE_REFUSED`) and for an ephemeral session, which has no saved
|
|
1141
|
+
* IR. Like Undo and Redo it is the only action of its batch.
|
|
1142
|
+
*/
|
|
1143
|
+
interface DiscardAction {
|
|
1144
|
+
expected_working_digest: string;
|
|
1145
|
+
}
|
|
1146
|
+
declare const DiscardAction: MessageFns<DiscardAction>;
|
|
1147
|
+
/**
|
|
1148
|
+
* RestoreAction restores a host's captured working IR into a root session.
|
|
1149
|
+
* The bundle, its working digest, saved digest and tree hash must come from
|
|
1150
|
+
* the same BundleState frame; every field is required. The engine verifies
|
|
1151
|
+
* the bundle's digest and refuses if the current session is not clean, is
|
|
1152
|
+
* source-refused, or its saved IR or tree differs from the capture. An open
|
|
1153
|
+
* conflict blocks only generate, so it does not refuse a restore. It also compares expected_working_digest with the current frame,
|
|
1154
|
+
* so another holder's edits are never overwritten unseen. A refusal changes
|
|
1155
|
+
* nothing; the host retains the capture for the developer to choose what to
|
|
1156
|
+
* do with it. A successful restore is undoable and writes neither state.lace
|
|
1157
|
+
* nor source tf. Like Discard it must be the only action in its batch.
|
|
1158
|
+
*/
|
|
1159
|
+
interface RestoreAction {
|
|
1160
|
+
bundle: Bundle | undefined;
|
|
1161
|
+
captured_working_digest: string;
|
|
1162
|
+
captured_saved_digest: string;
|
|
1163
|
+
captured_tree_hash: string;
|
|
1164
|
+
expected_working_digest: string;
|
|
1165
|
+
}
|
|
1166
|
+
declare const RestoreAction: MessageFns<RestoreAction>;
|
|
1121
1167
|
/**
|
|
1122
1168
|
* PlaceModuleAction drops a registry module onto the canvas. Distinct from
|
|
1123
1169
|
* Connect/UpdateInput/etc. in that it names a *source* module (registry
|
|
@@ -1158,6 +1204,8 @@ interface Action {
|
|
|
1158
1204
|
set_directives?: SetDirectivesAction | undefined;
|
|
1159
1205
|
set_meta_arguments?: SetMetaArgumentsAction | undefined;
|
|
1160
1206
|
add_resource?: AddResourceAction | undefined;
|
|
1207
|
+
discard?: DiscardAction | undefined;
|
|
1208
|
+
restore?: RestoreAction | undefined;
|
|
1161
1209
|
}
|
|
1162
1210
|
declare const Action: MessageFns<Action>;
|
|
1163
1211
|
interface ApplyActionRequest {
|
|
@@ -1382,7 +1430,12 @@ interface BundleState {
|
|
|
1382
1430
|
bundle: Bundle | undefined;
|
|
1383
1431
|
can_undo: boolean;
|
|
1384
1432
|
can_redo: boolean;
|
|
1385
|
-
/**
|
|
1433
|
+
/**
|
|
1434
|
+
* True when the working IR differs from the saved IR in `state.lace`. A host
|
|
1435
|
+
* that mirrors a document's dirty state marks it clean only from a frame
|
|
1436
|
+
* whose `unsaved` is false, never from the promise of a save or discard it
|
|
1437
|
+
* requested: edits, saves, undo and Generate from any holder move this flag.
|
|
1438
|
+
*/
|
|
1386
1439
|
unsaved: boolean;
|
|
1387
1440
|
/**
|
|
1388
1441
|
* The engine validator's findings for this state, in the validator's
|
|
@@ -1436,6 +1489,17 @@ interface BundleState {
|
|
|
1436
1489
|
* window is refused (FailedPrecondition).
|
|
1437
1490
|
*/
|
|
1438
1491
|
generating: boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* The content identity of the working IR (`encoding.Digest`): the
|
|
1494
|
+
* value a DiscardAction's `expected_working_digest` names. Empty while
|
|
1495
|
+
* there is no working IR.
|
|
1496
|
+
*/
|
|
1497
|
+
working_digest: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* The content identity of the saved IR (`encoding.Digest`), captured with
|
|
1500
|
+
* this frame's working IR for RestoreAction. Empty if unavailable.
|
|
1501
|
+
*/
|
|
1502
|
+
saved_digest: string;
|
|
1439
1503
|
}
|
|
1440
1504
|
declare const BundleState: MessageFns<BundleState>;
|
|
1441
1505
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -556,6 +556,9 @@ function reasonFromJSON(object) {
|
|
|
556
556
|
case 23:
|
|
557
557
|
case "REASON_NO_COMMIT":
|
|
558
558
|
return 23 /* REASON_NO_COMMIT */;
|
|
559
|
+
case 24:
|
|
560
|
+
case "REASON_STALE_WORKING_STATE":
|
|
561
|
+
return 24 /* REASON_STALE_WORKING_STATE */;
|
|
559
562
|
case -1:
|
|
560
563
|
case "UNRECOGNIZED":
|
|
561
564
|
default:
|
|
@@ -612,6 +615,8 @@ function reasonToJSON(object) {
|
|
|
612
615
|
return "REASON_NO_LOCKFILE";
|
|
613
616
|
case 23 /* REASON_NO_COMMIT */:
|
|
614
617
|
return "REASON_NO_COMMIT";
|
|
618
|
+
case 24 /* REASON_STALE_WORKING_STATE */:
|
|
619
|
+
return "REASON_STALE_WORKING_STATE";
|
|
615
620
|
case -1 /* UNRECOGNIZED */:
|
|
616
621
|
default:
|
|
617
622
|
return "UNRECOGNIZED";
|
|
@@ -7048,6 +7053,178 @@ var RedoAction = {
|
|
|
7048
7053
|
return message;
|
|
7049
7054
|
}
|
|
7050
7055
|
};
|
|
7056
|
+
function createBaseDiscardAction() {
|
|
7057
|
+
return { expected_working_digest: "" };
|
|
7058
|
+
}
|
|
7059
|
+
var DiscardAction = {
|
|
7060
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
7061
|
+
if (message.expected_working_digest !== "") {
|
|
7062
|
+
writer.uint32(10).string(message.expected_working_digest);
|
|
7063
|
+
}
|
|
7064
|
+
return writer;
|
|
7065
|
+
},
|
|
7066
|
+
decode(input, length) {
|
|
7067
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
7068
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7069
|
+
const message = createBaseDiscardAction();
|
|
7070
|
+
while (reader.pos < end) {
|
|
7071
|
+
const tag = reader.uint32();
|
|
7072
|
+
switch (tag >>> 3) {
|
|
7073
|
+
case 1: {
|
|
7074
|
+
if (tag !== 10) {
|
|
7075
|
+
break;
|
|
7076
|
+
}
|
|
7077
|
+
message.expected_working_digest = reader.string();
|
|
7078
|
+
continue;
|
|
7079
|
+
}
|
|
7080
|
+
}
|
|
7081
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7082
|
+
break;
|
|
7083
|
+
}
|
|
7084
|
+
reader.skip(tag & 7);
|
|
7085
|
+
}
|
|
7086
|
+
return message;
|
|
7087
|
+
},
|
|
7088
|
+
fromJSON(object) {
|
|
7089
|
+
return {
|
|
7090
|
+
expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
|
|
7091
|
+
};
|
|
7092
|
+
},
|
|
7093
|
+
toJSON(message) {
|
|
7094
|
+
const obj = {};
|
|
7095
|
+
if (message.expected_working_digest !== "") {
|
|
7096
|
+
obj.expectedWorkingDigest = message.expected_working_digest;
|
|
7097
|
+
}
|
|
7098
|
+
return obj;
|
|
7099
|
+
},
|
|
7100
|
+
create(base) {
|
|
7101
|
+
return DiscardAction.fromPartial(base ?? {});
|
|
7102
|
+
},
|
|
7103
|
+
fromPartial(object) {
|
|
7104
|
+
const message = createBaseDiscardAction();
|
|
7105
|
+
message.expected_working_digest = object.expected_working_digest ?? "";
|
|
7106
|
+
return message;
|
|
7107
|
+
}
|
|
7108
|
+
};
|
|
7109
|
+
function createBaseRestoreAction() {
|
|
7110
|
+
return {
|
|
7111
|
+
bundle: void 0,
|
|
7112
|
+
captured_working_digest: "",
|
|
7113
|
+
captured_saved_digest: "",
|
|
7114
|
+
captured_tree_hash: "",
|
|
7115
|
+
expected_working_digest: ""
|
|
7116
|
+
};
|
|
7117
|
+
}
|
|
7118
|
+
var RestoreAction = {
|
|
7119
|
+
encode(message, writer = new BinaryWriter4()) {
|
|
7120
|
+
if (message.bundle !== void 0) {
|
|
7121
|
+
Bundle.encode(message.bundle, writer.uint32(10).fork()).join();
|
|
7122
|
+
}
|
|
7123
|
+
if (message.captured_working_digest !== "") {
|
|
7124
|
+
writer.uint32(18).string(message.captured_working_digest);
|
|
7125
|
+
}
|
|
7126
|
+
if (message.captured_saved_digest !== "") {
|
|
7127
|
+
writer.uint32(26).string(message.captured_saved_digest);
|
|
7128
|
+
}
|
|
7129
|
+
if (message.captured_tree_hash !== "") {
|
|
7130
|
+
writer.uint32(34).string(message.captured_tree_hash);
|
|
7131
|
+
}
|
|
7132
|
+
if (message.expected_working_digest !== "") {
|
|
7133
|
+
writer.uint32(42).string(message.expected_working_digest);
|
|
7134
|
+
}
|
|
7135
|
+
return writer;
|
|
7136
|
+
},
|
|
7137
|
+
decode(input, length) {
|
|
7138
|
+
const reader = input instanceof BinaryReader4 ? input : new BinaryReader4(input);
|
|
7139
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7140
|
+
const message = createBaseRestoreAction();
|
|
7141
|
+
while (reader.pos < end) {
|
|
7142
|
+
const tag = reader.uint32();
|
|
7143
|
+
switch (tag >>> 3) {
|
|
7144
|
+
case 1: {
|
|
7145
|
+
if (tag !== 10) {
|
|
7146
|
+
break;
|
|
7147
|
+
}
|
|
7148
|
+
message.bundle = Bundle.decode(reader, reader.uint32());
|
|
7149
|
+
continue;
|
|
7150
|
+
}
|
|
7151
|
+
case 2: {
|
|
7152
|
+
if (tag !== 18) {
|
|
7153
|
+
break;
|
|
7154
|
+
}
|
|
7155
|
+
message.captured_working_digest = reader.string();
|
|
7156
|
+
continue;
|
|
7157
|
+
}
|
|
7158
|
+
case 3: {
|
|
7159
|
+
if (tag !== 26) {
|
|
7160
|
+
break;
|
|
7161
|
+
}
|
|
7162
|
+
message.captured_saved_digest = reader.string();
|
|
7163
|
+
continue;
|
|
7164
|
+
}
|
|
7165
|
+
case 4: {
|
|
7166
|
+
if (tag !== 34) {
|
|
7167
|
+
break;
|
|
7168
|
+
}
|
|
7169
|
+
message.captured_tree_hash = reader.string();
|
|
7170
|
+
continue;
|
|
7171
|
+
}
|
|
7172
|
+
case 5: {
|
|
7173
|
+
if (tag !== 42) {
|
|
7174
|
+
break;
|
|
7175
|
+
}
|
|
7176
|
+
message.expected_working_digest = reader.string();
|
|
7177
|
+
continue;
|
|
7178
|
+
}
|
|
7179
|
+
}
|
|
7180
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7181
|
+
break;
|
|
7182
|
+
}
|
|
7183
|
+
reader.skip(tag & 7);
|
|
7184
|
+
}
|
|
7185
|
+
return message;
|
|
7186
|
+
},
|
|
7187
|
+
fromJSON(object) {
|
|
7188
|
+
return {
|
|
7189
|
+
bundle: isSet3(object.bundle) ? Bundle.fromJSON(object.bundle) : void 0,
|
|
7190
|
+
captured_working_digest: isSet3(object.capturedWorkingDigest) ? globalThis.String(object.capturedWorkingDigest) : isSet3(object.captured_working_digest) ? globalThis.String(object.captured_working_digest) : "",
|
|
7191
|
+
captured_saved_digest: isSet3(object.capturedSavedDigest) ? globalThis.String(object.capturedSavedDigest) : isSet3(object.captured_saved_digest) ? globalThis.String(object.captured_saved_digest) : "",
|
|
7192
|
+
captured_tree_hash: isSet3(object.capturedTreeHash) ? globalThis.String(object.capturedTreeHash) : isSet3(object.captured_tree_hash) ? globalThis.String(object.captured_tree_hash) : "",
|
|
7193
|
+
expected_working_digest: isSet3(object.expectedWorkingDigest) ? globalThis.String(object.expectedWorkingDigest) : isSet3(object.expected_working_digest) ? globalThis.String(object.expected_working_digest) : ""
|
|
7194
|
+
};
|
|
7195
|
+
},
|
|
7196
|
+
toJSON(message) {
|
|
7197
|
+
const obj = {};
|
|
7198
|
+
if (message.bundle !== void 0) {
|
|
7199
|
+
obj.bundle = Bundle.toJSON(message.bundle);
|
|
7200
|
+
}
|
|
7201
|
+
if (message.captured_working_digest !== "") {
|
|
7202
|
+
obj.capturedWorkingDigest = message.captured_working_digest;
|
|
7203
|
+
}
|
|
7204
|
+
if (message.captured_saved_digest !== "") {
|
|
7205
|
+
obj.capturedSavedDigest = message.captured_saved_digest;
|
|
7206
|
+
}
|
|
7207
|
+
if (message.captured_tree_hash !== "") {
|
|
7208
|
+
obj.capturedTreeHash = message.captured_tree_hash;
|
|
7209
|
+
}
|
|
7210
|
+
if (message.expected_working_digest !== "") {
|
|
7211
|
+
obj.expectedWorkingDigest = message.expected_working_digest;
|
|
7212
|
+
}
|
|
7213
|
+
return obj;
|
|
7214
|
+
},
|
|
7215
|
+
create(base) {
|
|
7216
|
+
return RestoreAction.fromPartial(base ?? {});
|
|
7217
|
+
},
|
|
7218
|
+
fromPartial(object) {
|
|
7219
|
+
const message = createBaseRestoreAction();
|
|
7220
|
+
message.bundle = object.bundle !== void 0 && object.bundle !== null ? Bundle.fromPartial(object.bundle) : void 0;
|
|
7221
|
+
message.captured_working_digest = object.captured_working_digest ?? "";
|
|
7222
|
+
message.captured_saved_digest = object.captured_saved_digest ?? "";
|
|
7223
|
+
message.captured_tree_hash = object.captured_tree_hash ?? "";
|
|
7224
|
+
message.expected_working_digest = object.expected_working_digest ?? "";
|
|
7225
|
+
return message;
|
|
7226
|
+
}
|
|
7227
|
+
};
|
|
7051
7228
|
function createBasePlaceModuleAction() {
|
|
7052
7229
|
return { author: "", name: "", version: "" };
|
|
7053
7230
|
}
|
|
@@ -7156,7 +7333,9 @@ function createBaseAction() {
|
|
|
7156
7333
|
set_blocks: void 0,
|
|
7157
7334
|
set_directives: void 0,
|
|
7158
7335
|
set_meta_arguments: void 0,
|
|
7159
|
-
add_resource: void 0
|
|
7336
|
+
add_resource: void 0,
|
|
7337
|
+
discard: void 0,
|
|
7338
|
+
restore: void 0
|
|
7160
7339
|
};
|
|
7161
7340
|
}
|
|
7162
7341
|
var Action = {
|
|
@@ -7233,6 +7412,12 @@ var Action = {
|
|
|
7233
7412
|
if (message.add_resource !== void 0) {
|
|
7234
7413
|
AddResourceAction.encode(message.add_resource, writer.uint32(226).fork()).join();
|
|
7235
7414
|
}
|
|
7415
|
+
if (message.discard !== void 0) {
|
|
7416
|
+
DiscardAction.encode(message.discard, writer.uint32(234).fork()).join();
|
|
7417
|
+
}
|
|
7418
|
+
if (message.restore !== void 0) {
|
|
7419
|
+
RestoreAction.encode(message.restore, writer.uint32(242).fork()).join();
|
|
7420
|
+
}
|
|
7236
7421
|
return writer;
|
|
7237
7422
|
},
|
|
7238
7423
|
decode(input, length) {
|
|
@@ -7410,6 +7595,20 @@ var Action = {
|
|
|
7410
7595
|
message.add_resource = AddResourceAction.decode(reader, reader.uint32());
|
|
7411
7596
|
continue;
|
|
7412
7597
|
}
|
|
7598
|
+
case 29: {
|
|
7599
|
+
if (tag !== 234) {
|
|
7600
|
+
break;
|
|
7601
|
+
}
|
|
7602
|
+
message.discard = DiscardAction.decode(reader, reader.uint32());
|
|
7603
|
+
continue;
|
|
7604
|
+
}
|
|
7605
|
+
case 30: {
|
|
7606
|
+
if (tag !== 242) {
|
|
7607
|
+
break;
|
|
7608
|
+
}
|
|
7609
|
+
message.restore = RestoreAction.decode(reader, reader.uint32());
|
|
7610
|
+
continue;
|
|
7611
|
+
}
|
|
7413
7612
|
}
|
|
7414
7613
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7415
7614
|
break;
|
|
@@ -7443,7 +7642,9 @@ var Action = {
|
|
|
7443
7642
|
set_blocks: isSet3(object.setBlocks) ? SetBlocksAction.fromJSON(object.setBlocks) : isSet3(object.set_blocks) ? SetBlocksAction.fromJSON(object.set_blocks) : void 0,
|
|
7444
7643
|
set_directives: isSet3(object.setDirectives) ? SetDirectivesAction.fromJSON(object.setDirectives) : isSet3(object.set_directives) ? SetDirectivesAction.fromJSON(object.set_directives) : void 0,
|
|
7445
7644
|
set_meta_arguments: isSet3(object.setMetaArguments) ? SetMetaArgumentsAction.fromJSON(object.setMetaArguments) : isSet3(object.set_meta_arguments) ? SetMetaArgumentsAction.fromJSON(object.set_meta_arguments) : void 0,
|
|
7446
|
-
add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0
|
|
7645
|
+
add_resource: isSet3(object.addResource) ? AddResourceAction.fromJSON(object.addResource) : isSet3(object.add_resource) ? AddResourceAction.fromJSON(object.add_resource) : void 0,
|
|
7646
|
+
discard: isSet3(object.discard) ? DiscardAction.fromJSON(object.discard) : void 0,
|
|
7647
|
+
restore: isSet3(object.restore) ? RestoreAction.fromJSON(object.restore) : void 0
|
|
7447
7648
|
};
|
|
7448
7649
|
},
|
|
7449
7650
|
toJSON(message) {
|
|
@@ -7520,6 +7721,12 @@ var Action = {
|
|
|
7520
7721
|
if (message.add_resource !== void 0) {
|
|
7521
7722
|
obj.addResource = AddResourceAction.toJSON(message.add_resource);
|
|
7522
7723
|
}
|
|
7724
|
+
if (message.discard !== void 0) {
|
|
7725
|
+
obj.discard = DiscardAction.toJSON(message.discard);
|
|
7726
|
+
}
|
|
7727
|
+
if (message.restore !== void 0) {
|
|
7728
|
+
obj.restore = RestoreAction.toJSON(message.restore);
|
|
7729
|
+
}
|
|
7523
7730
|
return obj;
|
|
7524
7731
|
},
|
|
7525
7732
|
create(base) {
|
|
@@ -7551,6 +7758,8 @@ var Action = {
|
|
|
7551
7758
|
message.set_directives = object.set_directives !== void 0 && object.set_directives !== null ? SetDirectivesAction.fromPartial(object.set_directives) : void 0;
|
|
7552
7759
|
message.set_meta_arguments = object.set_meta_arguments !== void 0 && object.set_meta_arguments !== null ? SetMetaArgumentsAction.fromPartial(object.set_meta_arguments) : void 0;
|
|
7553
7760
|
message.add_resource = object.add_resource !== void 0 && object.add_resource !== null ? AddResourceAction.fromPartial(object.add_resource) : void 0;
|
|
7761
|
+
message.discard = object.discard !== void 0 && object.discard !== null ? DiscardAction.fromPartial(object.discard) : void 0;
|
|
7762
|
+
message.restore = object.restore !== void 0 && object.restore !== null ? RestoreAction.fromPartial(object.restore) : void 0;
|
|
7554
7763
|
return message;
|
|
7555
7764
|
}
|
|
7556
7765
|
};
|
|
@@ -8965,7 +9174,9 @@ function createBaseBundleState() {
|
|
|
8965
9174
|
source_refused: false,
|
|
8966
9175
|
tree_hash: "",
|
|
8967
9176
|
revision: 0,
|
|
8968
|
-
generating: false
|
|
9177
|
+
generating: false,
|
|
9178
|
+
working_digest: "",
|
|
9179
|
+
saved_digest: ""
|
|
8969
9180
|
};
|
|
8970
9181
|
}
|
|
8971
9182
|
var BundleState = {
|
|
@@ -9003,6 +9214,12 @@ var BundleState = {
|
|
|
9003
9214
|
if (message.generating !== false) {
|
|
9004
9215
|
writer.uint32(96).bool(message.generating);
|
|
9005
9216
|
}
|
|
9217
|
+
if (message.working_digest !== "") {
|
|
9218
|
+
writer.uint32(106).string(message.working_digest);
|
|
9219
|
+
}
|
|
9220
|
+
if (message.saved_digest !== "") {
|
|
9221
|
+
writer.uint32(114).string(message.saved_digest);
|
|
9222
|
+
}
|
|
9006
9223
|
return writer;
|
|
9007
9224
|
},
|
|
9008
9225
|
decode(input, length) {
|
|
@@ -9089,6 +9306,20 @@ var BundleState = {
|
|
|
9089
9306
|
message.generating = reader.bool();
|
|
9090
9307
|
continue;
|
|
9091
9308
|
}
|
|
9309
|
+
case 13: {
|
|
9310
|
+
if (tag !== 106) {
|
|
9311
|
+
break;
|
|
9312
|
+
}
|
|
9313
|
+
message.working_digest = reader.string();
|
|
9314
|
+
continue;
|
|
9315
|
+
}
|
|
9316
|
+
case 14: {
|
|
9317
|
+
if (tag !== 114) {
|
|
9318
|
+
break;
|
|
9319
|
+
}
|
|
9320
|
+
message.saved_digest = reader.string();
|
|
9321
|
+
continue;
|
|
9322
|
+
}
|
|
9092
9323
|
}
|
|
9093
9324
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9094
9325
|
break;
|
|
@@ -9109,7 +9340,9 @@ var BundleState = {
|
|
|
9109
9340
|
source_refused: isSet3(object.sourceRefused) ? globalThis.Boolean(object.sourceRefused) : isSet3(object.source_refused) ? globalThis.Boolean(object.source_refused) : false,
|
|
9110
9341
|
tree_hash: isSet3(object.treeHash) ? globalThis.String(object.treeHash) : isSet3(object.tree_hash) ? globalThis.String(object.tree_hash) : "",
|
|
9111
9342
|
revision: isSet3(object.revision) ? globalThis.Number(object.revision) : 0,
|
|
9112
|
-
generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false
|
|
9343
|
+
generating: isSet3(object.generating) ? globalThis.Boolean(object.generating) : false,
|
|
9344
|
+
working_digest: isSet3(object.workingDigest) ? globalThis.String(object.workingDigest) : isSet3(object.working_digest) ? globalThis.String(object.working_digest) : "",
|
|
9345
|
+
saved_digest: isSet3(object.savedDigest) ? globalThis.String(object.savedDigest) : isSet3(object.saved_digest) ? globalThis.String(object.saved_digest) : ""
|
|
9113
9346
|
};
|
|
9114
9347
|
},
|
|
9115
9348
|
toJSON(message) {
|
|
@@ -9147,6 +9380,12 @@ var BundleState = {
|
|
|
9147
9380
|
if (message.generating !== false) {
|
|
9148
9381
|
obj.generating = message.generating;
|
|
9149
9382
|
}
|
|
9383
|
+
if (message.working_digest !== "") {
|
|
9384
|
+
obj.workingDigest = message.working_digest;
|
|
9385
|
+
}
|
|
9386
|
+
if (message.saved_digest !== "") {
|
|
9387
|
+
obj.savedDigest = message.saved_digest;
|
|
9388
|
+
}
|
|
9150
9389
|
return obj;
|
|
9151
9390
|
},
|
|
9152
9391
|
create(base) {
|
|
@@ -9165,6 +9404,8 @@ var BundleState = {
|
|
|
9165
9404
|
message.tree_hash = object.tree_hash ?? "";
|
|
9166
9405
|
message.revision = object.revision ?? 0;
|
|
9167
9406
|
message.generating = object.generating ?? false;
|
|
9407
|
+
message.working_digest = object.working_digest ?? "";
|
|
9408
|
+
message.saved_digest = object.saved_digest ?? "";
|
|
9168
9409
|
return message;
|
|
9169
9410
|
}
|
|
9170
9411
|
};
|