nukadoko 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +126 -0
- data/README.ja.md +5 -3
- data/README.md +5 -3
- data/lib/nukadoko/aria_snapshot.rb +4 -4
- data/lib/nukadoko/base.rb +49 -29
- data/lib/nukadoko/check.rb +4 -4
- data/lib/nukadoko/claim_check.rb +2 -2
- data/lib/nukadoko/claim_rules.rb +1 -1
- data/lib/nukadoko/claim_sides.rb +469 -0
- data/lib/nukadoko/claims.rb +182 -20
- data/lib/nukadoko/cli.rb +16 -7
- data/lib/nukadoko/codes.json +20 -15
- data/lib/nukadoko/criteria.rb +1 -1
- data/lib/nukadoko/env_check.rb +1 -3
- data/lib/nukadoko/fixtures.rb +53 -21
- data/lib/nukadoko/init.rb +0 -1
- data/lib/nukadoko/js_json.rb +274 -0
- data/lib/nukadoko/js_pattern.rb +531 -0
- data/lib/nukadoko/parts.rb +1 -1
- data/lib/nukadoko/pattern.rb +62 -2
- data/lib/nukadoko/poll.rb +5 -3
- data/lib/nukadoko/program.rb +5 -5
- data/lib/nukadoko/project_files.rb +17 -0
- data/lib/nukadoko/project_program.rb +119 -0
- data/lib/nukadoko/run.rb +47 -17
- data/lib/nukadoko/run_record.rb +25 -22
- data/lib/nukadoko/schema.rb +60 -18
- data/lib/nukadoko/secrets.rb +20 -4
- data/lib/nukadoko/spaces.rb +28 -0
- data/lib/nukadoko/step.rb +7 -1
- data/lib/nukadoko/text_fit.rb +1 -1
- data/lib/nukadoko/tree_passes.rb +6 -3
- data/lib/nukadoko/version.rb +1 -1
- data/lib/nukadoko.rb +24 -2
- data/llms.txt +12 -11
- data/sig/generated/nukadoko/aria_snapshot.rbs +2 -2
- data/sig/generated/nukadoko/base.rbs +24 -18
- data/sig/generated/nukadoko/check.rbs +1 -1
- data/sig/generated/nukadoko/claim_sides.rbs +207 -0
- data/sig/generated/nukadoko/claims.rbs +46 -3
- data/sig/generated/nukadoko/cli.rbs +1 -1
- data/sig/generated/nukadoko/env_check.rbs +0 -4
- data/sig/generated/nukadoko/fixtures.rbs +25 -2
- data/sig/generated/nukadoko/init.rbs +0 -2
- data/sig/generated/nukadoko/js_json.rbs +109 -0
- data/sig/generated/nukadoko/js_pattern.rbs +194 -0
- data/sig/generated/nukadoko/pattern.rbs +34 -0
- data/sig/generated/nukadoko/poll.rbs +3 -2
- data/sig/generated/nukadoko/program.rbs +1 -1
- data/sig/generated/nukadoko/project_files.rbs +19 -0
- data/sig/generated/nukadoko/project_program.rbs +55 -0
- data/sig/generated/nukadoko/run.rbs +10 -3
- data/sig/generated/nukadoko/run_record.rbs +5 -4
- data/sig/generated/nukadoko/schema.rbs +22 -4
- data/sig/generated/nukadoko/secrets.rbs +17 -2
- data/sig/generated/nukadoko/spaces.rbs +31 -0
- data/sig/generated/nukadoko/tree_passes.rbs +2 -2
- data/sig/generated/nukadoko.rbs +11 -0
- data/skills/nukadoko/SKILL.md +2 -2
- data/skills/nukadoko/references/diagnosing.md +1 -1
- data/skills/nukadoko/references/examples/http-api.md +19 -16
- data/skills/nukadoko/references/fixtures.md +1 -1
- data/skills/nukadoko/references/perturbed-worlds.md +8 -6
- data/skills/nukadoko/references/program.md +20 -20
- data/skills/nukadoko/references/running.md +2 -2
- data/skills/nukadoko/references/scenario-rules.md +2 -2
- data/skills/nukadoko/references/verdicts.md +3 -3
- data/skills/nukadoko/references/writing-steps.md +1 -1
- data/skills/nukadoko-verification/SKILL.md +6 -6
- metadata +13 -1
data/lib/nukadoko.rb
CHANGED
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
require "json"
|
|
5
5
|
require_relative "nukadoko/version"
|
|
6
|
+
require_relative "nukadoko/project_files"
|
|
7
|
+
require_relative "nukadoko/spaces"
|
|
8
|
+
require_relative "nukadoko/js_pattern"
|
|
6
9
|
require_relative "nukadoko/schema"
|
|
7
10
|
require_relative "nukadoko/step"
|
|
8
11
|
require_relative "nukadoko/pattern"
|
|
9
12
|
require_relative "nukadoko/features"
|
|
10
13
|
require_relative "nukadoko/codes"
|
|
11
14
|
require_relative "nukadoko/selection"
|
|
15
|
+
require_relative "nukadoko/js_json"
|
|
12
16
|
require_relative "nukadoko/claims"
|
|
17
|
+
require_relative "nukadoko/claim_sides"
|
|
13
18
|
require_relative "nukadoko/aria_snapshot"
|
|
14
19
|
require_relative "nukadoko/judgments"
|
|
15
20
|
require_relative "nukadoko/judgment_file"
|
|
@@ -36,6 +41,7 @@ require_relative "nukadoko/claim_rules"
|
|
|
36
41
|
require_relative "nukadoko/definition"
|
|
37
42
|
require_relative "nukadoko/vocabulary"
|
|
38
43
|
require_relative "nukadoko/program"
|
|
44
|
+
require_relative "nukadoko/project_program"
|
|
39
45
|
require_relative "nukadoko/table"
|
|
40
46
|
require_relative "nukadoko/order"
|
|
41
47
|
require_relative "nukadoko/run_record"
|
|
@@ -53,10 +59,26 @@ require_relative "nukadoko/init"
|
|
|
53
59
|
require_relative "nukadoko/skill"
|
|
54
60
|
|
|
55
61
|
module Nukadoko
|
|
62
|
+
# What a program file of a release before the program moved into the
|
|
63
|
+
# config calls. Only a `--base` ref still holds one, and the run reads it
|
|
64
|
+
# in a process of its own (Engine::ProjectProgram.elsewhere).
|
|
56
65
|
#: (**untyped) -> Hash[Symbol, untyped]
|
|
57
|
-
def self.program(**options) = (@
|
|
66
|
+
def self.program(**options) = (@legacy_program = options)
|
|
67
|
+
#: () -> Hash[Symbol, untyped]?
|
|
68
|
+
def self.legacy_program = @legacy_program
|
|
69
|
+
# The program under test of the project whose config load_project read.
|
|
58
70
|
#: () -> Hash[Symbol, untyped]
|
|
59
|
-
def self.program_options = @
|
|
71
|
+
def self.program_options = @program_options || {}
|
|
72
|
+
|
|
73
|
+
# Loads the config of the project at `root`, and reads its program.
|
|
74
|
+
#: (String) -> void
|
|
75
|
+
def self.load_project(root)
|
|
76
|
+
config = File.join(root, Engine::CONFIG)
|
|
77
|
+
@legacy_program = nil
|
|
78
|
+
load config if File.exist?(config)
|
|
79
|
+
@program_options = Engine::ProjectProgram.read(root)
|
|
80
|
+
end
|
|
81
|
+
|
|
60
82
|
#: (**untyped) -> Hash[Symbol, untyped]
|
|
61
83
|
def self.config(**options) = (@config = options)
|
|
62
84
|
#: () -> Hash[Symbol, untyped]
|
data/llms.txt
CHANGED
|
@@ -121,8 +121,8 @@ Every code a finding can carry. `nuka check --codes` prints the same list as fin
|
|
|
121
121
|
| `claim-sentence-unread` | error | A claim step with no observe is bound to a line whose docstring or table fills an args key, and no claim reads that key (as an actual, an expected value, or in where), so nothing checks the value the line states. defineStep refuses a pattern capture no claim reads; only the line says whether a docstring or a table fills a key, so this half is the check's, and nuka run breaks the step's claims for it too. | Compare a claim with the key (expected: "<key>"), or take the docstring or table off the line. |
|
|
122
122
|
| `claims-outside-then` | error | A claim step is bound in Given or When position, or on a * line, which Gherkin gives no position. Only a Then judges, so a broken claim there would read as a setup that broke instead of a criterion that failed. | Move the line to Then position, or bind a step that runs (defineStep with run) at this line. |
|
|
123
123
|
| `compat-step-not-runnable` | refused | nuka do names a compat step, which has no typed contract to run alone. | Promote the step to defineStep to run it with nuka do. |
|
|
124
|
-
| `condition-tag-malformed` | error | A tag starts with @with: or @without: but does not read as @with:<condition>, @with:<condition>=<value>, or @without:<condition>, so it names no condition. @with:<condition>=true and =false are malformed too: a value written as text is not the boolean the program
|
|
125
|
-
| `condition-unknown` | error | A condition tag names a condition that no environment in nukadoko.
|
|
124
|
+
| `condition-tag-malformed` | error | A tag starts with @with: or @without: but does not read as @with:<condition>, @with:<condition>=<value>, or @without:<condition>, so it names no condition. @with:<condition>=true and =false are malformed too: a value written as text is not the boolean the program declares. | Rewrite the tag as @with:<condition>, @with:<condition>=<value>, or @without:<condition>; a condition name holds letters, digits, "_", ".", or "-", a value holds no whitespace and no "@", and a boolean is @with:<condition> or @without:<condition>. |
|
|
125
|
+
| `condition-unknown` | error | A condition tag names a condition that no environment in the program in nukadoko.config.ts declares under conditions, so no environment sets it up. | Declare the condition under the conditions of the environments that set it up in the program in nukadoko.config.ts, or remove the tag. |
|
|
126
126
|
| `condition-unmet` | error | No environment the run selects meets every condition a scenario's tags name, so the scenario has no required cell and nothing shows that it holds. | Add an environment whose conditions meet the scenario's tags, name one with --env, or correct the tags. |
|
|
127
127
|
| `config-exists` | refused | nuka init found a config file, and writes nothing over it. | Edit the config file that exists, or delete it to start again. |
|
|
128
128
|
| `config-in-parent` | refused | There is no config file here, and one exists in a parent directory, so a file written here is not one that config reads. | Run the command from the directory that holds the config file. |
|
|
@@ -142,14 +142,14 @@ Every code a finding can carry. `nuka check --codes` prints the same list as fin
|
|
|
142
142
|
| `env-file-missing` | warning | A configured envFile does not exist on disk, so nothing in it is ever loaded. | Create the file, or remove it from envFiles in the config file. |
|
|
143
143
|
| `env-file-skipped-line` | warning | A line in a configured envFile is not a blank line, a comment, or a binding, so nothing on it was loaded. | Rewrite the line as KEY=value, or start it with # to make it a comment. |
|
|
144
144
|
| `env-file-unreadable` | refused | A configured envFiles path is on disk and could not be read: a directory, or a file without read permission. The run stops before any step runs. | Make the file readable, replace the directory with a file, or remove the path from envFiles. |
|
|
145
|
-
| `environment-env-file-missing` | warning | An entry in one environment's own envFiles does not exist on disk. | Create the file, or remove it from that environment's envFiles in nukadoko.
|
|
146
|
-
| `events-inlet-missing` | error | A step's events counts execution events, and a world the run would serve names no {events} in its program
|
|
145
|
+
| `environment-env-file-missing` | warning | An entry in one environment's own envFiles does not exist on disk. | Create the file, or remove it from that environment's envFiles in the program in nukadoko.config.ts. |
|
|
146
|
+
| `events-inlet-missing` | error | A step's events counts execution events, and a world the run would serve names no {events} in its program, so the program has no file to write them to and each claim on the count is unjudged there (inlet-unnamed). | Set the variable the program reads to {events} under env in the program, such as EXECUTION_EVENTS: "{events}", and have the program append its execution events to that file. |
|
|
147
147
|
| `events-late` | note | nuka do found lines of the program's execution events that carry the step's trace id and arrived after the step ended, when the world stopped. They are in events-late.jsonl beside the step record, and are not in its observed.events. | No change is necessary. A job the step enqueued that performed after the step ended writes its lines then; observed.events.open names a job that had not performed. |
|
|
148
148
|
| `events-producer-ambiguous` | error | A step's events names more than one candidate step in of, and more than one of them runs earlier in the scenario, so the run cannot choose whose execution events to count and each claim on the count is unjudged. | Remove or move lines so that exactly one of the candidate steps runs before the line that counts their events. |
|
|
149
149
|
| `events-producer-missing` | error | A step's events counts the execution events of a step that no earlier line in the scenario runs, so each claim on the count is unjudged (producer-not-run). | Put a line that runs the step earlier in the scenario, or list the step an earlier line runs in that key's of. |
|
|
150
|
-
| `events-unread` | warning | A step's events counts execution events, and a world the run would start is one nukadoko does not serve (a url, or a project
|
|
150
|
+
| `events-unread` | warning | A step's events counts execution events, and a world the run would start is one nukadoko does not serve (a url, or a project whose config has no program), so it reads no execution events there and each claim on the count is unjudged (world-unread). | Run those scenarios in a world nukadoko serves, with {events} in env, or select one with --env. |
|
|
151
151
|
| `expects-tag-malformed` | error | A tag starts with @expects: but does not read as @expects:status=<500-599>, @expects:error=<class>, or @expects:page-error=<name>: an unknown kind, no value, a status outside 500 to 599, or a value with whitespace or "@". It accepts nothing, so under nuka run --no-check the failure it meant stays unexpected and its cell is broke. | Rewrite the tag as @expects:status=<500-599>, @expects:error=<class>, or @expects:page-error=<name>, one status, class, or name per tag; the unexpected-failure finding of a run spells the tag for what it saw. |
|
|
152
|
-
| `expects-unread` | warning | An @expects:error= tag accepts an unhandled error the program reports in its execution events, and no world the run would start reads them (the program
|
|
152
|
+
| `expects-unread` | warning | An @expects:error= tag accepts an unhandled error the program reports in its execution events, and no world the run would start reads them (the program names no {events}, the world runs at a url, or there is no program), so the tag can never match. | Name {events} in env of the program in nukadoko.config.ts for a world the run starts, such as env: { EXECUTION_EVENTS: "{events}" }, and have the program append its execution events there, or remove the tag. |
|
|
153
153
|
| `expects-unseen` | note | A scenario whose every execution passed carries an @expects: tag that matched nothing: the run saw every response, page error, or execution event of that kind in each execution, and none was the failure the tag accepts. A tag left in place accepts that failure in every later run. | Remove the tag when the failure it accepts no longer happens. When the failure is meant to happen, make the scenario cause it, so the tag names what the scenario does. |
|
|
154
154
|
| `fail-on-note-with-targets` | refused | nuka check with targets was given a --fail-on note code, and a check with targets computes no notes, so the gate could never fire. | Run nuka check without targets to gate on a note, or leave the note out of --fail-on. |
|
|
155
155
|
| `fail-on-unknown-code` | refused | --fail-on names a code that a nuka check report never contains. | Name an error, warning, or note code that nuka check --codes lists. |
|
|
@@ -208,10 +208,11 @@ Every code a finding can carry. `nuka check --codes` prints the same list as fin
|
|
|
208
208
|
| `pause-not-current` | refused | nuka step answers a pause that is not the one the walk waits at: the walk has not reached it yet, has moved past it without that answer, or ended without reaching it. | Run nuka step wait --walk <n> to see the pause the walk waits at, and answer that pause. |
|
|
209
209
|
| `playwright-missing` | error | A feature line binds a step whose fixtures build page, context, pageAs, or request, and playwright does not resolve from the installed nukadoko, so the step would fail when it runs; or a step file imports playwright, playwright-core, or @playwright/test, itself or through another project file that the message names, which the project has not installed, so the file does not import. A step is reported once, at the first line that binds it. | Install the package that the message names in the project, at the version that the message names. |
|
|
210
210
|
| `program-exited` | warning | The program a world served exited while the scenarios still ran, so the requests after that found nothing listening. | Read the world's program.log, which the message names, for why the program exited. |
|
|
211
|
-
| `program-
|
|
211
|
+
| `program-file-moved` | refused | The project root holds a program file (nukadoko.program.ts, .mts, or .rb), which an earlier release read and this one does not: the program is part of the config now. | Move what the program file describes into the config as its program (program: () => ({ ... }) in nukadoko.config.ts, program: -> { { ... } } in nukadoko.config.rb), and delete the program file; CHANGELOG.md, under "The program moves into the config", shows the move. |
|
|
212
|
+
| `program-list-unread` | warning | A command under lists in the program in nukadoko.config.ts failed, passed its limit, or printed a line that is not one entry of its list, so that world's list was not read and nothing of it counts. | Correct the command the message names, or what it prints: one JSON object per line, in the shape docs/spec.md "Lists" gives for its kind. Its stderr is in the world's program.log. |
|
|
212
213
|
| `program-log-late` | note | nuka do found lines of the program's log that carry the step's trace id and arrived after the step ended, when the world stopped. They are in program-log-late.txt beside the step record, and are not in its observed.program_log. | No change is necessary. When it happens on every call, the program may buffer its output on a pipe; if so, set STDOUT.sync = true in Ruby, or PYTHONUNBUFFERED=1 for Python. |
|
|
213
|
-
| `program-placeholder-unfilled` | error | A command or an env value in nukadoko.
|
|
214
|
-
| `program-start-failed` | failed | The program in nukadoko.
|
|
214
|
+
| `program-placeholder-unfilled` | error | A command or an env value in the program in nukadoko.config.ts names a placeholder a world that nuka run with the same --env flags would start has no value for: {port} or {url} in a world with neither serve nor url, {condition.<name>} in one whose environment does not declare that condition, or anything but {root} in a build command. | Remove the placeholder from the field the message names, or give the world what fills it: serve or url for {port} or {url}, the condition under its environment's conditions for {condition.<name>}; in a build command, write only {root}, or move the command to prepare. |
|
|
215
|
+
| `program-start-failed` | failed | The program in nukadoko.config.ts did not start for a world: a build or prepare command failed or did not finish within its timeout_ms, the server did not answer its ready path in time, or setup or the url function threw or did not finish within its timeout_ms. The world's scenarios did not run. | Correct what the message names; the end of the world's program.log is in the message, and the whole file is in the world's directory. |
|
|
215
216
|
| `proof-run-incomplete` | warning | Under --concurrency, a proof round could not record a control's run: a BeforeAll or AfterAll hook failed in the worker the round started, or the worker exited without a record. Each control cell the round was given reads broke with the reason and proves nothing, so its row reads as one no control proves: held without --base, and under --base the base world runs for it. | Correct what the message names, such as the hook; the control proves on the next run. |
|
|
216
217
|
| `read-only-environment` | refused | A step that declares mutates: true targets an environment whose policy is read-only. | Run the step against an environment that allows writes, or declare mutates: false if it only reads. |
|
|
217
218
|
| `record-unmatched` | warning | A worker reported a record that matches no selected scenario, so nuka report cannot render it. | Run again without changing feature files while the run is in progress. |
|
|
@@ -266,13 +267,13 @@ Every code a finding can carry. `nuka check --codes` prints the same list as fin
|
|
|
266
267
|
| `unexpected-failure` | failed | A scenario's steps passed and the program failed underneath one of them in a way no @expects: tag of the scenario names: a response with a status from 500 to 599, an error the page threw that nothing caught, or an error the program reported in its execution events with handled: false. Its cell is broke, so the claims that held prove nothing about the criterion. | Fix what failed in the program. A scenario that causes the failure on purpose names it with a tag on its Scenario line, such as @expects:status=503, @expects:error=<class>, or @expects:page-error=<name>; the finding's fix: line spells the tag. |
|
|
267
268
|
| `unfillable-required-key` | error | A step's args key is required, but nothing on this line (no pattern capture, no table/docstring attachment, and no declared from) can ever fill it. | Capture the key in the pattern, attach a table or a docstring, declare from for the key, or make the key optional. |
|
|
268
269
|
| `unknown-capture-key` | error | A pattern captures a key that is not a key of the step's args schema. | Rename the capture to a key of the args schema, or add the key to the schema. |
|
|
269
|
-
| `unknown-environment` | refused | --env names an environment that nukadoko.
|
|
270
|
+
| `unknown-environment` | refused | --env names an environment that the program in nukadoko.config.ts does not define. | Pass default or an environment the program in nukadoko.config.ts defines, or add it to environments there. |
|
|
270
271
|
| `unknown-parameter-type` | error | A pattern names a parameter type this project has not registered, such as {custom} with no matching config.parameterTypes entry. | Register the type in config.parameterTypes, or use a built-in type such as {key:string}. |
|
|
271
272
|
| `unknown-step` | refused | The command names a step that is not in the vocabulary. | Name a step that nuka steps lists. |
|
|
272
273
|
| `unnamed-capture` | error | A step's pattern has a capture with no name, such as {int} instead of {key:int}; every capture must name the args key it fills. | Name the capture after the args key that it fills, as {key:type}. |
|
|
273
274
|
| `unsupported-hook-tag-expression` | error | A compat hook's tag expression could not be parsed, so nukadoko cannot tell which scenarios it applies to. | Rewrite the hook's tags as a tag expression that nukadoko parses, such as @a and not @b. |
|
|
274
275
|
| `unterminated-capture` | error | A pattern has an opening { with no matching closing }, so the pattern cannot be parsed. | Close the capture with }, or escape a literal { as \\{. |
|
|
275
|
-
| `version-probe-failed` | warning | The environment's version probe did not answer, so the records have no target version. | Correct the environment's version setting in nukadoko.
|
|
276
|
+
| `version-probe-failed` | warning | The environment's version probe did not answer, so the records have no target version. | Correct the environment's version setting in the program in nukadoko.config.ts, or the endpoint it names. |
|
|
276
277
|
| `walk-failed` | failed | nuka step found the walk paused after a step that failed, or after a step whose AfterStep hook failed: the scenario is failed, and the pause names which of them failed and its message. The walk still waits for its answer, and nothing is left to stop. | Show the person the failure and the pause's views, answer next when they have seen it, and read the step record for the cause. |
|
|
277
278
|
| `walk-gone` | failed | nuka step found a walk whose nuka run --step process ended without recording how: it was killed, or it crashed, so its world, its browser, and its fixtures may not have been torn down. | Stop what the walk left running, if anything, and start the walk again with the command the finding names. |
|
|
278
279
|
| `walk-in-progress` | refused | nuka run --step found another walk in progress in this project: one walk at a time, since nuka step answers the walk the state directory names. | Finish the walk in progress with nuka step, or stop its nuka run --step process, then start this one. |
|
|
@@ -33,9 +33,9 @@ module Nukadoko
|
|
|
33
33
|
FRAGMENT: ::String
|
|
34
34
|
|
|
35
35
|
# JavaScript's \s, which the TypeScript engine's texts are cut by.
|
|
36
|
-
SPACE:
|
|
36
|
+
SPACE: String
|
|
37
37
|
|
|
38
|
-
WS:
|
|
38
|
+
WS: Regexp
|
|
39
39
|
|
|
40
40
|
# YAML's indicators: a plain scalar may not start with one, since
|
|
41
41
|
# YAML reads it as structure.
|
|
@@ -6,14 +6,19 @@
|
|
|
6
6
|
#
|
|
7
7
|
# - base: the ref's code with head's features/ and config, so a new or
|
|
8
8
|
# changed criterion runs where its behaviour should be absent. The ref's
|
|
9
|
-
# program
|
|
9
|
+
# program starts it, or head's when the ref has none: the program goes
|
|
10
|
+
# with the code, so the run writes the ref's config beside head's as
|
|
11
|
+
# nukadoko.tree-program.rb (or the ref's program file from before the
|
|
12
|
+
# program moved into the config as nukadoko.tree-legacy-program.rb).
|
|
10
13
|
# - old: head's working tree with the ref's features/ and config, so an
|
|
11
14
|
# unchanged criterion over a changed mapping runs under the steps it was
|
|
12
|
-
# approved with.
|
|
15
|
+
# approved with. Head's config goes beside it as nukadoko.tree-program.rb,
|
|
16
|
+
# so head's program starts it.
|
|
13
17
|
#
|
|
14
18
|
# The mapping is every file under features/ but a .feature file, the config
|
|
15
|
-
# file's bytes, and the program
|
|
16
|
-
# which decide where a criterion is
|
|
19
|
+
# file's bytes with its program lambda cut out, and the program's
|
|
20
|
+
# conditions and defaultEnvironments, which decide where a criterion is
|
|
21
|
+
# required. Every git command runs with
|
|
17
22
|
# hooks off, since a checkout's hook is the project's code and not the
|
|
18
23
|
# run's. Both trees are removed when the run ends.
|
|
19
24
|
module Nukadoko
|
|
@@ -23,10 +28,6 @@ module Nukadoko
|
|
|
23
28
|
|
|
24
29
|
FEATURES: ::String
|
|
25
30
|
|
|
26
|
-
CONFIG: ::String
|
|
27
|
-
|
|
28
|
-
PROGRAM: ::String
|
|
29
|
-
|
|
30
31
|
STATE: ::String
|
|
31
32
|
|
|
32
33
|
attr_reader ref: String
|
|
@@ -83,7 +84,7 @@ module Nukadoko
|
|
|
83
84
|
def prepare: (Array[[ String, Integer ]], Array[String]?, Array[String], Hash[Symbol, untyped]?) -> void
|
|
84
85
|
|
|
85
86
|
# The environments the old world runs in, with the conditions the ref's
|
|
86
|
-
# program
|
|
87
|
+
# program gives each; nil when the ref has no program, so
|
|
87
88
|
# head's environments are the old world's too.
|
|
88
89
|
# : (Hash[Symbol, untyped]?, Array[String]) -> Array[Environment]?
|
|
89
90
|
def old_environments_of: (Hash[Symbol, untyped]?, Array[String]) -> Array[Environment]?
|
|
@@ -108,10 +109,11 @@ module Nukadoko
|
|
|
108
109
|
# : (Array[String], String) -> Hash[String, String]
|
|
109
110
|
def mapping_files: (Array[String], String) -> Hash[String, String]
|
|
110
111
|
|
|
111
|
-
# The ref's program
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
|
|
112
|
+
# The ref's program: its program file from before the program moved
|
|
113
|
+
# into the config, or its config's program, read in a process of its
|
|
114
|
+
# own (ProjectProgram.elsewhere). nil when the ref has neither.
|
|
115
|
+
# : (String) -> Hash[Symbol, untyped]?
|
|
116
|
+
def read_program: (String) -> Hash[Symbol, untyped]?
|
|
115
117
|
|
|
116
118
|
# : (Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
|
|
117
119
|
def program_mapping: (Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
|
|
@@ -122,13 +124,17 @@ module Nukadoko
|
|
|
122
124
|
# : (String, String) -> void
|
|
123
125
|
def copy: (String, String) -> void
|
|
124
126
|
|
|
125
|
-
# The ref's checkout loses the ref's mapping and gains head's
|
|
126
|
-
# ref's program
|
|
127
|
-
#
|
|
128
|
-
|
|
127
|
+
# The ref's checkout loses the ref's mapping and gains head's. The
|
|
128
|
+
# ref's program stays: its program file under the tree's own name, or
|
|
129
|
+
# its config `ref_config` beside head's. When the ref has no program,
|
|
130
|
+
# head's config brings head's.
|
|
131
|
+
# : (Array[String], Array[String], String?) -> void
|
|
132
|
+
def overlay_base_tree: (Array[String], Array[String], String?) -> void
|
|
129
133
|
|
|
130
134
|
# Head's working tree with the ref's mapping in place of its own,
|
|
131
|
-
# written before the base checkout is overlaid.
|
|
135
|
+
# written before the base checkout is overlaid. Head's program stays:
|
|
136
|
+
# head's config goes beside the ref's, or a file that names no
|
|
137
|
+
# program when head has no config.
|
|
132
138
|
# : (Array[String], Array[String]) -> void
|
|
133
139
|
def write_old_tree: (Array[String], Array[String]) -> void
|
|
134
140
|
end
|
|
@@ -51,7 +51,7 @@ module Nukadoko
|
|
|
51
51
|
# `environments` is the selection a run without --env starts, for
|
|
52
52
|
# condition-unmet; nil when --env named the selection. `problems` are
|
|
53
53
|
# what the feature loader found that runs nothing.
|
|
54
|
-
# `config` holds what was found in the config and
|
|
54
|
+
# `config` holds what was found in the config and its program before
|
|
55
55
|
# any step loaded, such as an env file that is missing.
|
|
56
56
|
# : (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding]) -> void
|
|
57
57
|
def initialize: (Array[singleton(Step)], Array[Scenario], ?features: bool, ?full: bool, ?conditions: Array[String]?, ?environments: Array[Environment]?, ?problems: Array[FeatureProblem], ?config: Array[Finding]) -> void
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/claim_sides.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# Responsibility: the two sides of a top-level comparison claim, read as the
|
|
4
|
+
# TypeScript engine reads them: where each value sits (its place, whose
|
|
5
|
+
# label a reason names), the plain JSON copy a claim judges, and what stops
|
|
6
|
+
# a claim before any compare runs (a value that is undefined, one that is
|
|
7
|
+
# not plain JSON, a view that cannot read it, a claim that compares a value
|
|
8
|
+
# with itself or with one observe could have returned). It reads; the
|
|
9
|
+
# compares stay in Claims.compare. A claim on each item of a list is read
|
|
10
|
+
# elsewhere.
|
|
11
|
+
module Nukadoko
|
|
12
|
+
module Engine
|
|
13
|
+
module ClaimSides
|
|
14
|
+
class Place < Data
|
|
15
|
+
attr_reader origin(): String
|
|
16
|
+
|
|
17
|
+
attr_reader segments(): Array[String]
|
|
18
|
+
|
|
19
|
+
attr_reader label(): String
|
|
20
|
+
|
|
21
|
+
attr_reader open(): bool
|
|
22
|
+
|
|
23
|
+
def self.new: (String origin, Array[String] segments, String label, bool open) -> instance
|
|
24
|
+
| (origin: String, segments: Array[String], label: String, open: bool) -> instance
|
|
25
|
+
|
|
26
|
+
def self.members: () -> [ :origin, :segments, :label, :open ]
|
|
27
|
+
|
|
28
|
+
def members: () -> [ :origin, :segments, :label, :open ]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# What one side read: a value, or why the claim breaks or is not judged.
|
|
32
|
+
class Side < Data
|
|
33
|
+
attr_reader place(): Place
|
|
34
|
+
|
|
35
|
+
attr_reader found(): Hash[Symbol, untyped]
|
|
36
|
+
|
|
37
|
+
def self.new: (Place place, Hash[Symbol, untyped] found) -> instance
|
|
38
|
+
| (place: Place, found: Hash[Symbol, untyped]) -> instance
|
|
39
|
+
|
|
40
|
+
def self.members: () -> [ :place, :found ]
|
|
41
|
+
|
|
42
|
+
def members: () -> [ :place, :found ]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
OBSERVE: untyped
|
|
46
|
+
|
|
47
|
+
LITERAL: untyped
|
|
48
|
+
|
|
49
|
+
SAFE: untyped
|
|
50
|
+
|
|
51
|
+
MAX_DEPTH: ::Integer
|
|
52
|
+
|
|
53
|
+
INDEX: ::Regexp
|
|
54
|
+
|
|
55
|
+
# Where a claim reads from: what observe returned with the from values
|
|
56
|
+
# merged in, the args, whether the step observes, its from keys, the
|
|
57
|
+
# label of each args key's origin, and the args keys observe received.
|
|
58
|
+
class Inputs < Data
|
|
59
|
+
attr_reader observed(): untyped
|
|
60
|
+
|
|
61
|
+
attr_reader args(): untyped
|
|
62
|
+
|
|
63
|
+
attr_reader observes(): bool
|
|
64
|
+
|
|
65
|
+
attr_reader from_keys(): Array[String]
|
|
66
|
+
|
|
67
|
+
attr_reader labels(): ^(String) -> String
|
|
68
|
+
|
|
69
|
+
attr_reader received(): Array[String]
|
|
70
|
+
|
|
71
|
+
def self.new: (untyped observed, untyped args, bool observes, Array[String] from_keys, ^(String) -> String labels, Array[String] received) -> instance
|
|
72
|
+
| (observed: untyped, args: untyped, observes: bool, from_keys: Array[String], labels: ^(String) -> String, received: Array[String]) -> instance
|
|
73
|
+
|
|
74
|
+
def self.members: () -> [ :observed, :args, :observes, :from_keys, :labels, :received ]
|
|
75
|
+
|
|
76
|
+
def members: () -> [ :observed, :args, :observes, :from_keys, :labels, :received ]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# : (Place, String?) -> Place
|
|
80
|
+
def self.place_at: (Place, String?) -> Place
|
|
81
|
+
|
|
82
|
+
# : (Place, String?) -> Place
|
|
83
|
+
def self.place_viewed: (Place, String?) -> Place
|
|
84
|
+
|
|
85
|
+
# : (Place, bool?) -> Place
|
|
86
|
+
def self.place_counted: (Place, bool?) -> Place
|
|
87
|
+
|
|
88
|
+
# : (Place, Place) -> bool
|
|
89
|
+
def self.same_place?: (Place, Place) -> bool
|
|
90
|
+
|
|
91
|
+
# : (Place, Place) -> bool
|
|
92
|
+
def self.overlap?: (Place, Place) -> bool
|
|
93
|
+
|
|
94
|
+
# : (String, Inputs) -> Place
|
|
95
|
+
def self.arg_place: (String, Inputs) -> Place
|
|
96
|
+
|
|
97
|
+
# : (String) -> Array[String]
|
|
98
|
+
def self.segments: (String) -> Array[String]
|
|
99
|
+
|
|
100
|
+
# The value at `segments` inside `root`, or the index of the first
|
|
101
|
+
# segment that finds nothing. nil is JSON's null, which is a value.
|
|
102
|
+
# : (untyped, Array[String]) -> Hash[Symbol, untyped]
|
|
103
|
+
def self.value_at: (untyped, Array[String]) -> Hash[Symbol, untyped]
|
|
104
|
+
|
|
105
|
+
# : (untyped, Array[String]) -> Hash[Symbol, untyped]
|
|
106
|
+
def self.read_at: (untyped, Array[String]) -> Hash[Symbol, untyped]
|
|
107
|
+
|
|
108
|
+
# : (String) -> String
|
|
109
|
+
def self.article: (String) -> String
|
|
110
|
+
|
|
111
|
+
# The plain JSON copy a claim judges, as JavaScript holds it, or where
|
|
112
|
+
# the first part that is not plain JSON sits and what it is. A whole
|
|
113
|
+
# float is the integer JavaScript's one number type would hold, so
|
|
114
|
+
# 2500.0 is judged and shown as 2500; a symbol is its name.
|
|
115
|
+
# : (untyped, ?Integer) -> Hash[Symbol, untyped]
|
|
116
|
+
def self.snapshot: (untyped, ?Integer) -> Hash[Symbol, untyped]
|
|
117
|
+
|
|
118
|
+
# A JavaScript object lists its array-index keys first, in ascending
|
|
119
|
+
# order, then its other keys in the order they were added.
|
|
120
|
+
# : (Hash[String, untyped]) -> Hash[String, untyped]
|
|
121
|
+
def self.js_order: (Hash[String, untyped]) -> Hash[String, untyped]
|
|
122
|
+
|
|
123
|
+
# : (Place) -> String
|
|
124
|
+
def self.name_of: (Place) -> String
|
|
125
|
+
|
|
126
|
+
# : (Place, Hash[Symbol, untyped]) -> String
|
|
127
|
+
def self.refusal_reason: (Place, Hash[Symbol, untyped]) -> String
|
|
128
|
+
|
|
129
|
+
# : (Integer, Place, Array[String]) -> String
|
|
130
|
+
def self.first_missing: (Integer, Place, Array[String]) -> String
|
|
131
|
+
|
|
132
|
+
# : (Hash[Symbol, untyped], Place, Array[String], Integer, ?^(Place) -> String) -> Side
|
|
133
|
+
def self.side_of: (Hash[Symbol, untyped], Place, Array[String], Integer, ?^(Place) -> String) -> Side
|
|
134
|
+
|
|
135
|
+
# : (Array[String], Inputs, ?^(Place) -> String) -> Side
|
|
136
|
+
def self.arg_side: (Array[String], Inputs, ?^(Place) -> String) -> Side
|
|
137
|
+
|
|
138
|
+
# The side a claim's actual names, read at its path and, with no
|
|
139
|
+
# view, at its at too; `at_read` says the at was read here.
|
|
140
|
+
# : (Hash[Symbol, untyped], Inputs) -> [Side, bool]
|
|
141
|
+
def self.top_side: (Hash[Symbol, untyped], Inputs) -> [ Side, bool ]
|
|
142
|
+
|
|
143
|
+
# The value after a view, or why the view could not read it.
|
|
144
|
+
# : (String?, untyped) -> Hash[Symbol, untyped]
|
|
145
|
+
def self.apply_view: (String?, untyped) -> Hash[Symbol, untyped]
|
|
146
|
+
|
|
147
|
+
# : (Side, String?, String?, ?bool) -> Side
|
|
148
|
+
def self.shaped: (Side, String?, String?, ?bool) -> Side
|
|
149
|
+
|
|
150
|
+
# : (Side, bool?) -> Side
|
|
151
|
+
def self.counted: (Side, bool?) -> Side
|
|
152
|
+
|
|
153
|
+
# The expected side, and whether observe gave it.
|
|
154
|
+
# : (Hash[Symbol, untyped], Inputs) -> [Side, bool]
|
|
155
|
+
def self.expected_side: (Hash[Symbol, untyped], Inputs) -> [ Side, bool ]
|
|
156
|
+
|
|
157
|
+
# What stops a claim before any compare runs, or nil.
|
|
158
|
+
# : (Side, Side, bool, Inputs) -> Hash[Symbol, String]?
|
|
159
|
+
def self.precondition: (Side, Side, bool, Inputs) -> Hash[Symbol, String]?
|
|
160
|
+
|
|
161
|
+
# : (Place, Inputs, String) -> Hash[Symbol, String]?
|
|
162
|
+
def self.observe_received: (Place, Inputs, String) -> Hash[Symbol, String]?
|
|
163
|
+
|
|
164
|
+
# A top-level comparison claim, judged as Claims.judge_one reports one.
|
|
165
|
+
# : (Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
166
|
+
def self.judge: (Hash[Symbol, untyped], Inputs) -> Hash[Symbol, untyped]
|
|
167
|
+
|
|
168
|
+
# One comparison on a side already read: a top-level claim's, or one
|
|
169
|
+
# item's under an each.
|
|
170
|
+
# : (Hash[Symbol, untyped], Side, Inputs, ?bool) -> Hash[Symbol, untyped]
|
|
171
|
+
def self.judge_comparison: (Hash[Symbol, untyped], Side, Inputs, ?bool) -> Hash[Symbol, untyped]
|
|
172
|
+
|
|
173
|
+
# : (Hash[Symbol, untyped], StandardError) -> Hash[Symbol, untyped]
|
|
174
|
+
def self.unjudgeable: (Hash[Symbol, untyped], StandardError) -> Hash[Symbol, untyped]
|
|
175
|
+
|
|
176
|
+
# The array an each reads, after its view and at.
|
|
177
|
+
# : (Hash[Symbol, untyped], Inputs) -> Side
|
|
178
|
+
def self.array_side: (Hash[Symbol, untyped], Inputs) -> Side
|
|
179
|
+
|
|
180
|
+
# The side an item claim reads: the item, or a path inside it. The item
|
|
181
|
+
# is part of a snapshot, so a read inside it finds a value or nothing.
|
|
182
|
+
# : (untyped, Place, Hash[Symbol, untyped]) -> Side
|
|
183
|
+
def self.item_side: (untyped, Place, Hash[Symbol, untyped]) -> Side
|
|
184
|
+
|
|
185
|
+
# What ends an each before any item: a declaration whose expected value
|
|
186
|
+
# observe received, or reads through what observe returned while observe
|
|
187
|
+
# received the array, does not depend on an item, and an empty array
|
|
188
|
+
# would hide it. Then a where clause that implies an item claim.
|
|
189
|
+
# : (Hash[Symbol, untyped], Place, Inputs) -> Hash[Symbol, String]?
|
|
190
|
+
def self.each_stop: (Hash[Symbol, untyped], Place, Inputs) -> Hash[Symbol, String]?
|
|
191
|
+
|
|
192
|
+
# The first where clause and item claim that read one value where the
|
|
193
|
+
# clause implies the claim whatever the value is, as the reason that
|
|
194
|
+
# breaks the each: the claim holds on every item where selects, so
|
|
195
|
+
# "every item" measures nothing.
|
|
196
|
+
# : (Hash[Symbol, untyped], Inputs) -> String?
|
|
197
|
+
def self.where_implication: (Hash[Symbol, untyped], Inputs) -> String?
|
|
198
|
+
|
|
199
|
+
# Whether every value a where clause selects holds an item claim on the
|
|
200
|
+
# same value: the same order direction with a bound at least as strict,
|
|
201
|
+
# not-equal against the same value, or an is-a whose kind is the one JSON
|
|
202
|
+
# type the clause can compare.
|
|
203
|
+
# : (String, untyped, String, untyped) -> bool
|
|
204
|
+
def self.where_implies?: (String, untyped, String, untyped) -> bool
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
@@ -43,10 +43,17 @@ module Nukadoko
|
|
|
43
43
|
# : (Hash[Symbol, untyped], untyped) -> Hash[Symbol, String]
|
|
44
44
|
def self.aria_side: (Hash[Symbol, untyped], untyped) -> Hash[Symbol, String]
|
|
45
45
|
|
|
46
|
-
#
|
|
47
|
-
|
|
46
|
+
# `inputs` says where each side sits, so a top-level comparison is read
|
|
47
|
+
# as the TypeScript engine reads it (ClaimSides); without it, a claim
|
|
48
|
+
# reads `observed` as the value of each key.
|
|
49
|
+
# : (Array[Hash[Symbol, untyped]], untyped, untyped, ?ClaimSides::Inputs?) -> Array[Hash[Symbol, untyped]]
|
|
50
|
+
def self.judge: (Array[Hash[Symbol, untyped]], untyped, untyped, ?ClaimSides::Inputs?) -> Array[Hash[Symbol, untyped]]
|
|
51
|
+
|
|
52
|
+
# An each judged as its record judges it, so a poll waits on the
|
|
53
|
+
# outcome the record will hold.
|
|
54
|
+
# : (Hash[Symbol, untyped], ClaimSides::Inputs) -> Hash[Symbol, untyped]
|
|
55
|
+
def self.each_judged: (Hash[Symbol, untyped], ClaimSides::Inputs) -> Hash[Symbol, untyped]
|
|
48
56
|
|
|
49
|
-
# `top` is what observe returned, which an expected { observe } reads
|
|
50
57
|
# from inside an each as well. A claim on an item with no actual reads
|
|
51
58
|
# the item itself.
|
|
52
59
|
# : (Hash[Symbol, untyped], untyped, untyped, ?untyped) -> Hash[Symbol, untyped]
|
|
@@ -112,9 +119,45 @@ module Nukadoko
|
|
|
112
119
|
|
|
113
120
|
# A text a URL parser accepts can still be no URL a program wrote, so
|
|
114
121
|
# the scheme needs "//" and no character a reader cannot see may appear.
|
|
122
|
+
# The rest is what the WHATWG URL parser, which the TypeScript engine
|
|
123
|
+
# uses, refuses for http and https: a missing host, a port that is not
|
|
124
|
+
# a number up to 65535, a host with a character no domain may hold, and
|
|
125
|
+
# an IPv4 or IPv6 address that does not parse. A path, a query, and a
|
|
126
|
+
# fragment can hold anything, as a browser takes them.
|
|
115
127
|
# : (untyped) -> bool
|
|
116
128
|
def self.url?: (untyped) -> bool
|
|
117
129
|
|
|
130
|
+
# The host and the port of `host:port`, a colon inside brackets kept.
|
|
131
|
+
# : (String) -> [String?, String?]
|
|
132
|
+
def self.split_host_port: (String) -> [ String?, String? ]
|
|
133
|
+
|
|
134
|
+
# : (String) -> bool
|
|
135
|
+
def self.ipv6?: (String) -> bool
|
|
136
|
+
|
|
137
|
+
FORBIDDEN_DOMAIN: ::Regexp
|
|
138
|
+
|
|
139
|
+
# A host percent-decoded and mapped as UTS #46 maps it (NFKC, then
|
|
140
|
+
# lower case), which holds no character a domain may not, and whose
|
|
141
|
+
# last label, when it reads as a number, is an IPv4 address.
|
|
142
|
+
# : (String) -> bool
|
|
143
|
+
def self.domain?: (String) -> bool
|
|
144
|
+
|
|
145
|
+
# Whether a label written as `xn--` decodes, under RFC 3492, to a
|
|
146
|
+
# label UTS #46 keeps: one with a character outside ASCII, no control,
|
|
147
|
+
# joiner, or unassigned character, and already in its mapped form.
|
|
148
|
+
# : (String) -> bool
|
|
149
|
+
def self.punycode_label?: (String) -> bool
|
|
150
|
+
|
|
151
|
+
# RFC 3492's decoder, or nil for a text that does not decode.
|
|
152
|
+
# : (String) -> String?
|
|
153
|
+
def self.punycode_decode: (String) -> String?
|
|
154
|
+
|
|
155
|
+
# The WHATWG IPv4 parser: up to four parts, each decimal, octal with a
|
|
156
|
+
# leading 0, or hex with 0x, every part but the last below 256 and the
|
|
157
|
+
# last below what the parts before it leave.
|
|
158
|
+
# : (Array[String]) -> bool
|
|
159
|
+
def self.ipv4?: (Array[String]) -> bool
|
|
160
|
+
|
|
118
161
|
KIND_TESTS: untyped
|
|
119
162
|
|
|
120
163
|
# The test of the kind `name` names, read trimmed and in any case.
|
|
@@ -95,7 +95,7 @@ module Nukadoko
|
|
|
95
95
|
|
|
96
96
|
# Why --env left out every selected scenario, and the run that meets
|
|
97
97
|
# them: the run without --env when it does, else the first environment
|
|
98
|
-
# of the program
|
|
98
|
+
# of the program that meets each, or else one that meets some.
|
|
99
99
|
# : (Array[Engine::Scenario], Engine::Program) -> Hash[Symbol, String]
|
|
100
100
|
def left_out_stop: (Array[Engine::Scenario], Engine::Program) -> Hash[Symbol, String]
|
|
101
101
|
|
|
@@ -49,8 +49,31 @@ module Nukadoko
|
|
|
49
49
|
# TypeScript engine. Requests the page sends are recorded by the engine's
|
|
50
50
|
# own listener, and each step gets a trace chunk.
|
|
51
51
|
class Browser
|
|
52
|
-
#
|
|
53
|
-
|
|
52
|
+
# `secrets` gives the run's loaded secrets when a screenshot is taken,
|
|
53
|
+
# since an environment's env files are read after the browser is made.
|
|
54
|
+
# : (String?, ?Hash[Symbol, untyped], ?secrets: ^() -> Secrets) -> void
|
|
55
|
+
def initialize: (String?, ?Hash[Symbol, untyped], ?secrets: ^() -> Secrets) -> void
|
|
56
|
+
|
|
57
|
+
# Opaque, so a masked secret leaves no trace of its glyphs.
|
|
58
|
+
MASK_COLOR: ::String
|
|
59
|
+
|
|
60
|
+
# Locators for every element of `page`, in every frame, that shows a
|
|
61
|
+
# loaded secret: as text, or as the value of an input or textarea, which
|
|
62
|
+
# is not text `get_by_text` reads, and a step may have typed the secret
|
|
63
|
+
# there. The text redaction of a record cannot reach pixels, and
|
|
64
|
+
# marking or rewriting the elements would change the page the next step
|
|
65
|
+
# reads. Only the value as written is found, not an encoded spelling;
|
|
66
|
+
# `get_by_text` ignores case, which costs pixels, never a leak.
|
|
67
|
+
# : (untyped) -> Array[untyped]
|
|
68
|
+
def secret_masks: (untyped) -> Array[untyped]
|
|
69
|
+
|
|
70
|
+
# A screenshot of `page` at `path` with what shows a secret covered,
|
|
71
|
+
# true once written. No screenshot rather than one that shows a
|
|
72
|
+
# secret: masks not found by `deadline` (a monotonic time) give none,
|
|
73
|
+
# and the image is written only once it arrived. `bounded` holds the
|
|
74
|
+
# screenshot to the deadline too, as a pause and a judged view do.
|
|
75
|
+
# : (untyped, String, Float, ?caret: String?, ?bounded: bool) -> bool
|
|
76
|
+
def masked_shot: (untyped, String, Float, ?caret: String?, ?bounded: bool) -> bool
|
|
54
77
|
|
|
55
78
|
# : (String, Array[Hash[Symbol, untyped]]) -> [untyped, ^() -> void]
|
|
56
79
|
def page_for: (String, Array[Hash[Symbol, untyped]]) -> [ untyped, ^() -> void ]
|