@riddledc/riddle-proof 0.7.12 → 0.7.14
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/basic-gameplay.cjs
CHANGED
|
@@ -51,6 +51,7 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
51
51
|
"repeat",
|
|
52
52
|
"click",
|
|
53
53
|
"click-by-text",
|
|
54
|
+
"set-input-value",
|
|
54
55
|
"canvas-click",
|
|
55
56
|
"canvas-pointer-down",
|
|
56
57
|
"canvas-pointer-move",
|
|
@@ -62,6 +63,9 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
62
63
|
var BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES = [
|
|
63
64
|
"selector_count_increases",
|
|
64
65
|
"selector_count_at_least",
|
|
66
|
+
"selector_count_equals",
|
|
67
|
+
"selector_count_equal",
|
|
68
|
+
"selector_count_eq",
|
|
65
69
|
"selector_absent",
|
|
66
70
|
"selector_text_matches",
|
|
67
71
|
"number_increases",
|
|
@@ -245,6 +249,11 @@ function assessBasicGameplayProgressionCheck(check) {
|
|
|
245
249
|
if (numericValue(check.min) === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
246
250
|
ok = numberValue(after?.count) >= numberValue(check.min);
|
|
247
251
|
reason = ok ? null : "selector_count_below_min";
|
|
252
|
+
} else if (type === "selector_count_equals" || type === "selector_count_equal" || type === "selector_count_eq") {
|
|
253
|
+
const expected = numericValue(check.expected ?? check.count ?? check.value);
|
|
254
|
+
if (expected === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
255
|
+
ok = numericValue(after?.count) !== null && expected !== null && numberValue(after?.count) === expected;
|
|
256
|
+
reason = ok ? null : "selector_count_did_not_equal_expected";
|
|
248
257
|
} else if (type === "selector_absent") {
|
|
249
258
|
ok = !after?.present || numberValue(after?.count) === 0;
|
|
250
259
|
reason = ok ? null : "selector_still_present";
|
|
@@ -36,8 +36,8 @@ interface BasicGameplayActionResult {
|
|
|
36
36
|
action?: string;
|
|
37
37
|
[key: string]: unknown;
|
|
38
38
|
}
|
|
39
|
-
declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
|
|
40
|
-
declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
|
|
39
|
+
declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "set-input-value", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
|
|
40
|
+
declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
|
|
41
41
|
type BasicGameplayActionType = typeof BASIC_GAMEPLAY_ACTION_TYPES[number] | (string & {});
|
|
42
42
|
type BasicGameplayProgressCheckType = typeof BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES[number] | (string & {});
|
|
43
43
|
interface BasicGameplayMetric {
|
package/dist/basic-gameplay.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ interface BasicGameplayActionResult {
|
|
|
36
36
|
action?: string;
|
|
37
37
|
[key: string]: unknown;
|
|
38
38
|
}
|
|
39
|
-
declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
|
|
40
|
-
declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
|
|
39
|
+
declare const BASIC_GAMEPLAY_ACTION_TYPES: readonly ["wait", "key", "key-down", "key-up", "hold-key", "repeat", "click", "click-by-text", "set-input-value", "canvas-click", "canvas-pointer-down", "canvas-pointer-move", "canvas-pointer-up", "wait-for-text", "window-call", "evaluate"];
|
|
40
|
+
declare const BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES: readonly ["selector_count_increases", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "selector_absent", "selector_text_matches", "number_increases", "number_decreases", "number_at_least", "number_gte", "number_unchanged", "number_stays_equal", "number_equals", "canvas_hash_changes", "screenshot_hash_changes", "visual_hash_changes", "state_changes"];
|
|
41
41
|
type BasicGameplayActionType = typeof BASIC_GAMEPLAY_ACTION_TYPES[number] | (string & {});
|
|
42
42
|
type BasicGameplayProgressCheckType = typeof BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES[number] | (string & {});
|
|
43
43
|
interface BasicGameplayMetric {
|
package/dist/basic-gameplay.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
extractBasicGameplayEvidence,
|
|
17
17
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
18
18
|
sanitizeBasicGameplayJsonString
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4KTD7CWM.js";
|
|
20
20
|
export {
|
|
21
21
|
BASIC_GAMEPLAY_ACTION_TYPES,
|
|
22
22
|
BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES,
|
|
@@ -11,6 +11,7 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
11
11
|
"repeat",
|
|
12
12
|
"click",
|
|
13
13
|
"click-by-text",
|
|
14
|
+
"set-input-value",
|
|
14
15
|
"canvas-click",
|
|
15
16
|
"canvas-pointer-down",
|
|
16
17
|
"canvas-pointer-move",
|
|
@@ -22,6 +23,9 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
22
23
|
var BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES = [
|
|
23
24
|
"selector_count_increases",
|
|
24
25
|
"selector_count_at_least",
|
|
26
|
+
"selector_count_equals",
|
|
27
|
+
"selector_count_equal",
|
|
28
|
+
"selector_count_eq",
|
|
25
29
|
"selector_absent",
|
|
26
30
|
"selector_text_matches",
|
|
27
31
|
"number_increases",
|
|
@@ -205,6 +209,11 @@ function assessBasicGameplayProgressionCheck(check) {
|
|
|
205
209
|
if (numericValue(check.min) === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
206
210
|
ok = numberValue(after?.count) >= numberValue(check.min);
|
|
207
211
|
reason = ok ? null : "selector_count_below_min";
|
|
212
|
+
} else if (type === "selector_count_equals" || type === "selector_count_equal" || type === "selector_count_eq") {
|
|
213
|
+
const expected = numericValue(check.expected ?? check.count ?? check.value);
|
|
214
|
+
if (expected === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
215
|
+
ok = numericValue(after?.count) !== null && expected !== null && numberValue(after?.count) === expected;
|
|
216
|
+
reason = ok ? null : "selector_count_did_not_equal_expected";
|
|
208
217
|
} else if (type === "selector_absent") {
|
|
209
218
|
ok = !after?.present || numberValue(after?.count) === 0;
|
|
210
219
|
reason = ok ? null : "selector_still_present";
|
package/dist/index.cjs
CHANGED
|
@@ -7820,6 +7820,7 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
7820
7820
|
"repeat",
|
|
7821
7821
|
"click",
|
|
7822
7822
|
"click-by-text",
|
|
7823
|
+
"set-input-value",
|
|
7823
7824
|
"canvas-click",
|
|
7824
7825
|
"canvas-pointer-down",
|
|
7825
7826
|
"canvas-pointer-move",
|
|
@@ -7831,6 +7832,9 @@ var BASIC_GAMEPLAY_ACTION_TYPES = [
|
|
|
7831
7832
|
var BASIC_GAMEPLAY_PROGRESS_CHECK_TYPES = [
|
|
7832
7833
|
"selector_count_increases",
|
|
7833
7834
|
"selector_count_at_least",
|
|
7835
|
+
"selector_count_equals",
|
|
7836
|
+
"selector_count_equal",
|
|
7837
|
+
"selector_count_eq",
|
|
7834
7838
|
"selector_absent",
|
|
7835
7839
|
"selector_text_matches",
|
|
7836
7840
|
"number_increases",
|
|
@@ -8014,6 +8018,11 @@ function assessBasicGameplayProgressionCheck(check) {
|
|
|
8014
8018
|
if (numericValue3(check.min) === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
8015
8019
|
ok = numberValue2(after?.count) >= numberValue2(check.min);
|
|
8016
8020
|
reason = ok ? null : "selector_count_below_min";
|
|
8021
|
+
} else if (type === "selector_count_equals" || type === "selector_count_equal" || type === "selector_count_eq") {
|
|
8022
|
+
const expected = numericValue3(check.expected ?? check.count ?? check.value);
|
|
8023
|
+
if (expected === null && hasExplicitResult) return resolveBasicGameplayProgressionCheckWithArtifactScreenshots({ ...check, ok, reason });
|
|
8024
|
+
ok = numericValue3(after?.count) !== null && expected !== null && numberValue2(after?.count) === expected;
|
|
8025
|
+
reason = ok ? null : "selector_count_did_not_equal_expected";
|
|
8017
8026
|
} else if (type === "selector_absent") {
|
|
8018
8027
|
ok = !after?.present || numberValue2(after?.count) === 0;
|
|
8019
8028
|
reason = ok ? null : "selector_still_present";
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
extractBasicGameplayEvidence,
|
|
37
37
|
resolveBasicGameplayProgressionCheckWithArtifactScreenshots,
|
|
38
38
|
sanitizeBasicGameplayJsonString
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4KTD7CWM.js";
|
|
40
40
|
import {
|
|
41
41
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
42
42
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|