@unotest/protocol 0.9.1 → 0.11.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/CHANGELOG.md +39 -0
- package/dist/index.d.ts +47 -12
- package/dist/index.js +1 -1
- package/package.json +1 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@unotest/protocol` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.11.0] - 2026-08-13
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- a195713: Failure artifacts are always on, and steps can carry screenshots.
|
|
10
|
+
|
|
11
|
+
- On any scenario failure the runner writes `screenshot.png` +
|
|
12
|
+
`page.html` (runtime DOM, open shadow roots included, secrets
|
|
13
|
+
redacted) to `unotest/.runs/<runId>/failure/` — no `UNOTEST_DEBUG`
|
|
14
|
+
needed. The `.unotest/failures/` bundle gains the same `page.html`;
|
|
15
|
+
its screenshot keeps honouring `failureBundle.tier2`.
|
|
16
|
+
- New env flag `UNOTEST_STEP_SCREENSHOTS=1` captures a PNG after every
|
|
17
|
+
executed step into `unotest/.runs/<runId>/screenshot/`.
|
|
18
|
+
- Protocol: `screenshot` events may carry the step's `file`/`line`/`col`.
|
|
19
|
+
- Viewer: a step row with a captured screenshot shows a camera icon and
|
|
20
|
+
toggles an inline preview on click (both `screenshot()` DSL captures
|
|
21
|
+
and per-step ones).
|
|
22
|
+
|
|
23
|
+
## [0.10.0] - 2026-08-06
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 574841f: Dedup pass across the tree (jscpd 0 clones, ratchet threshold 0). New public export in `@unotest/grounder-client`: `intEnvInRange(env, name, def, min, max)` — the `UNOTEST_GROUNDER_*` integer-env parser shared by the consumer side and the grounder server. Everything else is internal refactoring with no behavior change: protocol gains a shared fs-safe-name validator behind `validateCollectionName` / `validateSegmentName` and a shared env-file assignment iterator; core's `RuntimeInspection` becomes a `Pick` of `RuntimeStateFile`; dsl's `ExecutionWalker` threads one `WalkCtx` object instead of an eight-argument clump and AST nodes use constructor parameter properties; web deduplicates the MCP tool scaffolds, action plugins, DSL contracts, perception LRU caches, and semantic-dom grouping passes.
|
|
28
|
+
|
|
29
|
+
## [0.9.2] - 2026-06-16
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **Snapshot bundle protocol.** `SNAPSHOTS_SUBDIR` (`unotest/.snapshots/`) and a
|
|
34
|
+
`SnapshotTab` (`kind: "snapshot"`, keyed by its own `snapshotId`) — an imported,
|
|
35
|
+
terminal run rendered from a portable `*.unotest.zip` bundle rather than the live
|
|
36
|
+
runner, so a teammate's exported run opens as a foreign tab without colliding with
|
|
37
|
+
the viewer's own `runId` space.
|
|
38
|
+
- **`RunManifest.capture`.** The artifact-capture flags (`console` / `network`)
|
|
39
|
+
resolved from the runner's env at start, recorded so the viewer can tell "capture
|
|
40
|
+
was disabled" apart from "capture was on but the run aborted before writing
|
|
41
|
+
`console.json` / `network.json`". Optional — pre-existing runs omit it and the
|
|
42
|
+
viewer falls back to a file-presence heuristic.
|
|
43
|
+
|
|
5
44
|
## [0.9.1] - 2026-06-14
|
|
6
45
|
|
|
7
46
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,11 @@ declare const COLLECTIONS_SUBDIR = "_collections";
|
|
|
38
38
|
* Dot-prefix so a single `.gitignore` line covers all runtime debris
|
|
39
39
|
* without touching user code in `unotest/e2e/`. */
|
|
40
40
|
declare const RUNS_SUBDIR = ".runs";
|
|
41
|
+
/** Imported snapshot bundles under `unotest/`: `.snapshots/<snapshotId>/`.
|
|
42
|
+
* Foreign/portable (a teammate's exported run) — NOT per-target-suffixed; the
|
|
43
|
+
* manifest carries the originating target. Dot-prefixed → covered by the same
|
|
44
|
+
* `.gitignore` line as other runtime debris. */
|
|
45
|
+
declare const SNAPSHOTS_SUBDIR = ".snapshots";
|
|
41
46
|
/** Scenario tree under `unotest/`: `e2e` / `e2e-mobile`. */
|
|
42
47
|
declare function testDirFor(suffix: string): string;
|
|
43
48
|
/** Run-artifact root under `unotest/`: `.runs` / `.runs-mobile`. */
|
|
@@ -143,11 +148,9 @@ declare function makeRunId(name: string): string;
|
|
|
143
148
|
* random suffix appended by `makeRunId`. */
|
|
144
149
|
declare function sanitizeRunIdSegment(name: string): string;
|
|
145
150
|
|
|
146
|
-
/** Filesystem-unsafe characters in a collection name
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* safe: no path separators, no Windows-reserved punctuation, no NUL /
|
|
150
|
-
* control chars. */
|
|
151
|
+
/** Filesystem-unsafe characters in a collection name — see
|
|
152
|
+
* `FS_UNSAFE_NAME_RE` for the block-list rationale. Kept as a named
|
|
153
|
+
* re-export for the published surface. */
|
|
151
154
|
declare const COLLECTION_NAME_FORBIDDEN_RE: RegExp;
|
|
152
155
|
/** Validate a collection name. Returns `null` on success, or a
|
|
153
156
|
* human-readable reason string on failure. Shared by the viewer-server
|
|
@@ -246,6 +249,17 @@ interface RunManifest {
|
|
|
246
249
|
/** Wallclock at runner start. Distinct from the first event's `t`
|
|
247
250
|
* (which may have leading delay for adapter setup). */
|
|
248
251
|
startedAt: number;
|
|
252
|
+
/** Opt-in artifact-capture flags as resolved from the runner's env at
|
|
253
|
+
* start (`UNOTEST_CONSOLE` / `UNOTEST_NETWORK`). Recorded here so the
|
|
254
|
+
* viewer can tell "capture was disabled" apart from "capture was on but
|
|
255
|
+
* the run aborted before writing console.json / network.json" — a
|
|
256
|
+
* distinction the mere presence of those files can't make. Optional: runs
|
|
257
|
+
* produced before this field existed simply omit it, and the viewer falls
|
|
258
|
+
* back to a file-presence heuristic. */
|
|
259
|
+
capture?: {
|
|
260
|
+
console: boolean;
|
|
261
|
+
network: boolean;
|
|
262
|
+
};
|
|
249
263
|
}
|
|
250
264
|
|
|
251
265
|
/** Snapshot file holding entry + every helper source that was loaded. */
|
|
@@ -455,10 +469,10 @@ interface ScenariosPayload {
|
|
|
455
469
|
* subtrees (`_helpers`, `_collections`) and any `_`/`.`-prefixed dir. */
|
|
456
470
|
folders: string[];
|
|
457
471
|
}
|
|
458
|
-
/** Filesystem-unsafe characters in a single path segment
|
|
459
|
-
* path separators
|
|
460
|
-
*
|
|
461
|
-
*
|
|
472
|
+
/** Filesystem-unsafe characters in a single path segment — see
|
|
473
|
+
* `FS_UNSAFE_NAME_RE` (it includes both path separators, so a valid
|
|
474
|
+
* segment is guaranteed to be ONE level). Kept as a named re-export for
|
|
475
|
+
* the published surface. */
|
|
462
476
|
declare const SEGMENT_NAME_FORBIDDEN_RE: RegExp;
|
|
463
477
|
/** Validate a single scenario-file stem or folder name. Returns `null` on
|
|
464
478
|
* success, else a human-readable reason. Shared by the viewer-server
|
|
@@ -938,7 +952,9 @@ interface StepStartedEvent extends RunArtifactBase {
|
|
|
938
952
|
file: string;
|
|
939
953
|
/** Line number of the DSL call in the source file (1-indexed). */
|
|
940
954
|
line: number;
|
|
941
|
-
/** Column number (
|
|
955
|
+
/** Column number (1-indexed since 0.11 — the DSL lexer's token
|
|
956
|
+
* columns; earlier releases emitted 0-indexed columns for
|
|
957
|
+
* word-initial statements). */
|
|
942
958
|
col: number;
|
|
943
959
|
}
|
|
944
960
|
interface StepOkEvent extends RunArtifactBase {
|
|
@@ -962,6 +978,14 @@ interface ScreenshotEvent extends RunArtifactBase {
|
|
|
962
978
|
kind: "screenshot";
|
|
963
979
|
/** Project-relative path to the PNG (under `unotest/.runs/<runId>/screenshot/`). */
|
|
964
980
|
path: string;
|
|
981
|
+
/** Step identity for captures bound to a specific step (per-step
|
|
982
|
+
* screenshots under `UNOTEST_STEP_SCREENSHOTS`). Same semantics as
|
|
983
|
+
* `StepStartedEvent` — the viewer joins on `line:col`. Absent for
|
|
984
|
+
* unbound captures (`screenshot()` DSL calls); consumers may fall
|
|
985
|
+
* back to attributing those to the step in flight at emit time. */
|
|
986
|
+
file?: string;
|
|
987
|
+
line?: number;
|
|
988
|
+
col?: number;
|
|
965
989
|
}
|
|
966
990
|
/** Emitted ONCE after a failing run when the runner has finished writing
|
|
967
991
|
* the D-16 failure bundle to disk. Viewer's inspector reads
|
|
@@ -978,6 +1002,9 @@ interface FailureBundleWrittenEvent extends RunArtifactBase {
|
|
|
978
1002
|
/** Project-relative path to the screenshot PNG inside the bundle,
|
|
979
1003
|
* when tier-2 capture succeeded. */
|
|
980
1004
|
screenshotPath?: string;
|
|
1005
|
+
/** Page URL at the moment of failure (same value captured into the
|
|
1006
|
+
* bundle's `snapshot.json`/`outline.txt`), for the viewer's ErrorCard. */
|
|
1007
|
+
url?: string;
|
|
981
1008
|
}
|
|
982
1009
|
interface RunFinishedEvent extends RunArtifactBase {
|
|
983
1010
|
kind: "run:finished";
|
|
@@ -1235,8 +1262,16 @@ interface CollectionRunTab {
|
|
|
1235
1262
|
kind: "collection-run";
|
|
1236
1263
|
runId: RunId;
|
|
1237
1264
|
}
|
|
1265
|
+
/** Open imported snapshot — a teammate's run exported as a portable
|
|
1266
|
+
* `*.unotest.zip`. Functionally a (terminal) run rendered from a bundle, not
|
|
1267
|
+
* the live runner; keyed by its own `snapshotId` so it never collides with
|
|
1268
|
+
* the viewer's own `runId` space. The `SNAPSHOT` badge marks it as foreign. */
|
|
1269
|
+
interface SnapshotTab {
|
|
1270
|
+
kind: "snapshot";
|
|
1271
|
+
snapshotId: string;
|
|
1272
|
+
}
|
|
1238
1273
|
/** Discriminated union of every open-tab shape the frontend supports. */
|
|
1239
|
-
type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab;
|
|
1274
|
+
type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab | SnapshotTab;
|
|
1240
1275
|
/** All tab `kind` literals — useful for switch-completeness checks. */
|
|
1241
1276
|
type TabKindName = TabKind["kind"];
|
|
1242
1277
|
|
|
@@ -1341,4 +1376,4 @@ interface RuntimeStateFile {
|
|
|
1341
1376
|
updatedAt: number;
|
|
1342
1377
|
}
|
|
1343
1378
|
|
|
1344
|
-
export { type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, type BreakpointEntry, type BreakpointsFile, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionTab, type DbgCommand, type DbgCommandAbort, type DbgCommandClearBp, type DbgCommandContinue, type DbgCommandKind, type DbgCommandPause, type DbgCommandPickerStart, type DbgCommandPickerStop, type DbgCommandProbe, type DbgCommandRecord, type DbgCommandSetBp, type DbgCommandSnapshot, type DbgCommandStep, type DbgCommandWheel, type DebugCapabilities, type DoctorCheck, type DoctorContext, type DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, ENV_FILE, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, type FailureBundleWrittenEvent, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunnerAdapter, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, PICKER_SNAPSHOT_FILE, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, RUNNER_CONFIG_KEYS, RUNS_SUBDIR, RUNTIME_FILE, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioTab, type ScenariosPayload, type ScreenshotEvent, type StepFailEvent, type StepOkEvent, type StepStartedEvent, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, type TerminalClientMessage, type TerminalCloseMessage, type TerminalDataMessage, type TerminalErrorMessage, type TerminalExitMessage, type TerminalKind, type TerminalOutputMessage, type TerminalResizeMessage, type TerminalServerMessage, type TerminalSpawnMessage, type ToolCallEvent, type ToolResultEvent, UNOTEST_DIR, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, categorizeVariable, debugDirFor, debuggerFileFor, deleteShadowWarning, envFileFor, envKeys, envLayerFilesFor, insertEnvVar, isExternalVarName, isRegexLiteral, isRunnerConfigKey, isTerminalRuntimeState, makeRunId, parseAppServerEvent, parseEnvContent, planAddVariable, regexLiteral, removeEnvVar, runsDirFor, sanitizeRunIdSegment, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, testDirFor, validateCollectionName, validateSegmentName };
|
|
1379
|
+
export { type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, type BreakpointEntry, type BreakpointsFile, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionTab, type DbgCommand, type DbgCommandAbort, type DbgCommandClearBp, type DbgCommandContinue, type DbgCommandKind, type DbgCommandPause, type DbgCommandPickerStart, type DbgCommandPickerStop, type DbgCommandProbe, type DbgCommandRecord, type DbgCommandSetBp, type DbgCommandSnapshot, type DbgCommandStep, type DbgCommandWheel, type DebugCapabilities, type DoctorCheck, type DoctorContext, type DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, ENV_FILE, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, type FailureBundleWrittenEvent, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunnerAdapter, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, PICKER_SNAPSHOT_FILE, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, RUNNER_CONFIG_KEYS, RUNS_SUBDIR, RUNTIME_FILE, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, SNAPSHOTS_SUBDIR, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioTab, type ScenariosPayload, type ScreenshotEvent, type SnapshotTab, type StepFailEvent, type StepOkEvent, type StepStartedEvent, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, type TerminalClientMessage, type TerminalCloseMessage, type TerminalDataMessage, type TerminalErrorMessage, type TerminalExitMessage, type TerminalKind, type TerminalOutputMessage, type TerminalResizeMessage, type TerminalServerMessage, type TerminalSpawnMessage, type ToolCallEvent, type ToolResultEvent, UNOTEST_DIR, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, categorizeVariable, debugDirFor, debuggerFileFor, deleteShadowWarning, envFileFor, envKeys, envLayerFilesFor, insertEnvVar, isExternalVarName, isRegexLiteral, isRunnerConfigKey, isTerminalRuntimeState, makeRunId, parseAppServerEvent, parseEnvContent, planAddVariable, regexLiteral, removeEnvVar, runsDirFor, sanitizeRunIdSegment, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, testDirFor, validateCollectionName, validateSegmentName };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x28d146=_0x4e2f;(function(_0xc46330,_0x4286ef){const _0x5df0fc={_0x234001:0x207,_0x4c4d4b:0x1d2,_0x2d6868:0x213,_0x2854f9:0x239,_0x3b467b:0x243},_0x3b0098=_0x4e2f,_0x5af7f9=_0xc46330();while(!![]){try{const _0x34528f=parseInt(_0x3b0098(_0x5df0fc._0x234001))/0x1+-parseInt(_0x3b0098(_0x5df0fc._0x4c4d4b))/0x2+-parseInt(_0x3b0098(_0x5df0fc._0x2d6868))/0x3*(parseInt(_0x3b0098(_0x5df0fc._0x2854f9))/0x4)+parseInt(_0x3b0098(0x22a))/0x5*(-parseInt(_0x3b0098(_0x5df0fc._0x3b467b))/0x6)+parseInt(_0x3b0098(0x1f8))/0x7+parseInt(_0x3b0098(0x219))/0x8*(parseInt(_0x3b0098(0x1ca))/0x9)+parseInt(_0x3b0098(0x1cf))/0xa*(parseInt(_0x3b0098(0x1f6))/0xb);if(_0x34528f===_0x4286ef)break;else _0x5af7f9['push'](_0x5af7f9['shift']());}catch(_0x526f3c){_0x5af7f9['push'](_0x5af7f9['shift']());}}}(_0x21b2,0x7abb4));var __defProp=Object['defineProperty'],__name=(_0x35127a,_0x403ef7)=>__defProp(_0x35127a,_0x28d146(0x1fd),{'value':_0x403ef7,'configurable':!![]});function parseAppServerEvent(_0x1f4ef1){const _0x23a96e={_0x305ae3:0x224,_0x1e3609:0x218,_0x5501e9:0x1cd,_0x26d303:0x22b},_0x1cfb0d=_0x28d146,_0x444b4d=_0x1f4ef1[_0x1cfb0d(_0x23a96e._0x305ae3)]();if(!_0x444b4d[_0x1cfb0d(0x1f5)]('{'))return null;try{const _0x27b771=JSON[_0x1cfb0d(0x1fc)](_0x444b4d);if(_0x27b771['kind']===_0x1cfb0d(_0x23a96e._0x1e3609)||_0x27b771[_0x1cfb0d(0x22b)]===_0x1cfb0d(_0x23a96e._0x5501e9)||_0x27b771[_0x1cfb0d(_0x23a96e._0x26d303)]==='app-server:error')return _0x27b771;return null;}catch{return null;}}__name(parseAppServerEvent,_0x28d146(0x21d));var UNOTEST_DIR='unotest',E2E_SUBDIR=_0x28d146(0x244),HELPERS_SUBDIR=_0x28d146(0x214),COLLECTIONS_SUBDIR=_0x28d146(0x1fa),RUNS_SUBDIR=_0x28d146(0x1d9);function testDirFor(_0x33cb3e){return''+E2E_SUBDIR+_0x33cb3e;}__name(testDirFor,_0x28d146(0x231));function runsDirFor(_0x24f868){return''+RUNS_SUBDIR+_0x24f868;}__name(runsDirFor,_0x28d146(0x1e2));function debugDirFor(_0x502f51){return'.debug'+_0x502f51;}__name(debugDirFor,_0x28d146(0x216));function debuggerFileFor(_0xa05769){return UNOTEST_DIR+'/.debugger'+_0xa05769+'.json';}__name(debuggerFileFor,_0x28d146(0x20a));var LOCK_FILE=_0x28d146(0x235),LOG_FILE=_0x28d146(0x22e),STEPS_FILE=_0x28d146(0x238),HEARTBEAT_FILE=_0x28d146(0x228),STDOUT_FILE='stdout.log',STDERR_FILE='stderr.log',COMMANDS_FILE=_0x28d146(0x1f3),RUNTIME_FILE='runtime.json',PICKER_SNAPSHOT_FILE=_0x28d146(0x20c),ENV_FILE=_0x28d146(0x1ea),SECRETS_FILE=_0x28d146(0x23b);function envFileFor(_0x1d6d12,_0x58e25a){return''+ENV_FILE+_0x1d6d12+(_0x58e25a?'.'+_0x58e25a:'');}__name(envFileFor,_0x28d146(0x1f7));function secretsFileFor(_0x15c0ad,_0x216aef){return''+SECRETS_FILE+_0x15c0ad+(_0x216aef?'.'+_0x216aef:'');}__name(secretsFileFor,'secretsFileFor');function envLayerFilesFor(_0x3b2b67,_0x56cd4d){return layersFor(ENV_FILE,_0x3b2b67,_0x56cd4d);}__name(envLayerFilesFor,_0x28d146(0x23a));function secretsLayerFilesFor(_0x2d225f,_0x3625ae){return layersFor(SECRETS_FILE,_0x2d225f,_0x3625ae);}__name(secretsLayerFilesFor,'secretsLayerFilesFor');function layersFor(_0x274b4f,_0x907ee3,_0xe73cb7){const _0x171b76={_0x2551b1:0x1eb,_0x38c3d3:0x1eb},_0x5992f0=_0x28d146,_0x29b210=[_0x274b4f];if(_0x907ee3)_0x29b210[_0x5992f0(_0x171b76._0x2551b1)](''+_0x274b4f+_0x907ee3);if(_0xe73cb7){_0x29b210[_0x5992f0(_0x171b76._0x38c3d3)](_0x274b4f+'.'+_0xe73cb7);if(_0x907ee3)_0x29b210['push'](''+_0x274b4f+_0x907ee3+'.'+_0xe73cb7);}return _0x29b210;}__name(layersFor,_0x28d146(0x229));function activeEnvName(_0x831153){const _0x268400=_0x28d146,_0x5ece43=_0x831153[_0x268400(0x200)]?.['trim']();return _0x5ece43?_0x5ece43:void 0x0;}__name(activeEnvName,_0x28d146(0x1df));function isRegexLiteral(_0x3c9b0e){const _0x3acd05={_0x1d4a56:0x22b,_0x3d5dcf:0x1f9},_0x43c974=_0x28d146;return typeof _0x3c9b0e==='object'&&_0x3c9b0e!==null&&_0x3c9b0e[_0x43c974(_0x3acd05._0x1d4a56)]===_0x43c974(_0x3acd05._0x3d5dcf)&&typeof _0x3c9b0e[_0x43c974(0x246)]===_0x43c974(0x21c)&&typeof _0x3c9b0e['flags']==='string';}__name(isRegexLiteral,_0x28d146(0x223));function regexLiteral(_0x180b7a,_0x1ba283=''){const _0x40d837=_0x28d146;return{'kind':_0x40d837(0x1f9),'source':_0x180b7a,'flags':_0x1ba283};}__name(regexLiteral,_0x28d146(0x241));var RAND_BYTES=0x3;function makeRunId(_0x1c08d8){const _0x32e198={_0x437e0a:0x23d,_0x5ad211:0x249,_0x57c034:0x242,_0x15b2f0:0x1e9},_0x3e0cbe=_0x28d146,_0x140159=sanitizeRunIdSegment(_0x1c08d8),_0x6c47b7=Date['now']()['toString'](0x24),_0x3fcf79=new Uint8Array(RAND_BYTES);globalThis[_0x3e0cbe(_0x32e198._0x437e0a)][_0x3e0cbe(0x245)](_0x3fcf79);let _0x104af8='';for(let _0x5002ec=0x0;_0x5002ec<_0x3fcf79[_0x3e0cbe(_0x32e198._0x5ad211)];_0x5002ec++){_0x104af8+=_0x3fcf79[_0x5002ec][_0x3e0cbe(_0x32e198._0x57c034)](0x10)[_0x3e0cbe(_0x32e198._0x15b2f0)](0x2,'0');}return _0x140159+'-'+_0x6c47b7+'-'+_0x104af8;}__name(makeRunId,_0x28d146(0x1d3));function sanitizeRunIdSegment(_0x14c01f){const _0xeec5cc={_0x649591:0x217,_0x50c4f9:0x217},_0x30ba74=_0x28d146,_0x4c35e6=_0x14c01f[_0x30ba74(_0xeec5cc._0x649591)](/[^a-zA-Z0-9_-]+/g,'-')[_0x30ba74(0x217)](/-+/g,'-')[_0x30ba74(_0xeec5cc._0x50c4f9)](/^-|-$/g,'');return _0x4c35e6['length']>0x0?_0x4c35e6:'run';}__name(sanitizeRunIdSegment,_0x28d146(0x1e1));var COLLECTION_NAME_FORBIDDEN_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateCollectionName(_0x2e2c35){const _0x66ddc5={_0x1d52c2:0x201,_0x1ad331:0x1d1,_0x3f59f1:0x1f5,_0x41fdbe:0x24a},_0x23d0da=_0x28d146;if(typeof _0x2e2c35!==_0x23d0da(0x21c))return'must\x20be\x20a\x20string';const _0x56967b=_0x2e2c35[_0x23d0da(0x224)]();if(_0x56967b[_0x23d0da(0x249)]===0x0)return _0x23d0da(_0x66ddc5._0x1d52c2);if(_0x56967b==='.'||_0x56967b==='..')return _0x23d0da(_0x66ddc5._0x1ad331);if(_0x56967b[_0x23d0da(_0x66ddc5._0x3f59f1)]('.'))return _0x23d0da(0x220);if(COLLECTION_NAME_FORBIDDEN_RE[_0x23d0da(_0x66ddc5._0x41fdbe)](_0x56967b))return _0x23d0da(0x210);return null;}__name(validateCollectionName,_0x28d146(0x1ee));var RUN_MANIFEST_FILE=_0x28d146(0x1f0),RUN_SOURCES_FILE=_0x28d146(0x227),UnsupportedRunKindError=class extends Error{static{__name(this,_0x28d146(0x1de));}constructor(_0x4b44dd,_0x3c0adf){const _0x28222d={_0x2e7dec:0x1fe,_0x4da540:0x1de},_0x5c4c81=_0x28d146;super(_0x5c4c81(0x1d5)+_0x3c0adf+_0x5c4c81(_0x28222d._0x2e7dec)+_0x4b44dd+'\x22'),this['name']=_0x5c4c81(_0x28222d._0x4da540);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,'RunnerAdapterNotFoundError');}constructor(_0x2634db,_0x3327ff){const _0xaa3cd9={_0x461e76:0x1da},_0x1d195f=_0x28d146;super(_0x1d195f(0x1e8)+_0x2634db+_0x1d195f(0x222)+_0x3327ff),this['name']=_0x1d195f(_0xaa3cd9._0x461e76);}},RunnerNotConfiguredError=class extends Error{static{__name(this,'RunnerNotConfiguredError');}constructor(_0x6b5c62){const _0x412223={_0x4220ee:0x1d7},_0x3a61e5=_0x28d146;super(_0x6b5c62),this[_0x3a61e5(0x1fd)]=_0x3a61e5(_0x412223._0x4220ee);}},SEGMENT_NAME_FORBIDDEN_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateSegmentName(_0x33d05b){const _0x1886fe={_0x18ada4:0x201,_0x4df6b0:0x1f5,_0xcd131d:0x1f5,_0x1e3b5d:0x215,_0x48fdaf:0x210},_0x5e49fe=_0x28d146;if(typeof _0x33d05b!==_0x5e49fe(0x21c))return _0x5e49fe(0x20f);const _0x3da06b=_0x33d05b['trim']();if(_0x3da06b[_0x5e49fe(0x249)]===0x0)return _0x5e49fe(_0x1886fe._0x18ada4);if(_0x3da06b==='.'||_0x3da06b==='..')return'must\x20not\x20be\x20\x22.\x22\x20or\x20\x22..\x22';if(_0x3da06b[_0x5e49fe(_0x1886fe._0x4df6b0)]('.'))return'must\x20not\x20start\x20with\x20\x27.\x27';if(_0x3da06b[_0x5e49fe(_0x1886fe._0xcd131d)]('_'))return _0x5e49fe(_0x1886fe._0x1e3b5d);if(SEGMENT_NAME_FORBIDDEN_RE['test'](_0x3da06b))return _0x5e49fe(_0x1886fe._0x48fdaf);return null;}__name(validateSegmentName,'validateSegmentName');var TERMINAL_WS_EVENT=_0x28d146(0x1e7),RUNNER_CONFIG_KEYS=new Set([_0x28d146(0x1fb),'UNOTEST_HEADED',_0x28d146(0x205),_0x28d146(0x236),_0x28d146(0x1ed),_0x28d146(0x1db),_0x28d146(0x233),_0x28d146(0x206),'UNOTEST_LOG_LEVEL',_0x28d146(0x247),_0x28d146(0x1e3),'UNOTEST_DEBUG_MAX_BYTES',_0x28d146(0x21b),_0x28d146(0x1dd),_0x28d146(0x1dc),'UNOTEST_NETWORK',_0x28d146(0x20d),_0x28d146(0x203),_0x28d146(0x20e),_0x28d146(0x1ce),_0x28d146(0x226)]);function isRunnerConfigKey(_0x21673b){const _0x481ce5={_0x40b7f6:0x225},_0x5f120d=_0x28d146;return RUNNER_CONFIG_KEYS[_0x5f120d(_0x481ce5._0x40b7f6)](_0x21673b);}__name(isRunnerConfigKey,_0x28d146(0x208));function categorizeVariable(_0x34db5a){const _0x46f944={_0x316c76:0x248},_0x535a58=_0x28d146;if(_0x34db5a[_0x535a58(0x246)]==='secrets')return _0x535a58(0x240);return isRunnerConfigKey(_0x34db5a[_0x535a58(0x1fd)])?_0x535a58(_0x46f944._0x316c76):'app';}__name(categorizeVariable,_0x28d146(0x1ec));function isExternalVarName(_0x448962){const _0x558d34={_0x1cd59a:0x24a},_0x1700fa=_0x28d146;return/^[A-Z][A-Z0-9_]*$/[_0x1700fa(_0x558d34._0x1cd59a)](_0x448962);}__name(isExternalVarName,_0x28d146(0x1e4));function parseEnvContent(_0x1fed3e){const _0x486972={_0x13541d:0x202,_0x2448b0:0x224,_0x8b0a2f:0x24a,_0x4ee773:0x249},_0x4cf0d0=_0x28d146,_0x150d4d={};for(const _0x2407d3 of _0x1fed3e[_0x4cf0d0(0x1e5)](/\r?\n/)){const _0x31382e=_0x2407d3[_0x4cf0d0(0x224)]();if(_0x31382e===''||_0x31382e[_0x4cf0d0(0x1f5)]('#'))continue;const _0x3e2a14=_0x31382e[_0x4cf0d0(0x1f4)]('=');if(_0x3e2a14<=0x0)continue;const _0x51b339=_0x31382e[_0x4cf0d0(_0x486972._0x13541d)](0x0,_0x3e2a14)[_0x4cf0d0(_0x486972._0x2448b0)]();if(!/^[A-Za-z_][A-Za-z0-9_]*$/[_0x4cf0d0(_0x486972._0x8b0a2f)](_0x51b339))continue;let _0x119fec=_0x31382e[_0x4cf0d0(0x202)](_0x3e2a14+0x1)[_0x4cf0d0(_0x486972._0x2448b0)]();if(_0x119fec[_0x4cf0d0(0x249)]>=0x2){const _0x4652aa=_0x119fec[0x0],_0x5dc471=_0x119fec[_0x119fec[_0x4cf0d0(_0x486972._0x4ee773)]-0x1];(_0x4652aa==='\x22'||_0x4652aa==='\x27')&&_0x4652aa===_0x5dc471&&(_0x119fec=_0x119fec[_0x4cf0d0(_0x486972._0x13541d)](0x1,-0x1));}_0x150d4d[_0x51b339]=_0x119fec;}return _0x150d4d;}__name(parseEnvContent,'parseEnvContent');function serializeEnvValue(_0x4b64ec){const _0x56cb9e={_0x3e5bb7:0x217},_0x1f6c5e=_0x28d146;if(_0x4b64ec==='')return'';if(/[\s#"'=\\]|^[`]/[_0x1f6c5e(0x24a)](_0x4b64ec)||/[\n\r]/[_0x1f6c5e(0x24a)](_0x4b64ec)){const _0x314d9b=_0x4b64ec[_0x1f6c5e(_0x56cb9e._0x3e5bb7)](/\\/g,'\x5c\x5c')[_0x1f6c5e(0x217)](/"/g,'\x5c\x22')[_0x1f6c5e(0x217)](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr');return'\x22'+_0x314d9b+'\x22';}return _0x4b64ec;}__name(serializeEnvValue,_0x28d146(0x1d4));function envKeys(_0x6c6ea8){const _0x178057={_0x21ba39:0x1e5,_0x4c7f40:0x1f5,_0x5f3f05:0x1f4,_0x55720b:0x202},_0x26b538=_0x28d146,_0x43bfee=new Set();for(const _0x56ffa5 of _0x6c6ea8[_0x26b538(_0x178057._0x21ba39)](/\r?\n/)){const _0x26fa46=_0x56ffa5['trim']();if(_0x26fa46===''||_0x26fa46[_0x26b538(_0x178057._0x4c7f40)]('#'))continue;const _0x14b0f2=_0x26fa46[_0x26b538(_0x178057._0x5f3f05)]('=');if(_0x14b0f2<=0x0)continue;const _0x42bb09=_0x26fa46[_0x26b538(_0x178057._0x55720b)](0x0,_0x14b0f2)[_0x26b538(0x224)]();if(/^[A-Za-z_][A-Za-z0-9_]*$/[_0x26b538(0x24a)](_0x42bb09))_0x43bfee[_0x26b538(0x23c)](_0x42bb09);}return _0x43bfee;}__name(envKeys,_0x28d146(0x211));function isSectionDivider(_0x1ef431){const _0xc56479={_0x5d992e:0x1f5},_0x2f1862=_0x28d146,_0x340cd5=_0x1ef431['trim']();return _0x340cd5[_0x2f1862(_0xc56479._0x5d992e)]('#')&&/---/[_0x2f1862(0x24a)](_0x340cd5);}__name(isSectionDivider,_0x28d146(0x23f));function isAssignmentLine(_0x236ff6){const _0x55c1aa={_0x24912f:0x1f4,_0x43b1eb:0x224},_0x2ae097=_0x28d146,_0x536d39=_0x236ff6['trim']();if(_0x536d39===''||_0x536d39[_0x2ae097(0x1f5)]('#'))return![];const _0x56d163=_0x536d39[_0x2ae097(_0x55c1aa._0x24912f)]('=');return _0x56d163>0x0&&/^[A-Za-z_][A-Za-z0-9_]*$/[_0x2ae097(0x24a)](_0x536d39['slice'](0x0,_0x56d163)[_0x2ae097(_0x55c1aa._0x43b1eb)]());}__name(isAssignmentLine,_0x28d146(0x1d8));function isAssignmentOf(_0xe9c4c9,_0x2316d5){const _0x584e07={_0x338708:0x224,_0x4e2dc:0x1f4,_0x156643:0x202},_0x54dd4d=_0x28d146,_0x118202=_0xe9c4c9[_0x54dd4d(_0x584e07._0x338708)]();if(_0x118202===''||_0x118202[_0x54dd4d(0x1f5)]('#'))return![];const _0x4948c9=_0x118202[_0x54dd4d(_0x584e07._0x4e2dc)]('=');if(_0x4948c9<=0x0)return![];return _0x118202[_0x54dd4d(_0x584e07._0x156643)](0x0,_0x4948c9)[_0x54dd4d(0x224)]()===_0x2316d5;}__name(isAssignmentOf,_0x28d146(0x21e));function splitLines(_0x49335b){const _0x2d3419={_0x110574:0x232,_0x21b616:0x1e5},_0x25e9ba=_0x28d146,_0x5a77e5=_0x49335b[_0x25e9ba(_0x2d3419._0x110574)]('\x0a'),_0x55ae79=_0x5a77e5?_0x49335b[_0x25e9ba(0x202)](0x0,-0x1):_0x49335b;return{'lines':_0x55ae79===''?[]:_0x55ae79[_0x25e9ba(_0x2d3419._0x21b616)]('\x0a'),'trailingNewline':_0x5a77e5};}__name(splitLines,_0x28d146(0x237));function joinLines(_0x19b5bb,_0x3b71cc){const _0x2ce829={_0x153d77:0x22c},_0x4f450d=_0x28d146,_0x47e96a=_0x19b5bb[_0x4f450d(_0x2ce829._0x153d77)]('\x0a');return _0x3b71cc||_0x47e96a===''?_0x47e96a+'\x0a':_0x47e96a;}__name(joinLines,_0x28d146(0x1cb));function _0x21b2(){const _0x2b74c9=['Aw52ywXPzc1Uyw1L','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','AxnbC3nPz25Tzw50tgLUzq','lNj1BNm','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','vu5pvevtvf9erujvr19lruvqx0nbteXt','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','ywn0AxzLrw52tMfTzq','zw52q29UDgvUDa','C2fUAxrPEMvsDw5jzfnLz21LBNq','CNvUC0rPCKzVCG','vu5pvevtvf9erujvr19esvi','AxnfEhrLCM5HBfzHCK5HBwu','C3bSAxq','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','DgvYBwLUywW','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','CgfKu3rHCNq','Dw5VDgvZDc8Uzw52','ChvZAa','y2f0zwDVCML6zvzHCMLHyMXL','vu5pvevtvf9eruzbvuXux05bvKLhqvrjt05FveLnru9vvf9nuW','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','BwfUAwzLC3qUANnVBG','zMLUzeLUzgv4','ic0Tlq','y29TBwfUzhmUANnVBMW','Aw5KzxHpzG','C3rHCNrZv2L0Aa','mJuYntaXn096Bg9jCq','zw52rMLSzuzVCG','mtK3odC2vgrfyMn5','CMvNzxG','x2nVBgXLy3rPB25Z','vu5pvevtvf9cuK9xu0vs','CgfYC2u','BMfTzq','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','zgvSzxrLu2HHzg93v2fYBMLUzW','vu5pvevtvf9ftLy','BxvZDcbUB3qGyMuGzw1WDhK','C2XPy2u','vu5pvevtvf9dqunirv9esvi','iYaTls0G','vu5pvevtvf9tte9xx01p','vu5pvevtvf9usu1fwK9orq','nZG5odfpAg1YBg8','AxnsDw5UzxjdB25MAwDlzxK','Dw5RBM93BI1YDw5UzxiTA2v5','zgvIDwDNzxjgAwXLrM9Y','qxbW','CgLJA2vYlxnUyxbZAg90lNr4Da','vu5pvevtvf9dt05tt0Xf','tK9Fq09mt1i','BxvZDcbIzsbHihn0CMLUzW','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','zw52s2v5CW','Aw5JBhvKzxm','oteWmKfrwMndCW','x2HLBhbLCNm','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','zgvIDwDeAxjgB3i','CMvWBgfJzq','yxbWlxnLCNzLCJPYzwfKEq','mZjJzMDhseG','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','C3rYAw5N','CgfYC2vbChbtzxj2zxjfDMvUDa','AxnbC3nPz25Tzw50t2y','igfSCMvHzhKGzxHPC3rZigLUia','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','C2vJCMv0C0nVBNrLBNq','iI4G','AxnszwDLEeXPDgvYywW','DhjPBq','AgfZ','refuqujbu0vFvvjm','C291CMnLCY5QC29U','AgvHCNrIzwf0','Bgf5zxjZrM9Y','mtvMCg1MDfy','A2LUza','AM9PBG','CgXHBKfKzfzHCMLHyMXL','lNzPzxDLCI5SB2C','C2vJCMv0CW','Dg9mB3DLCKnHC2u','DgvZDerPCKzVCG','zw5KC1DPDgG','vu5pvevtvf9mt0nbteu','C3bSAwnL','lNzPzxDLCI5SB2nR','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','C3bSAxrmAw5LCW','C3rLChmUANnVBMW','mti4mhDdsKjSuW','zw52tgf5zxjgAwXLC0zVCG','Dw5VDgvZDc8UC2vJCMv0CW','ywrK','y3j5ChrV','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','Axntzwn0Aw9UrgL2AwrLCG','C2vJCMv0','CMvNzxHmAxrLCMfS','Dg9tDhjPBMC','odu5mJzhANnjChu','ztjL','z2v0uMfUzg9TvMfSDwvZ','C291CMnL','vu5pvevtvf9erujvrW','CNvUBMvY','BgvUz3rO','DgvZDa','ntm4odC1zvjRsen6','AM9PBKXPBMvZ','zw52','yxbWlxnLCNzLCJPYzxvZzwq','rK9sq0vFq09mt1i','odbYBKT2sfq','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','BxvZDcbUB3qGyMuGiI4Iig9YiciUlIi','mtmZmZe0ohv3BMrrBq','BwfRzvj1BKLK','C2vYAwfSAxPLrw52vMfSDwu','CNvUBMvYici'];_0x21b2=function(){return _0x2b74c9;};return _0x21b2();}function insertEnvVar(_0x35b95c,_0x20c470,_0x50addd,_0x4e039d){const _0x1a97f4={_0x286054:0x249,_0x54e080:0x1eb,_0x4b8a14:0x204,_0x130b6a:0x1f2},_0x50110c=_0x28d146,_0x268ec1=_0x20c470+'='+serializeEnvValue(_0x50addd),{lines:_0x3dcbc1,trailingNewline:_0x179740}=splitLines(_0x35b95c);if(_0x4e039d){const _0x5125fe=new RegExp('\x5cb'+_0x4e039d['toLowerCase']()+'\x5cb'),_0x3285c4=_0x3dcbc1[_0x50110c(0x1f1)](_0x411ce0=>isSectionDivider(_0x411ce0)&&_0x5125fe[_0x50110c(0x24a)](_0x411ce0[_0x50110c(0x230)]()));if(_0x3285c4!==-0x1){let _0x50af67=_0x3dcbc1[_0x50110c(0x249)];for(let _0x2c028d=_0x3285c4+0x1;_0x2c028d<_0x3dcbc1[_0x50110c(_0x1a97f4._0x286054)];_0x2c028d++){if(isSectionDivider(_0x3dcbc1[_0x2c028d])){_0x50af67=_0x2c028d;break;}}let _0x383a38=-0x1,_0x18007e=-0x1;for(let _0x5520db=_0x3285c4+0x1;_0x5520db<_0x50af67;_0x5520db++){if(_0x3dcbc1[_0x5520db][_0x50110c(0x224)]()!=='')_0x18007e=_0x5520db;if(isAssignmentLine(_0x3dcbc1[_0x5520db]))_0x383a38=_0x5520db;}const _0x1c5015=_0x383a38>=0x0?_0x383a38:_0x18007e,_0x3372ee=_0x1c5015>=0x0?_0x1c5015+0x1:_0x3285c4+0x1;return _0x3dcbc1[_0x50110c(0x234)](_0x3372ee,0x0,_0x268ec1),joinLines(_0x3dcbc1,_0x179740||_0x3dcbc1[_0x50110c(0x249)]>0x0);}if(_0x3dcbc1[_0x50110c(_0x1a97f4._0x286054)]>0x0)_0x3dcbc1[_0x50110c(0x1eb)]('');return _0x3dcbc1[_0x50110c(_0x1a97f4._0x54e080)](_0x50110c(_0x1a97f4._0x4b8a14)+_0x4e039d+_0x50110c(_0x1a97f4._0x130b6a),_0x268ec1),joinLines(_0x3dcbc1,!![]);}return _0x3dcbc1[_0x50110c(_0x1a97f4._0x54e080)](_0x268ec1),joinLines(_0x3dcbc1,!![]);}__name(insertEnvVar,'insertEnvVar');function removeEnvVar(_0x129b9a,_0x2b8fab){const _0x591d6f={_0x456f84:0x249,_0x2dfa9e:0x249},_0x5d4657=_0x28d146,{lines:_0xf15658,trailingNewline:_0x200842}=splitLines(_0x129b9a),_0x4f17fb=_0xf15658['filter'](_0x575e60=>!isAssignmentOf(_0x575e60,_0x2b8fab)),_0xdfdd4=_0x4f17fb[_0x5d4657(_0x591d6f._0x456f84)]!==_0xf15658[_0x5d4657(_0x591d6f._0x2dfa9e)];return{'content':joinLines(_0x4f17fb,_0x200842),'removed':_0xdfdd4};}__name(removeEnvVar,'removeEnvVar');var SECTION_BY_KIND={'app':_0x28d146(0x20b),'runner':'Runner','secret':void 0x0};function _0x4e2f(_0x3107fe,_0x28af49){_0x3107fe=_0x3107fe-0x1ca;const _0x21b21d=_0x21b2();let _0x4e2fde=_0x21b21d[_0x3107fe];if(_0x4e2f['SvKyTu']===undefined){var _0x6588c8=function(_0xe4f152){const _0x4356ec='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x35127a='',_0x403ef7='';for(let _0x1f4ef1=0x0,_0x444b4d,_0x27b771,_0x33cb3e=0x0;_0x27b771=_0xe4f152['charAt'](_0x33cb3e++);~_0x27b771&&(_0x444b4d=_0x1f4ef1%0x4?_0x444b4d*0x40+_0x27b771:_0x27b771,_0x1f4ef1++%0x4)?_0x35127a+=String['fromCharCode'](0xff&_0x444b4d>>(-0x2*_0x1f4ef1&0x6)):0x0){_0x27b771=_0x4356ec['indexOf'](_0x27b771);}for(let _0x24f868=0x0,_0x502f51=_0x35127a['length'];_0x24f868<_0x502f51;_0x24f868++){_0x403ef7+='%'+('00'+_0x35127a['charCodeAt'](_0x24f868)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x403ef7);};_0x4e2f['naIKhl']=_0x6588c8,_0x4e2f['WBgoRJ']={},_0x4e2f['SvKyTu']=!![];}const _0x49822c=_0x21b21d[0x0],_0xf4e4b2=_0x3107fe+_0x49822c,_0x1d0f3d=_0x4e2f['WBgoRJ'][_0xf4e4b2];return!_0x1d0f3d?(_0x4e2fde=_0x4e2f['naIKhl'](_0x4e2fde),_0x4e2f['WBgoRJ'][_0xf4e4b2]=_0x4e2fde):_0x4e2fde=_0x1d0f3d,_0x4e2fde;}function planAddVariable(_0x58c3d4){const _0xb5c7a2={_0x5f80e1:0x248,_0xb7e1e3:0x209,_0x3f2324:0x1d6,_0x32254d:0x225,_0x2b7367:0x240,_0x2b743a:0x22f,_0x1fd043:0x23b,_0x27148d:0x1ea,_0x5566fb:0x1eb,_0x3c4ef9:0x1d0,_0x94eebc:0x1eb},_0x39d2d5=_0x28d146,{name:_0x5f14c6,kind:_0xa31f0d}=_0x58c3d4;if(_0xa31f0d===_0x39d2d5(_0xb5c7a2._0x5f80e1)){if(!isRunnerConfigKey(_0x5f14c6))return{'ok':![],'code':_0x39d2d5(_0xb5c7a2._0xb7e1e3),'message':_0x5f14c6+_0x39d2d5(0x21a)};}else{if(!isExternalVarName(_0x5f14c6))return{'ok':![],'code':_0x39d2d5(_0xb5c7a2._0x3f2324),'message':_0x5f14c6+_0x39d2d5(0x23e)};}const _0x2ab94b=envKeys(_0x58c3d4[_0x39d2d5(0x1e0)])[_0x39d2d5(_0xb5c7a2._0x32254d)](_0x5f14c6),_0x148291=envKeys(_0x58c3d4[_0x39d2d5(0x221)])[_0x39d2d5(0x225)](_0x5f14c6),_0x24d2c4=_0xa31f0d===_0x39d2d5(_0xb5c7a2._0x2b7367)?_0x39d2d5(_0xb5c7a2._0x2b743a):_0x39d2d5(0x1cc),_0x42e762=_0x24d2c4===_0x39d2d5(0x22f)?_0x148291:_0x2ab94b,_0x67dd63=_0x24d2c4===_0x39d2d5(0x22f)?_0x39d2d5(_0xb5c7a2._0x1fd043):_0x39d2d5(_0xb5c7a2._0x27148d);if(_0x42e762)return{'ok':![],'code':'duplicate','message':_0x5f14c6+_0x39d2d5(0x21f)+_0x67dd63+'\x20—\x20pick\x20a\x20different\x20name\x20or\x20edit\x20the\x20existing\x20value.'};const _0x4eeb88=[];return _0xa31f0d===_0x39d2d5(_0xb5c7a2._0x2b7367)&&_0x2ab94b&&_0x4eeb88[_0x39d2d5(_0xb5c7a2._0x5566fb)](_0x5f14c6+_0x39d2d5(_0xb5c7a2._0x3c4ef9)),_0xa31f0d!=='secret'&&_0x148291&&_0x4eeb88[_0x39d2d5(_0xb5c7a2._0x94eebc)](_0x5f14c6+'\x20is\x20also\x20set\x20in\x20unotest/.secrets\x20—\x20the\x20secret\x20value\x20shadows\x20this\x20one.'),{'ok':!![],'target':_0x24d2c4,'sectionLabel':SECTION_BY_KIND[_0xa31f0d],'warnings':_0x4eeb88};}__name(planAddVariable,_0x28d146(0x22d));function deleteShadowWarning(_0x3944e3,_0x1c8648,_0x429d0a){const _0x4f9c17=_0x28d146;if(_0x429d0a!==void 0x0&&_0x429d0a!==_0x1c8648)return[_0x3944e3+_0x4f9c17(0x1ef)];return[];}__name(deleteShadowWarning,_0x28d146(0x1ff));var TERMINAL_RUNTIME_STATES=['completed','failed','aborted'];function isTerminalRuntimeState(_0x5b32ea){const _0x3e38d7={_0x2c0e69:0x212},_0x1d4443=_0x28d146;return TERMINAL_RUNTIME_STATES[_0x1d4443(_0x3e38d7._0x2c0e69)](_0x5b32ea);}__name(isTerminalRuntimeState,_0x28d146(0x1e6));export{COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,E2E_SUBDIR,ENV_FILE,HEARTBEAT_FILE,HELPERS_SUBDIR,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_RUNTIME_STATES,TERMINAL_WS_EVENT,UNOTEST_DIR,UnsupportedRunKindError,activeEnvName,categorizeVariable,debugDirFor,debuggerFileFor,deleteShadowWarning,envFileFor,envKeys,envLayerFilesFor,insertEnvVar,isExternalVarName,isRegexLiteral,isRunnerConfigKey,isTerminalRuntimeState,makeRunId,parseAppServerEvent,parseEnvContent,planAddVariable,regexLiteral,removeEnvVar,runsDirFor,sanitizeRunIdSegment,secretsFileFor,secretsLayerFilesFor,serializeEnvValue,testDirFor,validateCollectionName,validateSegmentName};
|
|
1
|
+
const _0x1ce8ec=_0x377d;(function(_0x315439,_0x34e267){const _0x836400={_0x5860bd:0x130,_0x28d9ca:0x14d,_0x4d6561:0x135,_0x52bab0:0x10d,_0x2179ad:0x151,_0x46dd0e:0x10b,_0xfe8d3d:0x142},_0x1f08e4=_0x377d,_0x3bb102=_0x315439();while(!![]){try{const _0x8ab748=parseInt(_0x1f08e4(_0x836400._0x5860bd))/0x1*(-parseInt(_0x1f08e4(_0x836400._0x28d9ca))/0x2)+-parseInt(_0x1f08e4(_0x836400._0x4d6561))/0x3*(parseInt(_0x1f08e4(0xff))/0x4)+-parseInt(_0x1f08e4(0xf8))/0x5+parseInt(_0x1f08e4(_0x836400._0x52bab0))/0x6+parseInt(_0x1f08e4(_0x836400._0x2179ad))/0x7*(parseInt(_0x1f08e4(_0x836400._0x46dd0e))/0x8)+-parseInt(_0x1f08e4(0x113))/0x9+parseInt(_0x1f08e4(_0x836400._0xfe8d3d))/0xa;if(_0x8ab748===_0x34e267)break;else _0x3bb102['push'](_0x3bb102['shift']());}catch(_0x14b1d7){_0x3bb102['push'](_0x3bb102['shift']());}}}(_0x3b73,0x282dd));var __defProp=Object[_0x1ce8ec(0x10a)],__name=(_0x374b8f,_0x2abc90)=>__defProp(_0x374b8f,_0x1ce8ec(0x105),{'value':_0x2abc90,'configurable':!![]});function parseAppServerEvent(_0x113da5){const _0x48d967=_0x1ce8ec,_0x2f307f=_0x113da5[_0x48d967(0x153)]();if(!_0x2f307f[_0x48d967(0x14e)]('{'))return null;try{const _0x1abb50=JSON['parse'](_0x2f307f);if(_0x1abb50['kind']==='app-server:ready'||_0x1abb50[_0x48d967(0xf3)]==='app-server:reused'||_0x1abb50[_0x48d967(0xf3)]===_0x48d967(0x140))return _0x1abb50;return null;}catch{return null;}}__name(parseAppServerEvent,_0x1ce8ec(0x100));var UNOTEST_DIR=_0x1ce8ec(0x14c),E2E_SUBDIR=_0x1ce8ec(0x11e),HELPERS_SUBDIR=_0x1ce8ec(0x144),COLLECTIONS_SUBDIR='_collections',RUNS_SUBDIR='.runs',SNAPSHOTS_SUBDIR=_0x1ce8ec(0x123);function testDirFor(_0x2b5e14){return''+E2E_SUBDIR+_0x2b5e14;}__name(testDirFor,'testDirFor');function runsDirFor(_0x2fb857){return''+RUNS_SUBDIR+_0x2fb857;}__name(runsDirFor,'runsDirFor');function debugDirFor(_0x485102){const _0x4c41b2={_0x3c4b54:0x110},_0x498e41=_0x1ce8ec;return _0x498e41(_0x4c41b2._0x3c4b54)+_0x485102;}__name(debugDirFor,_0x1ce8ec(0x152));function debuggerFileFor(_0x806c94){const _0x45215c=_0x1ce8ec;return UNOTEST_DIR+'/.debugger'+_0x806c94+_0x45215c(0x14a);}__name(debuggerFileFor,_0x1ce8ec(0xdd));var LOCK_FILE=_0x1ce8ec(0xf9),LOG_FILE=_0x1ce8ec(0x12d),STEPS_FILE=_0x1ce8ec(0x121),HEARTBEAT_FILE=_0x1ce8ec(0x104),STDOUT_FILE=_0x1ce8ec(0x13a),STDERR_FILE=_0x1ce8ec(0x111),COMMANDS_FILE=_0x1ce8ec(0xd3),RUNTIME_FILE='runtime.json',PICKER_SNAPSHOT_FILE=_0x1ce8ec(0xdb),ENV_FILE=_0x1ce8ec(0x146),SECRETS_FILE=_0x1ce8ec(0x11a);function envFileFor(_0x55d332,_0xe10ca4){return''+ENV_FILE+_0x55d332+(_0xe10ca4?'.'+_0xe10ca4:'');}__name(envFileFor,_0x1ce8ec(0x10f));function secretsFileFor(_0x12bfb0,_0x5d5ce3){return''+SECRETS_FILE+_0x12bfb0+(_0x5d5ce3?'.'+_0x5d5ce3:'');}__name(secretsFileFor,_0x1ce8ec(0xe5));function envLayerFilesFor(_0x47f1d3,_0x2e1746){return layersFor(ENV_FILE,_0x47f1d3,_0x2e1746);}__name(envLayerFilesFor,_0x1ce8ec(0x103));function secretsLayerFilesFor(_0x17fc82,_0x54caf1){return layersFor(SECRETS_FILE,_0x17fc82,_0x54caf1);}__name(secretsLayerFilesFor,_0x1ce8ec(0xd9));function layersFor(_0x228a1d,_0x2a2855,_0x545bff){const _0x6b57c2={_0x65b596:0x126},_0x2d65ca=_0x1ce8ec,_0x95eefd=[_0x228a1d];if(_0x2a2855)_0x95eefd[_0x2d65ca(0x126)](''+_0x228a1d+_0x2a2855);if(_0x545bff){_0x95eefd[_0x2d65ca(_0x6b57c2._0x65b596)](_0x228a1d+'.'+_0x545bff);if(_0x2a2855)_0x95eefd['push'](''+_0x228a1d+_0x2a2855+'.'+_0x545bff);}return _0x95eefd;}__name(layersFor,_0x1ce8ec(0x10e));function activeEnvName(_0x1399da){const _0x11be44=_0x1ce8ec,_0x26bf14=_0x1399da[_0x11be44(0x120)]?.[_0x11be44(0x153)]();return _0x26bf14?_0x26bf14:void 0x0;}__name(activeEnvName,_0x1ce8ec(0x116));function isRegexLiteral(_0x30eae2){const _0x3596dd={_0x5b36c9:0x108,_0x43e9e8:0xd6},_0x292ed7=_0x1ce8ec;return typeof _0x30eae2===_0x292ed7(0x133)&&_0x30eae2!==null&&_0x30eae2['kind']===_0x292ed7(_0x3596dd._0x5b36c9)&&typeof _0x30eae2[_0x292ed7(0x13f)]===_0x292ed7(_0x3596dd._0x43e9e8)&&typeof _0x30eae2['flags']==='string';}__name(isRegexLiteral,_0x1ce8ec(0xea));function regexLiteral(_0x1a594e,_0x5629c2=''){const _0x430065={_0x2de524:0x108},_0x598f84=_0x1ce8ec;return{'kind':_0x598f84(_0x430065._0x2de524),'source':_0x1a594e,'flags':_0x5629c2};}__name(regexLiteral,_0x1ce8ec(0xe1));var RAND_BYTES=0x3;function makeRunId(_0x36f812){const _0xc5f616={_0x30fed6:0x125,_0x458dfd:0x136,_0xaef60d:0x13c},_0x84d78d=_0x1ce8ec,_0x14cf40=sanitizeRunIdSegment(_0x36f812),_0x2fe532=Date[_0x84d78d(_0xc5f616._0x30fed6)]()[_0x84d78d(_0xc5f616._0x458dfd)](0x24),_0x11ce3e=new Uint8Array(RAND_BYTES);globalThis['crypto'][_0x84d78d(_0xc5f616._0xaef60d)](_0x11ce3e);let _0x72bd3b='';for(let _0x3445fb=0x0;_0x3445fb<_0x11ce3e['length'];_0x3445fb++){_0x72bd3b+=_0x11ce3e[_0x3445fb]['toString'](0x10)[_0x84d78d(0xda)](0x2,'0');}return _0x14cf40+'-'+_0x2fe532+'-'+_0x72bd3b;}__name(makeRunId,_0x1ce8ec(0xec));function sanitizeRunIdSegment(_0x8fc35c){const _0x3144f1={_0xf794f7:0xe8,_0x43b713:0x107,_0x5ea7aa:0xfd},_0x396233=_0x1ce8ec,_0x37119e=_0x8fc35c['replace'](/[^a-zA-Z0-9_-]+/g,'-')[_0x396233(0xe8)](/-+/g,'-')[_0x396233(_0x3144f1._0xf794f7)](/^-|-$/g,'');return _0x37119e[_0x396233(_0x3144f1._0x43b713)]>0x0?_0x37119e:_0x396233(_0x3144f1._0x5ea7aa);}__name(sanitizeRunIdSegment,_0x1ce8ec(0x114));var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x1e1d33,_0x10c119){const _0x15cbb5={_0x413ec4:0x119,_0x353464:0x101,_0x11473b:0x14e,_0x4d8a8e:0x11f,_0x1a083b:0x143},_0x384c13=_0x1ce8ec;if(typeof _0x1e1d33!==_0x384c13(0xd6))return _0x384c13(0xef);const _0x34eddd=_0x1e1d33[_0x384c13(0x153)]();if(_0x34eddd['length']===0x0)return'must\x20not\x20be\x20empty';if(_0x34eddd==='.'||_0x34eddd==='..')return'must\x20not\x20be\x20\x22.\x22\x20or\x20\x22..\x22';if(_0x34eddd[_0x384c13(0x14e)]('.'))return _0x384c13(_0x15cbb5._0x413ec4);if(_0x10c119?.[_0x384c13(_0x15cbb5._0x353464)]&&_0x34eddd[_0x384c13(_0x15cbb5._0x11473b)]('_'))return _0x384c13(_0x15cbb5._0x4d8a8e);if(FS_UNSAFE_NAME_RE[_0x384c13(_0x15cbb5._0x1a083b)](_0x34eddd))return _0x384c13(0xe0);return null;}__name(validateFsSafeName,_0x1ce8ec(0xf7));function _0x3b73(){const _0x6ade71=['Aw5KzxHpzG','ywn0AxzLrw52tMfTzq','vu5pvevtvf9iruferuq','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','Dw5VDgvZDc8UC2vJCMv0CW','CMvTB3zLrw52vMfY','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','vu5pvevtvf9eruzbvuXux05bvKLhqvrjt05FveLnru9vvf9nuW','ztjL','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','vu5pvevtvf9ftLy','C3rLChmUANnVBMW','AxnfEhrLCM5HBfzHCK5HBwu','lNnUyxbZAg90CW','y2f0zwDVCML6zvzHCMLHyMXL','BM93','ChvZAa','vu5pvevtvf9erujvr19lruvqx0nbteXt','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','vu5pvevtvf9mt0DFtevwruW','rK9sq0vFq09mt1i','C2vJCMv0C0nVBNrLBNq','vu5pvevtvf9usu1fwK9orq','lNzPzxDLCI5SB2C','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','zw52s2v5CW','mKfQq01UsW','CgfYC2vfBNzdB250zw50','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','B2jQzwn0','zMLSDgvY','oxbNswvWEq','Dg9tDhjPBMC','AxnsDw5UzxjdB25MAwDlzxK','Dg9mB3DLCKnHC2u','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','C3rKB3v0lMXVzW','vu5pvevtvf9orvrxt1jl','z2v0uMfUzg9TvMfSDwvZ','C2XPy2u','BwfUAwzLC3qUANnVBG','C291CMnL','yxbWlxnLCNzLCJPLCNjVCG','vu5pvevtvf9cuK9xu0vs','nZeZmtG2mhbrt2rWra','DgvZDa','x2HLBhbLCNm','Axntzwn0Aw9UrgL2AwrLCG','Dw5VDgvZDc8Uzw52','AM9PBKXPBMvZ','tK9Fq09mt1i','zw52','lMPZB24','Dw5RBM93BI1YDw5UzxiTA2v5','Dw5VDgvZDa','ntyYmZzUzer3qw0','C3rHCNrZv2L0Aa','AgfZ','AM9PBG','ntq1m2TSEeHXBq','zgvIDwDeAxjgB3i','DhjPBq','DMfSAwrHDgvtzwDTzw50tMfTzq','CgXHBKfKzfzHCMLHyMXL','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','y29TBwfUzhmUANnVBMW','yxbW','qxbW','C3rYAw5N','Aw52ywXPzc1Uyw1L','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','C2vJCMv0C0XHEwvYrMLSzxngB3i','CgfKu3rHCNq','CgLJA2vYlxnUyxbZAg90lNr4Da','CNvUBMvYici','zgvIDwDNzxjgAwXLrM9Y','DgvYBwLUywW','vu5pvevtvf9tte9xx01p','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','CMvNzxHmAxrLCMfS','y29TCgXLDgvK','zMfPBgvK','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','C2vJCMv0C0zPBgvgB3i','C2vYAwfSAxPLrw52vMfSDwu','zw52q29UDgvUDa','CMvWBgfJzq','vu5pvevtvf9dqunirv9esvi','AxnszwDLEeXPDgvYywW','C3bSAxq','BwfRzvj1BKLK','C2vJCMv0','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','BxvZDcbIzsbHihn0CMLUzW','C3bSAwnL','AxnbC3nPz25Tzw50tgLUzq','CNvUBMvY','A2LUza','ywrK','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','yxnZAwDUBwvUDevUDhjPzxm','DMfSAwrHDgvgC1nHzMvoyw1L','mti5odyZnvzQzhDkBW','lNzPzxDLCI5SB2nR','vu5pvevtvf9erujvr19nqvHFqLLurvm','iokaLcbWAwnRigeGzgLMzMvYzw50ig5HBwuGB3iGzwrPDcb0AguGzxHPC3rPBMCGDMfSDwuU','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','CNvU','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','mtCXnJC2u2LPv2jd','CgfYC2vbChbtzxj2zxjfDMvUDa','CMvZzxj2zwrvBMrLCNnJB3jL','zw5KC1DPDgG','zw52tgf5zxjgAwXLC0zVCG','AgvHCNrIzwf0','BMfTzq','zhvWBgLJyxrL','BgvUz3rO','CMvNzxG','C2vJCMv0CW','zgvMAw5LuhjVCgvYDhK','mJrVuLfOENG','vu5pvevtvf9dt05tt0Xf','mti0ntGWne1MEvHLvq','Bgf5zxjZrM9Y','zw52rMLSzuzVCG','lMrLyNvN','C3rKzxjYlMXVzW','iYaTls0G','mJGYndC3nKfIC0T5Ba','C2fUAxrPEMvsDw5jzfnLz21LBNq'];_0x3b73=function(){return _0x6ade71;};return _0x3b73();}var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x28a0c0){return validateFsSafeName(_0x28a0c0);}__name(validateCollectionName,_0x1ce8ec(0x118));var RUN_MANIFEST_FILE=_0x1ce8ec(0x13e),RUN_SOURCES_FILE='sources.json',UnsupportedRunKindError=class extends Error{static{__name(this,_0x1ce8ec(0x132));}constructor(_0x37e802,_0xa8bb9c){const _0x1de39c={_0x12dfaf:0xdc},_0x11c5d5=_0x1ce8ec;super(_0x11c5d5(_0x1de39c._0x12dfaf)+_0xa8bb9c+_0x11c5d5(0xee)+_0x37e802+'\x22'),this[_0x11c5d5(0x105)]='UnsupportedRunKindError';}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,'RunnerAdapterNotFoundError');}constructor(_0x3ebde0,_0x3284e5){const _0x2d0579={_0xb7b46:0x105},_0x36a58d=_0x1ce8ec;super(_0x36a58d(0xd8)+_0x3ebde0+'\x22.\x20'+_0x3284e5),this[_0x36a58d(_0x2d0579._0xb7b46)]='RunnerAdapterNotFoundError';}},RunnerNotConfiguredError=class extends Error{static{__name(this,_0x1ce8ec(0xfe));}constructor(_0x4af31a){const _0x5af9de=_0x1ce8ec;super(_0x4af31a),this[_0x5af9de(0x105)]=_0x5af9de(0xfe);}},SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0x1fe39b){return validateFsSafeName(_0x1fe39b,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x1ce8ec(0x154));var TERMINAL_WS_EVENT=_0x1ce8ec(0xde),RUNNER_CONFIG_KEYS=new Set([_0x1ce8ec(0x141),_0x1ce8ec(0x117),_0x1ce8ec(0xdf),_0x1ce8ec(0x128),_0x1ce8ec(0x11d),_0x1ce8ec(0x12e),'UNOTEST_LOCALE',_0x1ce8ec(0x12c),_0x1ce8ec(0x129),'UNOTEST_DEBUG','UNOTEST_DEBUG_DIR',_0x1ce8ec(0xfa),'UNOTEST_DEBUG_PREVIEW_BYTES',_0x1ce8ec(0x11c),_0x1ce8ec(0x127),_0x1ce8ec(0x13b),_0x1ce8ec(0x10c),_0x1ce8ec(0xe9),_0x1ce8ec(0x148),_0x1ce8ec(0x12a),'DATABASE_URL']);function isRunnerConfigKey(_0x4b7503){const _0x1c5a36=_0x1ce8ec;return RUNNER_CONFIG_KEYS[_0x1c5a36(0x14f)](_0x4b7503);}__name(isRunnerConfigKey,_0x1ce8ec(0x137));function categorizeVariable(_0x96b4e9){const _0x24d7ed={_0x1ff7f2:0x13f,_0x241690:0x109,_0x3cb6fa:0xed,_0x3c688f:0x105,_0x3972f3:0xd4},_0x1082a1=_0x1ce8ec;if(_0x96b4e9[_0x1082a1(_0x24d7ed._0x1ff7f2)]===_0x1082a1(_0x24d7ed._0x241690))return _0x1082a1(_0x24d7ed._0x3cb6fa);return isRunnerConfigKey(_0x96b4e9[_0x1082a1(_0x24d7ed._0x3c688f)])?_0x1082a1(0xf2):_0x1082a1(_0x24d7ed._0x3972f3);}__name(categorizeVariable,_0x1ce8ec(0x124));function isExternalVarName(_0xc65ba9){const _0x2394ca=_0x1ce8ec;return/^[A-Z][A-Z0-9_]*$/[_0x2394ca(0x143)](_0xc65ba9);}__name(isExternalVarName,_0x1ce8ec(0x122));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x411289){const _0x4612cd={_0x684c07:0x153,_0x2cde91:0x115,_0x3b5075:0x153,_0x12cc8d:0x13d},_0x2e02c4=_0x1ce8ec;for(const _0x1ab606 of _0x411289[_0x2e02c4(0xeb)](/\r?\n/)){const _0x3636a0=_0x1ab606[_0x2e02c4(_0x4612cd._0x684c07)]();if(_0x3636a0===''||_0x3636a0[_0x2e02c4(0x14e)]('#'))continue;const _0x49efb4=_0x3636a0[_0x2e02c4(_0x4612cd._0x2cde91)]('=');if(_0x49efb4<=0x0)continue;const _0x2c0b2c=_0x3636a0['slice'](0x0,_0x49efb4)[_0x2e02c4(_0x4612cd._0x3b5075)]();if(!ENV_KEY_RE[_0x2e02c4(0x143)](_0x2c0b2c))continue;yield[_0x2c0b2c,_0x3636a0[_0x2e02c4(_0x4612cd._0x12cc8d)](_0x49efb4+0x1)[_0x2e02c4(_0x4612cd._0x3b5075)]()];}}__name(assignmentEntries,_0x1ce8ec(0xf6));function parseEnvContent(_0x5e1feb){const _0x156939={_0x3a2f66:0x107},_0x3f6135=_0x1ce8ec,_0x357e9e={};for(const [_0x4f6469,_0x940385]of assignmentEntries(_0x5e1feb)){let _0x35d584=_0x940385;if(_0x35d584[_0x3f6135(0x107)]>=0x2){const _0x26d2fc=_0x35d584[0x0],_0x4d5655=_0x35d584[_0x35d584[_0x3f6135(_0x156939._0x3a2f66)]-0x1];(_0x26d2fc==='\x22'||_0x26d2fc==='\x27')&&_0x26d2fc===_0x4d5655&&(_0x35d584=_0x35d584[_0x3f6135(0x13d)](0x1,-0x1));}_0x357e9e[_0x4f6469]=_0x35d584;}return _0x357e9e;}__name(parseEnvContent,_0x1ce8ec(0x131));function serializeEnvValue(_0x2097bb){const _0xffac58={_0xe28798:0x143,_0x444522:0xe8},_0x954ff0=_0x1ce8ec;if(_0x2097bb==='')return'';if(/[\s#"'=\\]|^[`]/[_0x954ff0(0x143)](_0x2097bb)||/[\n\r]/[_0x954ff0(_0xffac58._0xe28798)](_0x2097bb)){const _0x3cc2ca=_0x2097bb[_0x954ff0(0xe8)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')[_0x954ff0(0xe8)](/\n/g,'\x5cn')[_0x954ff0(_0xffac58._0x444522)](/\r/g,'\x5cr');return'\x22'+_0x3cc2ca+'\x22';}return _0x2097bb;}__name(serializeEnvValue,_0x1ce8ec(0xe6));function envKeys(_0x1e4382){const _0xa0616f={_0x3188ac:0xf4},_0x8b15f8=_0x1ce8ec,_0x20a6a4=new Set();for(const [_0x113e8c]of assignmentEntries(_0x1e4382))_0x20a6a4[_0x8b15f8(_0xa0616f._0x3188ac)](_0x113e8c);return _0x20a6a4;}__name(envKeys,_0x1ce8ec(0x12f));function isSectionDivider(_0xec10eb){const _0x137f1f={_0x56701f:0x153,_0x21e913:0x14e,_0x30e939:0x143},_0x5ba7f8=_0x1ce8ec,_0x5831e7=_0xec10eb[_0x5ba7f8(_0x137f1f._0x56701f)]();return _0x5831e7[_0x5ba7f8(_0x137f1f._0x21e913)]('#')&&/---/[_0x5ba7f8(_0x137f1f._0x30e939)](_0x5831e7);}__name(isSectionDivider,_0x1ce8ec(0x145));function isAssignmentLine(_0x4de313){const _0x28e8a2={_0x1a4214:0x14e},_0x403588=_0x1ce8ec,_0x2f7893=_0x4de313[_0x403588(0x153)]();if(_0x2f7893===''||_0x2f7893[_0x403588(_0x28e8a2._0x1a4214)]('#'))return![];const _0x34b5f6=_0x2f7893['indexOf']('=');return _0x34b5f6>0x0&&ENV_KEY_RE['test'](_0x2f7893[_0x403588(0x13d)](0x0,_0x34b5f6)[_0x403588(0x153)]());}__name(isAssignmentLine,_0x1ce8ec(0xf1));function isAssignmentOf(_0x5dbb21,_0x5d83c8){const _0x2e9c64={_0x451a2e:0x153,_0x536016:0x14e,_0x4013ac:0x13d},_0x4ffde1=_0x1ce8ec,_0x1990b2=_0x5dbb21[_0x4ffde1(_0x2e9c64._0x451a2e)]();if(_0x1990b2===''||_0x1990b2[_0x4ffde1(_0x2e9c64._0x536016)]('#'))return![];const _0x5fabfb=_0x1990b2[_0x4ffde1(0x115)]('=');if(_0x5fabfb<=0x0)return![];return _0x1990b2[_0x4ffde1(_0x2e9c64._0x4013ac)](0x0,_0x5fabfb)[_0x4ffde1(_0x2e9c64._0x451a2e)]()===_0x5d83c8;}__name(isAssignmentOf,'isAssignmentOf');function splitLines(_0x3f8436){const _0x171010={_0x13fd67:0x102,_0x2bf6b3:0x13d},_0x2a1995=_0x1ce8ec,_0x980ae0=_0x3f8436[_0x2a1995(_0x171010._0x13fd67)]('\x0a'),_0x47a6fe=_0x980ae0?_0x3f8436[_0x2a1995(_0x171010._0x2bf6b3)](0x0,-0x1):_0x3f8436;return{'lines':_0x47a6fe===''?[]:_0x47a6fe[_0x2a1995(0xeb)]('\x0a'),'trailingNewline':_0x980ae0};}__name(splitLines,'splitLines');function joinLines(_0x2f733d,_0x4b4a0d){const _0x213b71=_0x1ce8ec,_0x2116e6=_0x2f733d[_0x213b71(0x150)]('\x0a');return _0x4b4a0d||_0x2116e6===''?_0x2116e6+'\x0a':_0x2116e6;}__name(joinLines,_0x1ce8ec(0x147));function insertEnvVar(_0x27c5e7,_0x106eb7,_0x358684,_0x210a0f){const _0x4fcc59={_0x17c31e:0x138,_0x22d1b4:0xf0,_0x425f3b:0x126},_0x495d11=_0x1ce8ec,_0x5b1d3a=_0x106eb7+'='+serializeEnvValue(_0x358684),{lines:_0x37af7e,trailingNewline:_0xb8b6b8}=splitLines(_0x27c5e7);if(_0x210a0f){const _0x38449a=new RegExp('\x5cb'+_0x210a0f[_0x495d11(_0x4fcc59._0x17c31e)]()+'\x5cb'),_0x493d5d=_0x37af7e['findIndex'](_0x2d1477=>isSectionDivider(_0x2d1477)&&_0x38449a[_0x495d11(0x143)](_0x2d1477['toLowerCase']()));if(_0x493d5d!==-0x1){let _0x44bd44=_0x37af7e['length'];for(let _0x312454=_0x493d5d+0x1;_0x312454<_0x37af7e['length'];_0x312454++){if(isSectionDivider(_0x37af7e[_0x312454])){_0x44bd44=_0x312454;break;}}let _0x2ab6f2=-0x1,_0x28ad9c=-0x1;for(let _0x1b0d55=_0x493d5d+0x1;_0x1b0d55<_0x44bd44;_0x1b0d55++){if(_0x37af7e[_0x1b0d55][_0x495d11(0x153)]()!=='')_0x28ad9c=_0x1b0d55;if(isAssignmentLine(_0x37af7e[_0x1b0d55]))_0x2ab6f2=_0x1b0d55;}const _0x4145a3=_0x2ab6f2>=0x0?_0x2ab6f2:_0x28ad9c,_0x2b8fca=_0x4145a3>=0x0?_0x4145a3+0x1:_0x493d5d+0x1;return _0x37af7e[_0x495d11(_0x4fcc59._0x22d1b4)](_0x2b8fca,0x0,_0x5b1d3a),joinLines(_0x37af7e,_0xb8b6b8||_0x37af7e[_0x495d11(0x107)]>0x0);}if(_0x37af7e['length']>0x0)_0x37af7e[_0x495d11(_0x4fcc59._0x425f3b)]('');return _0x37af7e['push'](_0x495d11(0x112)+_0x210a0f+'\x20---',_0x5b1d3a),joinLines(_0x37af7e,!![]);}return _0x37af7e['push'](_0x5b1d3a),joinLines(_0x37af7e,!![]);}__name(insertEnvVar,'insertEnvVar');function removeEnvVar(_0x301dc2,_0x40133a){const _0x300b08={_0x5147c2:0x134},_0x1af161=_0x1ce8ec,{lines:_0x4bf75d,trailingNewline:_0x5edb20}=splitLines(_0x301dc2),_0x3a414d=_0x4bf75d[_0x1af161(_0x300b08._0x5147c2)](_0x10cb85=>!isAssignmentOf(_0x10cb85,_0x40133a)),_0x1e6cb9=_0x3a414d[_0x1af161(0x107)]!==_0x4bf75d['length'];return{'content':joinLines(_0x3a414d,_0x5edb20),'removed':_0x1e6cb9};}__name(removeEnvVar,_0x1ce8ec(0x11b));var SECTION_BY_KIND={'app':_0x1ce8ec(0xd5),'runner':'Runner','secret':void 0x0};function planAddVariable(_0x1be783){const _0x410e49={_0x12bc89:0xd7,_0x1d7c4c:0xe7,_0x2d2cc1:0x12b,_0x5f24c1:0x109,_0x129215:0x11a,_0x4a1883:0x146,_0x137d13:0x106,_0x597a58:0xfb,_0x1a83ea:0xed,_0x192990:0xed,_0x4ee979:0x126,_0x457d0a:0xf5},_0x47f1f7=_0x1ce8ec,{name:_0x2ea878,kind:_0x4a318a}=_0x1be783;if(_0x4a318a==='runner'){if(!isRunnerConfigKey(_0x2ea878))return{'ok':![],'code':_0x47f1f7(0x14b),'message':_0x2ea878+_0x47f1f7(0xfc)};}else{if(!isExternalVarName(_0x2ea878))return{'ok':![],'code':_0x47f1f7(_0x410e49._0x12bc89),'message':_0x2ea878+'\x20must\x20be\x20UPPER_SNAKE\x20(e.g.\x20APP_BASE_URL)\x20so\x20a\x20scenario\x20can\x20reference\x20it\x20by\x20name.'};}const _0x22880f=envKeys(_0x1be783[_0x47f1f7(_0x410e49._0x1d7c4c)])['has'](_0x2ea878),_0x12c2e5=envKeys(_0x1be783[_0x47f1f7(_0x410e49._0x2d2cc1)])[_0x47f1f7(0x14f)](_0x2ea878),_0x13c7ad=_0x4a318a==='secret'?_0x47f1f7(_0x410e49._0x5f24c1):_0x47f1f7(0x149),_0xe670c7=_0x13c7ad==='secrets'?_0x12c2e5:_0x22880f,_0x1d4020=_0x13c7ad===_0x47f1f7(0x109)?_0x47f1f7(_0x410e49._0x129215):_0x47f1f7(_0x410e49._0x4a1883);if(_0xe670c7)return{'ok':![],'code':_0x47f1f7(_0x410e49._0x137d13),'message':_0x2ea878+'\x20already\x20exists\x20in\x20'+_0x1d4020+_0x47f1f7(_0x410e49._0x597a58)};const _0x5520f1=[];return _0x4a318a===_0x47f1f7(_0x410e49._0x1a83ea)&&_0x22880f&&_0x5520f1['push'](_0x2ea878+_0x47f1f7(0x139)),_0x4a318a!==_0x47f1f7(_0x410e49._0x192990)&&_0x12c2e5&&_0x5520f1[_0x47f1f7(_0x410e49._0x4ee979)](_0x2ea878+_0x47f1f7(_0x410e49._0x457d0a)),{'ok':!![],'target':_0x13c7ad,'sectionLabel':SECTION_BY_KIND[_0x4a318a],'warnings':_0x5520f1};}__name(planAddVariable,_0x1ce8ec(0x155));function deleteShadowWarning(_0x3b966b,_0x4848e5,_0x548029){const _0x423c84=_0x1ce8ec;if(_0x548029!==void 0x0&&_0x548029!==_0x4848e5)return[_0x3b966b+_0x423c84(0xe4)];return[];}__name(deleteShadowWarning,'deleteShadowWarning');var TERMINAL_RUNTIME_STATES=[_0x1ce8ec(0xe2),_0x1ce8ec(0xe3),'aborted'];function isTerminalRuntimeState(_0x4ff4f1){return TERMINAL_RUNTIME_STATES['includes'](_0x4ff4f1);}function _0x377d(_0x2774e3,_0x3f0677){_0x2774e3=_0x2774e3-0xd3;const _0x3b7345=_0x3b73();let _0x377d19=_0x3b7345[_0x2774e3];if(_0x377d['DcKjIi']===undefined){var _0x3da3f5=function(_0x5623d0){const _0x4a4b38='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x374b8f='',_0x2abc90='';for(let _0x113da5=0x0,_0x2f307f,_0x1abb50,_0x2b5e14=0x0;_0x1abb50=_0x5623d0['charAt'](_0x2b5e14++);~_0x1abb50&&(_0x2f307f=_0x113da5%0x4?_0x2f307f*0x40+_0x1abb50:_0x1abb50,_0x113da5++%0x4)?_0x374b8f+=String['fromCharCode'](0xff&_0x2f307f>>(-0x2*_0x113da5&0x6)):0x0){_0x1abb50=_0x4a4b38['indexOf'](_0x1abb50);}for(let _0x2fb857=0x0,_0x485102=_0x374b8f['length'];_0x2fb857<_0x485102;_0x2fb857++){_0x2abc90+='%'+('00'+_0x374b8f['charCodeAt'](_0x2fb857)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2abc90);};_0x377d['fWJnrK']=_0x3da3f5,_0x377d['oIBNQu']={},_0x377d['DcKjIi']=!![];}const _0x5b3c77=_0x3b7345[0x0],_0x594fdb=_0x2774e3+_0x5b3c77,_0x29d489=_0x377d['oIBNQu'][_0x594fdb];return!_0x29d489?(_0x377d19=_0x377d['fWJnrK'](_0x377d19),_0x377d['oIBNQu'][_0x594fdb]=_0x377d19):_0x377d19=_0x29d489,_0x377d19;}__name(isTerminalRuntimeState,_0x1ce8ec(0x156));export{COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,E2E_SUBDIR,ENV_FILE,HEARTBEAT_FILE,HELPERS_SUBDIR,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,SNAPSHOTS_SUBDIR,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_RUNTIME_STATES,TERMINAL_WS_EVENT,UNOTEST_DIR,UnsupportedRunKindError,activeEnvName,categorizeVariable,debugDirFor,debuggerFileFor,deleteShadowWarning,envFileFor,envKeys,envLayerFilesFor,insertEnvVar,isExternalVarName,isRegexLiteral,isRunnerConfigKey,isTerminalRuntimeState,makeRunId,parseAppServerEvent,parseEnvContent,planAddVariable,regexLiteral,removeEnvVar,runsDirFor,sanitizeRunIdSegment,secretsFileFor,secretsLayerFilesFor,serializeEnvValue,testDirFor,validateCollectionName,validateSegmentName};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unotest/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Cross-runner protocol for the @unotest ecosystem: shared TypeScript types, path constants, the IRunnerAdapter contract that lets @unotest/viewer drive @unotest/web, @unotest/mobile (and future runners) through the same surface. Pure types + pure functions only — zero runtime deps, browser-safe.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,18 +32,5 @@
|
|
|
32
32
|
"tsup": "^8.5.1",
|
|
33
33
|
"tsx": "^4.19.2",
|
|
34
34
|
"typescript": "^5.7.2"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
38
|
-
"test": "node --import tsx --test --test-reporter=spec 'src/**/*.test.ts'",
|
|
39
|
-
"compile": "tsup",
|
|
40
|
-
"verify": "pnpm typecheck && pnpm test",
|
|
41
|
-
"obfuscate": "node scripts/obfuscate.mjs",
|
|
42
|
-
"build": "pnpm verify && pnpm compile && pnpm obfuscate && pnpm check:tarball",
|
|
43
|
-
"check:no-cyrillic": "node scripts/check-no-cyrillic.mjs",
|
|
44
|
-
"check:no-internal-refs": "node scripts/check-no-internal-refs.mjs",
|
|
45
|
-
"check:surface": "pnpm check:no-cyrillic && pnpm check:no-internal-refs",
|
|
46
|
-
"check:tarball": "node scripts/check-tarball.mjs",
|
|
47
|
-
"prepublish:check": "node scripts/prepublish-check.mjs"
|
|
48
35
|
}
|
|
49
36
|
}
|