@atolis-hq/wake 0.3.50 → 0.3.51
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.
|
@@ -13,7 +13,7 @@ export function parseWakeCommand(arguments_) {
|
|
|
13
13
|
workItemId: requiredArgument(second, 'correlate work item'),
|
|
14
14
|
};
|
|
15
15
|
case 'validate-state':
|
|
16
|
-
return parseValidateState(
|
|
16
|
+
return parseValidateState(arguments_.slice(1));
|
|
17
17
|
case 'api':
|
|
18
18
|
case 'ui':
|
|
19
19
|
return { kind: command, ...parseHostOptions(arguments_.slice(1)) };
|
|
@@ -33,11 +33,27 @@ export function parseWakeCommand(arguments_) {
|
|
|
33
33
|
throw new Error(`Unknown wake command: ${command ?? ''}`);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function parseValidateState(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
function parseValidateState(arguments_) {
|
|
37
|
+
let rebuildProjections = false;
|
|
38
|
+
let wakeRoot;
|
|
39
|
+
for (let index = 0; index < arguments_.length; index += 1) {
|
|
40
|
+
const argument = arguments_[index];
|
|
41
|
+
if (argument === '--rebuild-projections' && !rebuildProjections) {
|
|
42
|
+
rebuildProjections = true;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (argument === '--wake-root') {
|
|
46
|
+
wakeRoot = requiredArgument(arguments_[index + 1], 'value for --wake-root');
|
|
47
|
+
index += 1;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
throw new Error('validate-state accepts only --rebuild-projections and --wake-root <path>');
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
kind: 'validate-state',
|
|
54
|
+
rebuildProjections,
|
|
55
|
+
...(wakeRoot === undefined ? {} : { wakeRoot }),
|
|
56
|
+
};
|
|
41
57
|
}
|
|
42
58
|
function parseResidentCommand(kind, arguments_) {
|
|
43
59
|
const options = parseHostOptions(arguments_, false);
|