@haibun/utils 1.58.2 → 1.59.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 +16 -10
- package/build/vcapture/index.js +1 -1
- package/build/vcapture/index.js.map +1 -1
- package/package.json +2 -2
- package/vcapture/capture-stop.sh +3 -1
- package/vcapture/entrypoint.sh +2 -1
package/README.md
CHANGED
|
@@ -10,27 +10,33 @@ It won't overwrite existing files. It presumes a `src` folder for source files.
|
|
|
10
10
|
Audio/video virtualized captures (vcapture) can be added to projects using the `run-vcapture` command
|
|
11
11
|
with the following options:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
This feature requires Docker Compose to be installed on the host system.
|
|
14
14
|
|
|
15
|
+
## Parameters
|
|
15
16
|
`script` is the package.json script to run for the script,
|
|
16
|
-
`
|
|
17
|
-
and `folders` is individual folders that need to be mounted in the container
|
|
18
|
-
to execute the tests (for example, `features assets`).
|
|
19
|
-
|
|
20
|
-
See [Haibun e2e tests](https://github.com/withhaibun/haibun-e2e-tests/blob/package.json) for an example.
|
|
17
|
+
`folders` is individual folders that need to be mounted in the container to execute the tests (for example, `features assets`).
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
See [Haibun e2e tests](https://github.com/withhaibun/haibun-e2e-tests/package.json) for an example.
|
|
23
20
|
|
|
24
21
|
## Options
|
|
25
22
|
|
|
26
23
|
`--recreate`: Re-create the container
|
|
27
24
|
|
|
28
|
-
`--tts`: uses local Kokoro text-to-speech
|
|
25
|
+
`--tts`: uses local Kokoro text-to-speech
|
|
29
26
|
Any prose lines in the tests, along with headings like "Scenario" will be spoken (using kokoro-tts).
|
|
30
27
|
|
|
31
|
-
`--pass-env`:
|
|
28
|
+
`--pass-env`: environment variables to pass through. use multiple --pass-env for multiple values, for example, `--pass-env=HAIBUN_STAY=failure --pass-env=HAIBUN_LOG_LEVEL=log`
|
|
29
|
+
|
|
30
|
+
`--cli-env`: HAIBUN_ENV variables to pass through, for example, `--cli-env=USERNAME=foo,PASSWORD=bar`
|
|
31
|
+
|
|
32
|
+
Runtime options should be passed to package.json script commands using `-- --option`
|
|
33
|
+
|
|
34
|
+
`--feature-filter`: filter for tests to run
|
|
35
|
+
|
|
36
|
+
`--res`: Resolution for virtual desktop
|
|
37
|
+
|
|
38
|
+
`--no-capture`: Don't record the session
|
|
32
39
|
|
|
33
|
-
Runtime options should be passed to package.json script commands using `-- --option`.
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
|
package/build/vcapture/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const args = process.argv.slice(2);
|
|
|
13
13
|
const { testToRun, includeDirs, captureOptions } = parseVCaptureArgs(args, printHelp);
|
|
14
14
|
runContainer(testToRun, includeDirs, captureOptions);
|
|
15
15
|
function printHelp(exitCode = 1) {
|
|
16
|
-
console[exitCode === 1 ? 'error' : 'info'](`Usage: ${process.argv[1]} [--feature-filter] [--cli-env=<name=value,...>] [--pass-env=<VAR=FOO>] [--pass-env ...] [--recreate[=boolean]] [--tts[=boolean]] [--no-capture] [--help] [--res=WxH] script
|
|
16
|
+
console[exitCode === 1 ? 'error' : 'info'](`Usage: ${process.argv[1]} [--feature-filter] [--cli-env=<name=value,...>] [--pass-env=<VAR=FOO>] [--pass-env ...] [--recreate[=boolean]] [--tts[=boolean]] [--no-capture] [--help] [--res=WxH] script features files ...`);
|
|
17
17
|
process.exit(exitCode);
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vcapture/index.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,GAAc,EAAE,EAAE;IACnD,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,GAAG,CAAC,CAAC;IAC/C,IAAI,GAAG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EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAEtF,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAErD,SAAS,SAAS,CAAC,QAAQ,GAAG,CAAC;IAC9B,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iMAAiM,CAAC,CAAC;IACvQ,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haibun/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.59.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": ["ref.package.json", "build/**", "scaffold/**", "vcapture/**"],
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"gitHead": "7cf9680bd922fb622fb59f1e6bf5b65284cb8fd5",
|
|
25
|
-
"dependencies": { "@haibun/cli": "1.
|
|
25
|
+
"dependencies": { "@haibun/cli": "1.59.0", "@haibun/core": "1.59.0" }
|
|
26
26
|
}
|
package/vcapture/capture-stop.sh
CHANGED
package/vcapture/entrypoint.sh
CHANGED
|
@@ -52,7 +52,8 @@ echo "entrypoint is setting up the environment (logfile is $LOGFILE)"
|
|
|
52
52
|
|
|
53
53
|
} >"$LOGFILE" 2>&1
|
|
54
54
|
|
|
55
|
-
echo
|
|
55
|
+
echo $COMMAND_TO_RECORD > output/command_to_record.txt
|
|
56
|
+
echo "Command recorded in output/command_to_record.txt"
|
|
56
57
|
eval "$COMMAND_TO_RECORD"
|
|
57
58
|
SLEEPTIME=2
|
|
58
59
|
echo "Waiting for $SLEEPTIME seconds."
|