@inflatable-cookie/longhorn 0.5.0 → 0.7.0
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 +2 -2
- package/package.json +1 -7
- package/src/agent-control/generated/protocol.ts +228 -0
- package/src/agent-control/index.ts +1 -5
- package/src/agent-control/inject.ts +4 -1
- package/src/agent-control/selection.ts +42 -25
- package/src/agent-control/shim.ts +428 -198
- package/src/bridge/direct.ts +1 -1
- package/src/bridge/generated/fields.ts +4 -3
- package/src/bridge/generated/protocol.ts +62 -7
- package/src/bridge/generated/variant-fields.ts +1 -1
- package/src/bridge/job.ts +49 -12
- package/src/bridge/loopback.ts +7 -25
- package/src/bridge/operation.ts +13 -43
- package/src/bridge/router.ts +10 -23
- package/src/bridge/runtime/connection.ts +78 -109
- package/src/bridge/runtime/policy.ts +8 -28
- package/src/bridge/runtime/retry.ts +6 -18
- package/src/bridge/session.ts +4 -14
- package/src/bridge/stream/connection.ts +24 -55
- package/src/bridge/stream/source.ts +2 -6
- package/src/bridge/stream/tracker.ts +12 -12
- package/src/bridge/supervision.ts +104 -97
- package/src/bridge/validation/base.ts +21 -63
- package/src/bridge/validation/jobs.ts +11 -25
- package/src/bridge/validation/negotiation.ts +28 -43
- package/src/bridge/validation/operations.ts +29 -65
- package/src/bridge/validation/streams.ts +3 -10
- package/src/commands/client.ts +37 -28
- package/src/commands/controller.ts +119 -96
- package/src/commands/generated/fields.ts +7 -6
- package/src/commands/generated/protocol.ts +28 -1
- package/src/commands/generated/variant-fields.ts +1 -1
- package/src/commands/keyboard.ts +94 -100
- package/src/commands/physical-code.ts +11 -0
- package/src/commands/ports.ts +8 -13
- package/src/commands/projectors.ts +100 -75
- package/src/commands/validation.ts +434 -241
- package/src/config/client.ts +9 -22
- package/src/config/generated/base.ts +22 -6
- package/src/config/generated/fields.ts +4 -3
- package/src/config/generated/label-template.ts +1 -1
- package/src/config/generated/labels.ts +1 -1
- package/src/config/generated/protocol.ts +1 -1
- package/src/config/generated/restore.ts +35 -12
- package/src/config/generated/variant-fields.ts +1 -1
- package/src/config/names.ts +6 -12
- package/src/config/validation/commands.ts +11 -25
- package/src/config/validation/outcomes.ts +163 -70
- package/src/config/validation/primitives.ts +35 -80
- package/src/config/validation/projection.ts +100 -128
- package/src/core/connection.ts +187 -83
- package/src/core/controller-lifecycle.ts +144 -0
- package/src/core/generated/identifiers.ts +4 -0
- package/src/core/identifiers.ts +40 -0
- package/src/core/index.ts +10 -1
- package/src/core/json-value.ts +58 -0
- package/src/core/listeners.ts +35 -0
- package/src/core/record.ts +80 -0
- package/src/core/transport.ts +9 -11
- package/src/core/wire-copy.ts +7 -0
- package/src/history/client.ts +11 -13
- package/src/history/controller.ts +106 -108
- package/src/history/direct.ts +1 -3
- package/src/history/generated/fields.ts +4 -3
- package/src/history/generated/protocol.ts +8 -5
- package/src/history/generated/variant-fields.ts +1 -1
- package/src/history/ports.ts +7 -4
- package/src/history/serialized.ts +9 -13
- package/src/history/validation.ts +69 -75
- package/src/history-tree/client.ts +89 -11
- package/src/history-tree/controller.ts +380 -96
- package/src/history-tree/direct.ts +3 -1
- package/src/history-tree/generated/fields.ts +5 -3
- package/src/history-tree/generated/protocol.ts +43 -7
- package/src/history-tree/generated/variant-fields.ts +7 -1
- package/src/history-tree/ports.ts +12 -5
- package/src/history-tree/serialized.ts +39 -11
- package/src/history-tree/validation.ts +286 -78
- package/src/layout/generated/protocol.ts +4 -3
- package/src/layout/generated/variant-fields.ts +47 -0
- package/src/layout/index.ts +1 -1
- package/src/layout/ratio.ts +10 -9
- package/src/layout/validation.ts +98 -32
- package/src/layout/visibility.ts +1 -2
- package/src/licence/client.ts +48 -7
- package/src/licence/controller.ts +127 -70
- package/src/licence/direct.ts +3 -1
- package/src/licence/generated/fields.ts +4 -3
- package/src/licence/generated/key-conformance.json +28 -0
- package/src/licence/generated/protocol.ts +9 -5
- package/src/licence/generated/variant-fields.ts +1 -1
- package/src/licence/key.ts +42 -18
- package/src/licence/ports.ts +10 -3
- package/src/licence/serialized.ts +32 -9
- package/src/licence/validation.ts +134 -43
- package/src/native-content/client.ts +207 -234
- package/src/native-content/generated/fields.ts +6 -6
- package/src/native-content/generated/protocol.ts +16 -5
- package/src/native-content/generated/variant-fields.ts +1 -1
- package/src/native-content/ports.ts +11 -16
- package/src/native-content/serialized.ts +12 -19
- package/src/native-content/validation/base.ts +57 -80
- package/src/native-content/validation/messages.ts +24 -35
- package/src/native-content/validation/state.ts +31 -33
- package/src/notifications/client.ts +85 -51
- package/src/notifications/controller.ts +400 -145
- package/src/notifications/direct.ts +3 -1
- package/src/notifications/generated/fields.ts +4 -3
- package/src/notifications/generated/labels.ts +1 -1
- package/src/notifications/generated/protocol.ts +5 -1
- package/src/notifications/generated/variant-fields.ts +1 -1
- package/src/notifications/ports.ts +9 -4
- package/src/notifications/serialized.ts +11 -9
- package/src/notifications/tone.ts +1 -1
- package/src/notifications/validation.ts +165 -71
- package/src/operation/bridge.ts +187 -60
- package/src/operation/client.ts +48 -62
- package/src/operation/controller.ts +67 -97
- package/src/operation/direct.ts +1 -3
- package/src/operation/generated/fields.ts +4 -3
- package/src/operation/generated/labels.ts +1 -1
- package/src/operation/generated/protocol.ts +5 -1
- package/src/operation/generated/variant-fields.ts +1 -1
- package/src/operation/ports.ts +12 -10
- package/src/operation/serialized.ts +8 -9
- package/src/operation/validation.ts +189 -104
- package/src/settings/client.ts +11 -44
- package/src/settings/connection.ts +35 -53
- package/src/settings/generated/fields.ts +5 -4
- package/src/settings/generated/protocol.ts +14 -5
- package/src/settings/generated/variant-fields.ts +1 -1
- package/src/settings/names.ts +2 -4
- package/src/settings/registry.ts +23 -25
- package/src/settings/validation/authority.ts +21 -19
- package/src/settings/validation/command.ts +22 -41
- package/src/settings/validation/error.ts +2 -8
- package/src/settings/validation/primitives.ts +46 -97
- package/src/settings/validation/projection.ts +8 -24
- package/src/settings/validation/registry.ts +33 -79
- package/src/surface-transfer/client.ts +6 -18
- package/src/surface-transfer/generated/fields.ts +3 -3
- package/src/surface-transfer/generated/protocol.ts +3 -3
- package/src/surface-transfer/generated/variant-fields.ts +1 -1
- package/src/surface-transfer/validation.ts +91 -86
- package/src/surfaces/client.ts +33 -55
- package/src/surfaces/generated/fields.ts +3 -3
- package/src/surfaces/generated/protocol.ts +1 -1
- package/src/surfaces/generated/variant-fields.ts +1 -1
- package/src/surfaces/validation.ts +227 -99
- package/src/transfer/client.ts +26 -60
- package/src/transfer/connection.ts +29 -51
- package/src/transfer/generated/fields.ts +7 -6
- package/src/transfer/generated/protocol.ts +13 -5
- package/src/transfer/generated/variant-fields.ts +1 -1
- package/src/transfer/index.ts +8 -1
- package/src/transfer/payload.ts +20 -35
- package/src/transfer/validation.ts +169 -119
- package/src/update/client.ts +86 -9
- package/src/update/controller.ts +264 -116
- package/src/update/direct.ts +3 -1
- package/src/update/generated/fields.ts +5 -4
- package/src/update/generated/protocol.ts +25 -9
- package/src/update/generated/variant-fields.ts +4 -2
- package/src/update/ports.ts +14 -6
- package/src/update/serialized.ts +36 -10
- package/src/update/validation.ts +118 -48
|
@@ -1,37 +1,30 @@
|
|
|
1
|
+
import { isRecord } from "../../core/record.ts";
|
|
1
2
|
import { BRIDGE_FIELDS } from "../generated/fields.ts";
|
|
2
3
|
import {
|
|
3
4
|
BRIDGE_MAXIMUM_DEDUPLICATION_ENTRIES,
|
|
4
5
|
BRIDGE_MAXIMUM_FAILURE_MESSAGE_BYTES,
|
|
5
|
-
BRIDGE_MAXIMUM_OPAQUE_ID_BYTES,
|
|
6
6
|
BRIDGE_FAILURE_PHASES,
|
|
7
7
|
BRIDGE_RETRY_CLASSES,
|
|
8
|
-
type BridgeCancellationRequest,
|
|
9
|
-
type BridgeCommandEnvelope,
|
|
10
|
-
type BridgeCommandReply,
|
|
11
|
-
type BridgeDeduplicationSupport,
|
|
12
|
-
type BridgeFailure,
|
|
13
|
-
type BridgeQueryEnvelope,
|
|
14
|
-
type BridgeQueryReply,
|
|
15
|
-
type BridgeRequestContext,
|
|
16
8
|
} from "../generated/protocol.ts";
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
import type {
|
|
10
|
+
BridgeCancellationRequest,
|
|
11
|
+
BridgeCommandEnvelope,
|
|
12
|
+
BridgeCommandReply,
|
|
13
|
+
BridgeDeduplicationSupport,
|
|
14
|
+
BridgeFailure,
|
|
15
|
+
BridgeQueryEnvelope,
|
|
16
|
+
BridgeQueryReply,
|
|
17
|
+
BridgeRequestContext,
|
|
18
|
+
} from "../generated/protocol.ts";
|
|
19
|
+
import { domainId, incompatible, integer, nullable, oneOf, opaqueId, record } from "./base.ts";
|
|
20
|
+
import type { BridgeCodec } from "./base.ts";
|
|
26
21
|
|
|
27
|
-
export function parseBridgeRequestContext(
|
|
28
|
-
value: unknown,
|
|
29
|
-
): BridgeRequestContext {
|
|
22
|
+
export function parseBridgeRequestContext(value: unknown): BridgeRequestContext {
|
|
30
23
|
const source = record(value, BRIDGE_FIELDS.BridgeRequestContext);
|
|
31
24
|
return {
|
|
32
25
|
requestId: opaqueId(source.requestId),
|
|
33
26
|
sessionId: opaqueId(source.sessionId),
|
|
34
|
-
domainId:
|
|
27
|
+
domainId: domainId(source.domainId),
|
|
35
28
|
};
|
|
36
29
|
}
|
|
37
30
|
|
|
@@ -60,9 +53,7 @@ export function parseBridgeCommandEnvelope<P>(
|
|
|
60
53
|
};
|
|
61
54
|
}
|
|
62
55
|
|
|
63
|
-
export function parseBridgeCancellationRequest(
|
|
64
|
-
value: unknown,
|
|
65
|
-
): BridgeCancellationRequest {
|
|
56
|
+
export function parseBridgeCancellationRequest(value: unknown): BridgeCancellationRequest {
|
|
66
57
|
const source = record(value, BRIDGE_FIELDS.BridgeCancellationRequest);
|
|
67
58
|
return {
|
|
68
59
|
context: parseBridgeRequestContext(source.context),
|
|
@@ -71,39 +62,25 @@ export function parseBridgeCancellationRequest(
|
|
|
71
62
|
};
|
|
72
63
|
}
|
|
73
64
|
|
|
74
|
-
export function parseBridgeFailure<D>(
|
|
75
|
-
value: unknown,
|
|
76
|
-
details: BridgeCodec<D>,
|
|
77
|
-
): BridgeFailure<D> {
|
|
65
|
+
export function parseBridgeFailure<D>(value: unknown, details: BridgeCodec<D>): BridgeFailure<D> {
|
|
78
66
|
const source = record(value, BRIDGE_FIELDS.BridgeFailure);
|
|
79
67
|
if (
|
|
80
68
|
typeof source.message !== "string" ||
|
|
81
69
|
source.message.length === 0 ||
|
|
82
|
-
new TextEncoder().encode(source.message).length >
|
|
83
|
-
BRIDGE_MAXIMUM_FAILURE_MESSAGE_BYTES
|
|
70
|
+
new TextEncoder().encode(source.message).length > BRIDGE_MAXIMUM_FAILURE_MESSAGE_BYTES
|
|
84
71
|
) {
|
|
85
72
|
incompatible("invalid_message", source.message);
|
|
86
73
|
}
|
|
87
74
|
return {
|
|
88
75
|
code: opaqueId(source.code),
|
|
89
76
|
message: source.message,
|
|
90
|
-
retryClass: oneOf(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"unknown_retry_class",
|
|
94
|
-
),
|
|
95
|
-
phase: oneOf(
|
|
96
|
-
source.phase,
|
|
97
|
-
BRIDGE_FAILURE_PHASES,
|
|
98
|
-
"unknown_failure_phase",
|
|
99
|
-
),
|
|
100
|
-
details: nullable(source.details, details.parse),
|
|
77
|
+
retryClass: oneOf(source.retryClass, BRIDGE_RETRY_CLASSES, "unknown_retry_class"),
|
|
78
|
+
phase: oneOf(source.phase, BRIDGE_FAILURE_PHASES, "unknown_failure_phase"),
|
|
79
|
+
details: nullable(source.details, (payload) => details.parse(payload)),
|
|
101
80
|
};
|
|
102
81
|
}
|
|
103
82
|
|
|
104
|
-
export function parseBridgeDeduplicationSupport(
|
|
105
|
-
value: unknown,
|
|
106
|
-
): BridgeDeduplicationSupport {
|
|
83
|
+
export function parseBridgeDeduplicationSupport(value: unknown): BridgeDeduplicationSupport {
|
|
107
84
|
if (value === "unsupported") {
|
|
108
85
|
return value;
|
|
109
86
|
}
|
|
@@ -116,7 +93,7 @@ export function parseBridgeDeduplicationSupport(
|
|
|
116
93
|
) {
|
|
117
94
|
incompatible("unknown_deduplication_support", value);
|
|
118
95
|
}
|
|
119
|
-
const source = value
|
|
96
|
+
const source = value;
|
|
120
97
|
const capacity = integer(source.finite, 1);
|
|
121
98
|
if (capacity > BRIDGE_MAXIMUM_DEDUPLICATION_ENTRIES) {
|
|
122
99
|
incompatible("unknown_deduplication_support", value);
|
|
@@ -144,10 +121,7 @@ export function parseBridgeCommandReply<S, D>(
|
|
|
144
121
|
const source = record(value, BRIDGE_FIELDS.BridgeCommandReply);
|
|
145
122
|
return {
|
|
146
123
|
requestId: opaqueId(source.requestId),
|
|
147
|
-
authoritativeRevision: nullable(
|
|
148
|
-
source.authoritativeRevision,
|
|
149
|
-
integer,
|
|
150
|
-
),
|
|
124
|
+
authoritativeRevision: nullable(source.authoritativeRevision, integer),
|
|
151
125
|
outcome: parseCommandOutcome(source.outcome, success, details),
|
|
152
126
|
};
|
|
153
127
|
}
|
|
@@ -187,27 +161,17 @@ function parseCommandOutcome<S, D>(
|
|
|
187
161
|
|
|
188
162
|
function variant(
|
|
189
163
|
value: unknown,
|
|
190
|
-
|
|
164
|
+
variants: ReadonlyArray<string>,
|
|
191
165
|
code: "unknown_query_outcome" | "unknown_command_outcome",
|
|
192
166
|
): Record<string, unknown> {
|
|
193
|
-
if (
|
|
167
|
+
if (!isRecord(value)) {
|
|
194
168
|
incompatible(code, value);
|
|
195
169
|
}
|
|
196
|
-
const source = value
|
|
170
|
+
const source = value;
|
|
197
171
|
const present = Object.keys(source);
|
|
198
|
-
|
|
172
|
+
const [key] = present;
|
|
173
|
+
if (present.length !== 1 || key === undefined || !variants.includes(key)) {
|
|
199
174
|
incompatible(code, value);
|
|
200
175
|
}
|
|
201
176
|
return source;
|
|
202
177
|
}
|
|
203
|
-
|
|
204
|
-
function parseDomainId(value: unknown): string {
|
|
205
|
-
if (
|
|
206
|
-
typeof value !== "string" ||
|
|
207
|
-
new TextEncoder().encode(value).length > BRIDGE_MAXIMUM_OPAQUE_ID_BYTES ||
|
|
208
|
-
!/^[a-z][a-z0-9_-]*(\.[a-z][a-z0-9_-]*)*$/.test(value)
|
|
209
|
-
) {
|
|
210
|
-
incompatible("invalid_domain_id", value);
|
|
211
|
-
}
|
|
212
|
-
return value;
|
|
213
|
-
}
|
|
@@ -4,17 +4,10 @@ import type {
|
|
|
4
4
|
BridgeSnapshotEnvelope,
|
|
5
5
|
BridgeStreamCursor,
|
|
6
6
|
} from "../generated/protocol.ts";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
domainId,
|
|
10
|
-
integer,
|
|
11
|
-
opaqueId,
|
|
12
|
-
record,
|
|
13
|
-
} from "./base.ts";
|
|
7
|
+
import { domainId, integer, opaqueId, record } from "./base.ts";
|
|
8
|
+
import type { BridgeCodec } from "./base.ts";
|
|
14
9
|
|
|
15
|
-
export function parseBridgeStreamCursor(
|
|
16
|
-
value: unknown,
|
|
17
|
-
): BridgeStreamCursor {
|
|
10
|
+
export function parseBridgeStreamCursor(value: unknown): BridgeStreamCursor {
|
|
18
11
|
const source = record(value, BRIDGE_FIELDS.BridgeStreamCursor);
|
|
19
12
|
return {
|
|
20
13
|
sessionId: opaqueId(source.sessionId),
|
package/src/commands/client.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { attempt, disposeAll } from "../core/listeners.ts";
|
|
1
2
|
import {
|
|
2
3
|
assertValidCommandAvailabilitySnapshot,
|
|
3
4
|
assertValidCommandCatalogue,
|
|
@@ -22,6 +23,7 @@ import type {
|
|
|
22
23
|
CommandExecutionIntent,
|
|
23
24
|
CommandExecutionOutcome,
|
|
24
25
|
CommandPorts,
|
|
26
|
+
CommandSnapshotPort,
|
|
25
27
|
CommandUnlisten,
|
|
26
28
|
} from "./ports.ts";
|
|
27
29
|
|
|
@@ -54,25 +56,20 @@ export class CommandClient {
|
|
|
54
56
|
return { catalogue, keymap, availability };
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
async listen(invalidate: () => void): Promise<
|
|
59
|
+
async listen(invalidate: () => void): Promise<ReadonlyArray<CommandUnlisten>> {
|
|
58
60
|
const results = await Promise.allSettled(
|
|
59
|
-
[
|
|
60
|
-
|
|
61
|
-
this.#ports.keymap,
|
|
62
|
-
this.#ports.availability,
|
|
63
|
-
].flatMap((port) =>
|
|
64
|
-
port.listen === undefined ? [] : [port.listen(invalidate)],
|
|
61
|
+
[this.#ports.catalogue, this.#ports.keymap, this.#ports.availability].flatMap((port) =>
|
|
62
|
+
registrationOf(port, invalidate),
|
|
65
63
|
),
|
|
66
64
|
);
|
|
67
65
|
const unlisten = results.flatMap((result) =>
|
|
68
66
|
result.status === "fulfilled" ? [result.value] : [],
|
|
69
67
|
);
|
|
70
68
|
const failure = results.find(
|
|
71
|
-
(result): result is PromiseRejectedResult =>
|
|
72
|
-
result.status === "rejected",
|
|
69
|
+
(result): result is PromiseRejectedResult => result.status === "rejected",
|
|
73
70
|
);
|
|
74
71
|
if (failure !== undefined) {
|
|
75
|
-
await
|
|
72
|
+
await disposeAll(unlisten);
|
|
76
73
|
throw failure.reason;
|
|
77
74
|
}
|
|
78
75
|
return unlisten;
|
|
@@ -82,40 +79,52 @@ export class CommandClient {
|
|
|
82
79
|
return this.#ports.executor.execute(intent);
|
|
83
80
|
}
|
|
84
81
|
|
|
85
|
-
async preview(
|
|
86
|
-
request: CommandKeymapPreview,
|
|
87
|
-
): Promise<CommandKeymapPreviewResult> {
|
|
82
|
+
async preview(request: CommandKeymapPreview): Promise<CommandKeymapPreviewResult> {
|
|
88
83
|
assertValidCommandKeymapPreview(request);
|
|
89
|
-
const
|
|
90
|
-
if (preview === undefined)
|
|
91
|
-
|
|
84
|
+
const keymap = this.#ports.keymap;
|
|
85
|
+
if (keymap.preview === undefined) {
|
|
86
|
+
throw new CommandKeymapReadOnlyError();
|
|
87
|
+
}
|
|
88
|
+
const result = await keymap.preview(request);
|
|
92
89
|
assertValidCommandKeymapPreviewResult(result);
|
|
93
90
|
return result;
|
|
94
91
|
}
|
|
95
92
|
|
|
96
|
-
async commit(
|
|
97
|
-
request: CommandKeymapCommit,
|
|
98
|
-
): Promise<CommandKeymapMutationResult> {
|
|
93
|
+
async commit(request: CommandKeymapCommit): Promise<CommandKeymapMutationResult> {
|
|
99
94
|
assertValidCommandKeymapCommit(request);
|
|
100
|
-
const
|
|
101
|
-
if (commit === undefined)
|
|
102
|
-
|
|
95
|
+
const keymap = this.#ports.keymap;
|
|
96
|
+
if (keymap.commit === undefined) {
|
|
97
|
+
throw new CommandKeymapReadOnlyError();
|
|
98
|
+
}
|
|
99
|
+
const result = await keymap.commit(request);
|
|
103
100
|
assertValidCommandKeymapMutationResult(result);
|
|
104
101
|
return result;
|
|
105
102
|
}
|
|
106
103
|
|
|
107
|
-
async reset(
|
|
108
|
-
request: CommandKeymapReset,
|
|
109
|
-
): Promise<CommandKeymapMutationResult> {
|
|
104
|
+
async reset(request: CommandKeymapReset): Promise<CommandKeymapMutationResult> {
|
|
110
105
|
assertValidCommandKeymapReset(request);
|
|
111
|
-
const
|
|
112
|
-
if (reset === undefined)
|
|
113
|
-
|
|
106
|
+
const keymap = this.#ports.keymap;
|
|
107
|
+
if (keymap.reset === undefined) {
|
|
108
|
+
throw new CommandKeymapReadOnlyError();
|
|
109
|
+
}
|
|
110
|
+
const result = await keymap.reset(request);
|
|
114
111
|
assertValidCommandKeymapMutationResult(result);
|
|
115
112
|
return result;
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Starts one port's listener inside a promise, so its registration joins the
|
|
118
|
+
* settled set whether it returns, resolves or throws synchronously.
|
|
119
|
+
*/
|
|
120
|
+
function registrationOf(
|
|
121
|
+
port: CommandSnapshotPort<unknown>,
|
|
122
|
+
invalidate: () => void,
|
|
123
|
+
): Array<Promise<CommandUnlisten>> {
|
|
124
|
+
const listen = port.listen?.bind(port);
|
|
125
|
+
return listen === undefined ? [] : [attempt(() => listen(invalidate))];
|
|
126
|
+
}
|
|
127
|
+
|
|
119
128
|
export class CommandKeymapReadOnlyError extends Error {
|
|
120
129
|
constructor() {
|
|
121
130
|
super("command keymap mutation is not composed");
|