@unotest/web 0.6.2 → 0.9.1

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.
@@ -1,18 +1,6 @@
1
- import { L as LintDiagnostic } from '../linter-DzAzJpab.js';
1
+ import { L as LintDiagnostic } from '../linter-CM2CpIyW.js';
2
2
  import '@unotest/dsl';
3
3
 
4
- /** Parse `e2e` flag arguments. Strips known flags, returns positional
5
- * args + parsed values. Order-insensitive — flags can appear before
6
- * or after the scenario name. Unknown flags pass through to positional
7
- * (which then errors out on resolveScenarioArg). */
8
- declare function parseE2EFlags(args: string[]): {
9
- positional: string[];
10
- debug: boolean;
11
- /** "line:col" entries from `--break a:b,c:d` (comma-separated, no
12
- * spaces). Empty when --break wasn't passed — caller falls back to
13
- * .debugger.json. */
14
- breakFlag: string[];
15
- };
16
4
  /** Derive a viewer-compatible scenario name from an absolute scenario
17
5
  * file path: drop the leading `<cwd>/unotest/e2e/`, drop the `.js`,
18
6
  * normalise to POSIX separators. Returns null for files outside
@@ -26,6 +14,12 @@ declare function scenarioNameFromPath(scenarioPath: string, cwd: string): string
26
14
  * scenarios. Returns null for files in a subfolder or outside `unotest/e2e/`.
27
15
  * Exported only for tests. */
28
16
  declare function scenarioInRootDiagnostic(file: string, cwd: string): LintDiagnostic | null;
17
+ /** Pull a global `--env <name>` / `--env=<name>` flag out of argv and set
18
+ * `UNOTEST_ENV`, so the `.env.<name>` / `.secrets.<name>` overlays activate
19
+ * for whichever subcommand runs (e2e / lint / viewer). Order-insensitive;
20
+ * returns argv with the flag removed. An explicit shell `UNOTEST_ENV` is left
21
+ * untouched when `--env` is absent. */
22
+ declare function applyEnvFlag(args: string[]): string[];
29
23
  declare function main(argv: string[]): void;
30
24
 
31
- export { main, parseE2EFlags, scenarioInRootDiagnostic, scenarioNameFromPath };
25
+ export { applyEnvFlag, main, scenarioInRootDiagnostic, scenarioNameFromPath };