@unotest/protocol 0.9.1 → 0.10.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 CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to `@unotest/protocol` are documented in this file.
4
4
 
5
+ ## [0.10.0] - 2026-08-06
6
+
7
+ ### Patch Changes
8
+
9
+ - 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.
10
+
11
+ ## [0.9.2] - 2026-06-16
12
+
13
+ ### Added
14
+
15
+ - **Snapshot bundle protocol.** `SNAPSHOTS_SUBDIR` (`unotest/.snapshots/`) and a
16
+ `SnapshotTab` (`kind: "snapshot"`, keyed by its own `snapshotId`) — an imported,
17
+ terminal run rendered from a portable `*.unotest.zip` bundle rather than the live
18
+ runner, so a teammate's exported run opens as a foreign tab without colliding with
19
+ the viewer's own `runId` space.
20
+ - **`RunManifest.capture`.** The artifact-capture flags (`console` / `network`)
21
+ resolved from the runner's env at start, recorded so the viewer can tell "capture
22
+ was disabled" apart from "capture was on but the run aborted before writing
23
+ `console.json` / `network.json`". Optional — pre-existing runs omit it and the
24
+ viewer falls back to a file-presence heuristic.
25
+
5
26
  ## [0.9.1] - 2026-06-14
6
27
 
7
28
  ### 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. Block-list approach
147
- * (any Unicode letter is fine — collections can be named in any
148
- * language) bounded by what `posix.join("…", `${name}.yaml`)` must keep
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. Includes the
459
- * path separators (`\` `/`) so a valid segment is guaranteed to be ONE
460
- * level — no nesting smuggled through a name. Mirrors the block-list
461
- * rationale of `validateCollectionName`. */
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
@@ -978,6 +992,9 @@ interface FailureBundleWrittenEvent extends RunArtifactBase {
978
992
  /** Project-relative path to the screenshot PNG inside the bundle,
979
993
  * when tier-2 capture succeeded. */
980
994
  screenshotPath?: string;
995
+ /** Page URL at the moment of failure (same value captured into the
996
+ * bundle's `snapshot.json`/`outline.txt`), for the viewer's ErrorCard. */
997
+ url?: string;
981
998
  }
982
999
  interface RunFinishedEvent extends RunArtifactBase {
983
1000
  kind: "run:finished";
@@ -1235,8 +1252,16 @@ interface CollectionRunTab {
1235
1252
  kind: "collection-run";
1236
1253
  runId: RunId;
1237
1254
  }
1255
+ /** Open imported snapshot — a teammate's run exported as a portable
1256
+ * `*.unotest.zip`. Functionally a (terminal) run rendered from a bundle, not
1257
+ * the live runner; keyed by its own `snapshotId` so it never collides with
1258
+ * the viewer's own `runId` space. The `SNAPSHOT` badge marks it as foreign. */
1259
+ interface SnapshotTab {
1260
+ kind: "snapshot";
1261
+ snapshotId: string;
1262
+ }
1238
1263
  /** Discriminated union of every open-tab shape the frontend supports. */
1239
- type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab;
1264
+ type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab | SnapshotTab;
1240
1265
  /** All tab `kind` literals — useful for switch-completeness checks. */
1241
1266
  type TabKindName = TabKind["kind"];
1242
1267
 
@@ -1341,4 +1366,4 @@ interface RuntimeStateFile {
1341
1366
  updatedAt: number;
1342
1367
  }
1343
1368
 
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 };
1369
+ 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 _0x3af863=_0x3001;(function(_0x292c0f,_0x1cb400){const _0x3f0318={_0x1a15e1:0x114,_0x55f148:0x15f,_0xc55da1:0xeb,_0x20d246:0xf4},_0x5aab49=_0x3001,_0x34759c=_0x292c0f();while(!![]){try{const _0xee06d1=parseInt(_0x5aab49(0x112))/0x1*(parseInt(_0x5aab49(0x12b))/0x2)+-parseInt(_0x5aab49(_0x3f0318._0x1a15e1))/0x3+parseInt(_0x5aab49(_0x3f0318._0x55f148))/0x4+-parseInt(_0x5aab49(0x116))/0x5+parseInt(_0x5aab49(0x13c))/0x6*(parseInt(_0x5aab49(_0x3f0318._0xc55da1))/0x7)+parseInt(_0x5aab49(_0x3f0318._0x20d246))/0x8*(-parseInt(_0x5aab49(0xf7))/0x9)+parseInt(_0x5aab49(0x147))/0xa;if(_0xee06d1===_0x1cb400)break;else _0x34759c['push'](_0x34759c['shift']());}catch(_0x3d0c6d){_0x34759c['push'](_0x34759c['shift']());}}}(_0xabb2,0xc17ca));var __defProp=Object[_0x3af863(0x12d)],__name=(_0x2c4d73,_0x5af5cf)=>__defProp(_0x2c4d73,_0x3af863(0x103),{'value':_0x5af5cf,'configurable':!![]});function parseAppServerEvent(_0x4fefd4){const _0x24da1e={_0x3b852c:0xfe},_0x25bb0f=_0x3af863,_0x64da04=_0x4fefd4[_0x25bb0f(0x10d)]();if(!_0x64da04[_0x25bb0f(_0x24da1e._0x3b852c)]('{'))return null;try{const _0x38a665=JSON[_0x25bb0f(0x10c)](_0x64da04);if(_0x38a665['kind']===_0x25bb0f(0x106)||_0x38a665[_0x25bb0f(0x14a)]==='app-server:reused'||_0x38a665['kind']===_0x25bb0f(0x151))return _0x38a665;return null;}catch{return null;}}__name(parseAppServerEvent,'parseAppServerEvent');function _0xabb2(){const _0x580d4d=['qxbW','nde4oda3oeDczvHOyG','vu5pvevtvf9dt05tt0Xf','zw52','zgvIDwDeAxjgB3i','C3rKB3v0lMXVzW','CMvTB3zLrw52vMfY','C3rKzxjYlMXVzW','C3rHCNrZv2L0Aa','C2vJCMv0C0XHEwvYrMLSzxngB3i','Dg9tDhjPBMC','C2vJCMv0CW','C3rLChmUANnVBMW','BMfTzq','ywjVCNrLza','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','yxbWlxnLCNzLCJPYzwfKEq','AxnszwDLEeXPDgvYywW','ztjL','C291CMnLCY5QC29U','x2HLBhbLCNm','zMLUzeLUzgv4','CgfYC2u','DhjPBq','zw52tgf5zxjgAwXLC0zVCG','lNzPzxDLCI5SB2C','y29TBwfUzhmUANnVBMW','CgLJA2vYlxnUyxbZAg90lNr4Da','mta3ody2nK1nt3Dtsa','lMPZB24','mJG0mda4og1yveDkwq','lNj1BNm','nJiZote1mgrODezita','BxvZDcbIzsbHihn0CMLUzW','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','zw52rMLSzuzVCG','Aw52ywXPzc1Uyw1L','BwfRzvj1BKLK','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','vu5pvevtvf9erujvr19esvi','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','Dw5VDgvZDc8UC2vJCMv0CW','CMvNzxHmAxrLCMfS','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','y2f0zwDVCML6zvzHCMLHyMXL','vu5pvevtvf9cuK9xu0vs','vu5pvevtvf9mt0DFtevwruW','refuqujbu0vFvvjm','AM9PBKXPBMvZ','vu5pvevtvf9erujvrW','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','ic0Tlq','vu5pvevtvf9erujvr19nqvHFqLLurvm','mNLmzgfxuG','ywrK','zgvMAw5LuhjVCgvYDhK','Aw5KzxHpzG','rK9sq0vFq09mt1i','Dg9mB3DLCKnHC2u','C3bSAwnL','igfSCMvHzhKGzxHPC3rZigLUia','C2XPy2u','CgXHBKfKzfzHCMLHyMXL','C291CMnL','Dw5VDgvZDa','zw52s2v5CW','DMfSAwrHDgvtzwDTzw50tMfTzq','BxvZDcbUB3qGyMuGiI4Iig9YiciUlIi','vu5pvevtvf9erujvr19lruvqx0nbteXt','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','mZyWAuDlDfjZ','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','ChvZAa','Aw5JBhvKzxm','CgfKu3rHCNq','DgvZDa','zw52q29UDgvUDa','C2vJCMv0','zMXHz3m','vu5pvevtvf9iruferuq','Dw5VDgvZDc8Uzw52','mty0odC1ndbdv1fLvge','C3bSAxrmAw5LCW','AxnfEhrLCM5HBfzHCK5HBwu','A2LUza','BM93','CMvWBgfJzq','zhvWBgLJyxrL','C3bSAxq','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','CgfYC2vfBNzdB250zw50','yxbWlxnLCNzLCJPLCNjVCG','vu5pvevtvf9mt0nbteu','x2nVBgXLy3rPB25Z','C3rYAw5N','vu5pvevtvf9orvrxt1jl','Aw5Zzxj0rw52vMfY','AgfZ','CMvZzxj2zwrvBMrLCNnJB3jL','C2vYAwfSAxPLrw52vMfSDwu','AxnsDw5UzxjdB25MAwDlzxK','BwfUAwzLC3qUANnVBG','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','AxnbC3nPz25Tzw50tgLUzq','CNvUDgLTzs5QC29U','mtKZnJKYoePuuLnjuG','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','lY5Kzwj1z2DLCG','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','BgvUz3rO','zw5KC1DPDgG','CNvUBMvY','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','y29TCgXLDgvK','lMrLyNvN','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','ywn0AxzLrw52tMfTzq','DMfSAwrHDgvgC1nHzMvoyw1L','Axntzwn0Aw9UrgL2AwrLCG','Dw5RBM93BI1YDw5UzxiTA2v5','vu5pvevtvf9ftLy','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','odiZnZzNwwrcAge','tK9Fq09mt1i','yxnZAwDUBwvUDevUDhjPzxm','zMLSDgvY','CMvNzxG','CNvUBMvYici','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','AxnbC3nPz25Tzw50t2y','zgvIDwDNzxjgAwXLrM9Y','mtzQBNn4vvq','zMfPBgvK'];_0xabb2=function(){return _0x580d4d;};return _0xabb2();}var UNOTEST_DIR=_0x3af863(0x136),E2E_SUBDIR=_0x3af863(0x108),HELPERS_SUBDIR=_0x3af863(0x10a),COLLECTIONS_SUBDIR=_0x3af863(0x153),RUNS_SUBDIR=_0x3af863(0x115),SNAPSHOTS_SUBDIR='.snapshots';function testDirFor(_0x4d26ba){return''+E2E_SUBDIR+_0x4d26ba;}__name(testDirFor,'testDirFor');function runsDirFor(_0x2ac07f){return''+RUNS_SUBDIR+_0x2ac07f;}__name(runsDirFor,'runsDirFor');function debugDirFor(_0x44e744){const _0x3020e9={_0x110531:0xe3},_0x6c4398=_0x3af863;return _0x6c4398(_0x3020e9._0x110531)+_0x44e744;}__name(debugDirFor,_0x3af863(0xfa));function debuggerFileFor(_0x4ecb5e){const _0x2a110d={_0x42f0c0:0x161},_0x29375f=_0x3af863;return UNOTEST_DIR+_0x29375f(_0x2a110d._0x42f0c0)+_0x4ecb5e+_0x29375f(0x113);}__name(debuggerFileFor,_0x3af863(0xf3));var LOCK_FILE='.viewer.lock',LOG_FILE=_0x3af863(0x10f),STEPS_FILE=_0x3af863(0x102),HEARTBEAT_FILE='heartbeat',STDOUT_FILE=_0x3af863(0xfb),STDERR_FILE=_0x3af863(0xfd),COMMANDS_FILE=_0x3af863(0x110),RUNTIME_FILE=_0x3af863(0x15e),PICKER_SNAPSHOT_FILE=_0x3af863(0x111),ENV_FILE=_0x3af863(0x146),SECRETS_FILE='unotest/.secrets';function envFileFor(_0x27c935,_0x1741bc){return''+ENV_FILE+_0x27c935+(_0x1741bc?'.'+_0x1741bc:'');}function _0x3001(_0x13b6df,_0x243c07){_0x13b6df=_0x13b6df-0xe2;const _0xabb211=_0xabb2();let _0x3001bb=_0xabb211[_0x13b6df];if(_0x3001['CzUEeS']===undefined){var _0x24748c=function(_0x37454a){const _0x430c98='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c4d73='',_0x5af5cf='';for(let _0x4fefd4=0x0,_0x64da04,_0x38a665,_0x4d26ba=0x0;_0x38a665=_0x37454a['charAt'](_0x4d26ba++);~_0x38a665&&(_0x64da04=_0x4fefd4%0x4?_0x64da04*0x40+_0x38a665:_0x38a665,_0x4fefd4++%0x4)?_0x2c4d73+=String['fromCharCode'](0xff&_0x64da04>>(-0x2*_0x4fefd4&0x6)):0x0){_0x38a665=_0x430c98['indexOf'](_0x38a665);}for(let _0x2ac07f=0x0,_0x44e744=_0x2c4d73['length'];_0x2ac07f<_0x44e744;_0x2ac07f++){_0x5af5cf+='%'+('00'+_0x2c4d73['charCodeAt'](_0x2ac07f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5af5cf);};_0x3001['CmqAQY']=_0x24748c,_0x3001['lHTyFU']={},_0x3001['CzUEeS']=!![];}const _0x29ca53=_0xabb211[0x0],_0x17469a=_0x13b6df+_0x29ca53,_0x466431=_0x3001['lHTyFU'][_0x17469a];return!_0x466431?(_0x3001bb=_0x3001['CmqAQY'](_0x3001bb),_0x3001['lHTyFU'][_0x17469a]=_0x3001bb):_0x3001bb=_0x466431,_0x3001bb;}__name(envFileFor,_0x3af863(0x119));function secretsFileFor(_0x36d758,_0x9eb2f8){return''+SECRETS_FILE+_0x36d758+(_0x9eb2f8?'.'+_0x9eb2f8:'');}__name(secretsFileFor,'secretsFileFor');function envLayerFilesFor(_0x2250b7,_0x13c50a){return layersFor(ENV_FILE,_0x2250b7,_0x13c50a);}__name(envLayerFilesFor,_0x3af863(0x10e));function secretsLayerFilesFor(_0x1a17b5,_0x3b488c){return layersFor(SECRETS_FILE,_0x1a17b5,_0x3b488c);}__name(secretsLayerFilesFor,_0x3af863(0xff));function layersFor(_0x3b2663,_0x5e81a9,_0x397f33){const _0x2db625={_0x5af82c:0x13e,_0x3d32ed:0x13e},_0x242d68=_0x3af863,_0x1ae05e=[_0x3b2663];if(_0x5e81a9)_0x1ae05e[_0x242d68(_0x2db625._0x5af82c)](''+_0x3b2663+_0x5e81a9);if(_0x397f33){_0x1ae05e[_0x242d68(_0x2db625._0x5af82c)](_0x3b2663+'.'+_0x397f33);if(_0x5e81a9)_0x1ae05e[_0x242d68(_0x2db625._0x3d32ed)](''+_0x3b2663+_0x5e81a9+'.'+_0x397f33);}return _0x1ae05e;}__name(layersFor,'layersFor');function activeEnvName(_0x172638){const _0x51d8d6=_0x3af863,_0x980f8c=_0x172638[_0x51d8d6(0xe9)]?.[_0x51d8d6(0x10d)]();return _0x980f8c?_0x980f8c:void 0x0;}__name(activeEnvName,_0x3af863(0xe5));function isRegexLiteral(_0x1f82ed){const _0x37d5c4={_0x3fe3f7:0x144},_0x88c922=_0x3af863;return typeof _0x1f82ed==='object'&&_0x1f82ed!==null&&_0x1f82ed[_0x88c922(0x14a)]===_0x88c922(0xef)&&typeof _0x1f82ed['source']==='string'&&typeof _0x1f82ed[_0x88c922(_0x37d5c4._0x3fe3f7)]===_0x88c922(0x154);}__name(isRegexLiteral,_0x3af863(0x107));function regexLiteral(_0x55afca,_0xc973fc=''){const _0x391974={_0x21dcdb:0xef},_0x227a3b=_0x3af863;return{'kind':_0x227a3b(_0x391974._0x21dcdb),'source':_0x55afca,'flags':_0xc973fc};}__name(regexLiteral,_0x3af863(0x120));var RAND_BYTES=0x3;function makeRunId(_0x7701cd){const _0x14824b={_0x31b74d:0x14b},_0x35e4a6=_0x3af863,_0x4be992=sanitizeRunIdSegment(_0x7701cd),_0xcbb46f=Date[_0x35e4a6(_0x14824b._0x31b74d)]()[_0x35e4a6(0x100)](0x24),_0x4edba0=new Uint8Array(RAND_BYTES);globalThis['crypto']['getRandomValues'](_0x4edba0);let _0x30e854='';for(let _0xc9b405=0x0;_0xc9b405<_0x4edba0[_0x35e4a6(0x163)];_0xc9b405++){_0x30e854+=_0x4edba0[_0xc9b405]['toString'](0x10)[_0x35e4a6(0x140)](0x2,'0');}return _0x4be992+'-'+_0xcbb46f+'-'+_0x30e854;}__name(makeRunId,_0x3af863(0x11b));function sanitizeRunIdSegment(_0x276ce5){const _0x27600d={_0x20bf6a:0x14c,_0x4a7a8b:0x163},_0x353692=_0x3af863,_0x272c16=_0x276ce5[_0x353692(_0x27600d._0x20bf6a)](/[^a-zA-Z0-9_-]+/g,'-')[_0x353692(0x14c)](/-+/g,'-')['replace'](/^-|-$/g,'');return _0x272c16[_0x353692(_0x27600d._0x4a7a8b)]>0x0?_0x272c16:'run';}__name(sanitizeRunIdSegment,'sanitizeRunIdSegment');var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x3aad8a,_0x277e72){const _0x3fce5a={_0x34cc92:0x154,_0xf883ed:0x117,_0x203054:0x10d,_0x3241e2:0x163,_0x209483:0xfe,_0x4290b3:0x14f,_0x4b4b67:0x11e},_0x478dbf=_0x3af863;if(typeof _0x3aad8a!==_0x478dbf(_0x3fce5a._0x34cc92))return _0x478dbf(_0x3fce5a._0xf883ed);const _0x55d298=_0x3aad8a[_0x478dbf(_0x3fce5a._0x203054)]();if(_0x55d298[_0x478dbf(_0x3fce5a._0x3241e2)]===0x0)return'must\x20not\x20be\x20empty';if(_0x55d298==='.'||_0x55d298==='..')return _0x478dbf(0x139);if(_0x55d298[_0x478dbf(0xfe)]('.'))return _0x478dbf(0x15c);if(_0x277e72?.[_0x478dbf(0x158)]&&_0x55d298[_0x478dbf(_0x3fce5a._0x209483)]('_'))return _0x478dbf(_0x3fce5a._0x4290b3);if(FS_UNSAFE_NAME_RE[_0x478dbf(0x141)](_0x55d298))return _0x478dbf(_0x3fce5a._0x4b4b67);return null;}__name(validateFsSafeName,_0x3af863(0xe6));var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x581992){return validateFsSafeName(_0x581992);}__name(validateCollectionName,_0x3af863(0x105));var RUN_MANIFEST_FILE=_0x3af863(0x15b),RUN_SOURCES_FILE=_0x3af863(0x109),UnsupportedRunKindError=class extends Error{static{__name(this,'UnsupportedRunKindError');}constructor(_0x35456e,_0x2e04b0){const _0x4a534e={_0x57ab1e:0x162},_0x38ac22=_0x3af863;super(_0x38ac22(0xf0)+_0x2e04b0+_0x38ac22(0xea)+_0x35456e+'\x22'),this['name']=_0x38ac22(_0x4a534e._0x57ab1e);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,'RunnerAdapterNotFoundError');}constructor(_0x2485a6,_0x1904f6){const _0x499b90={_0x244775:0x121},_0x36f05f=_0x3af863;super(_0x36f05f(_0x499b90._0x244775)+_0x2485a6+'\x22.\x20'+_0x1904f6),this['name']='RunnerAdapterNotFoundError';}},RunnerNotConfiguredError=class extends Error{static{__name(this,_0x3af863(0x118));}constructor(_0x41836b){const _0x2bf1c2={_0x2ee599:0x103},_0x4567e7=_0x3af863;super(_0x41836b),this[_0x4567e7(_0x2bf1c2._0x2ee599)]=_0x4567e7(0x118);}},SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0x1d6eb8){return validateFsSafeName(_0x1d6eb8,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x3af863(0x138));var TERMINAL_WS_EVENT='terminal',RUNNER_CONFIG_KEYS=new Set([_0x3af863(0x123),_0x3af863(0x145),'UNOTEST_SLOW_MO',_0x3af863(0x11c),'UNOTEST_DEFAULT_NAVIGATION_TIMEOUT_MS',_0x3af863(0xe4),_0x3af863(0x152),'UNOTEST_TIMEZONE',_0x3af863(0x124),_0x3af863(0x127),_0x3af863(0x11d),_0x3af863(0x12a),_0x3af863(0x13b),_0x3af863(0x13d),_0x3af863(0x13a),_0x3af863(0x155),_0x3af863(0xf8),'UNOTEST_CACHE_DIR',_0x3af863(0xec),_0x3af863(0x12f),_0x3af863(0x125)]);function isRunnerConfigKey(_0x31ff90){const _0x18a9bf=_0x3af863;return RUNNER_CONFIG_KEYS[_0x18a9bf(0x157)](_0x31ff90);}__name(isRunnerConfigKey,_0x3af863(0x15a));function categorizeVariable(_0x9d1ef8){const _0x108d3d={_0x5e2a2f:0x135,_0x5f544b:0x101,_0x18d8d9:0x165},_0x34c7a3=_0x3af863;if(_0x9d1ef8[_0x34c7a3(_0x108d3d._0x5e2a2f)]===_0x34c7a3(_0x108d3d._0x5f544b))return _0x34c7a3(0x143);return isRunnerConfigKey(_0x9d1ef8['name'])?_0x34c7a3(_0x108d3d._0x18d8d9):'app';}__name(categorizeVariable,_0x3af863(0x122));function isExternalVarName(_0x4ba162){return/^[A-Z][A-Z0-9_]*$/['test'](_0x4ba162);}__name(isExternalVarName,_0x3af863(0x149));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x305042){const _0x5cd4cd={_0x11cd8d:0x14e,_0x857492:0x10d,_0x2373a0:0x12e,_0xc79da8:0x133,_0x1b5281:0x10d},_0x25e555=_0x3af863;for(const _0x2e7218 of _0x305042[_0x25e555(_0x5cd4cd._0x11cd8d)](/\r?\n/)){const _0x2ad880=_0x2e7218[_0x25e555(_0x5cd4cd._0x857492)]();if(_0x2ad880===''||_0x2ad880['startsWith']('#'))continue;const _0x2b9d3b=_0x2ad880[_0x25e555(_0x5cd4cd._0x2373a0)]('=');if(_0x2b9d3b<=0x0)continue;const _0x39cc4e=_0x2ad880[_0x25e555(_0x5cd4cd._0xc79da8)](0x0,_0x2b9d3b)[_0x25e555(0x10d)]();if(!ENV_KEY_RE['test'](_0x39cc4e))continue;yield[_0x39cc4e,_0x2ad880[_0x25e555(0x133)](_0x2b9d3b+0x1)[_0x25e555(_0x5cd4cd._0x1b5281)]()];}}__name(assignmentEntries,_0x3af863(0xed));function parseEnvContent(_0x1953f0){const _0x2cc9ab={_0x57a554:0x163,_0x5a360a:0x133},_0x179b07=_0x3af863,_0xd02196={};for(const [_0x361bf0,_0x1035fb]of assignmentEntries(_0x1953f0)){let _0x19480e=_0x1035fb;if(_0x19480e[_0x179b07(_0x2cc9ab._0x57a554)]>=0x2){const _0x3bb840=_0x19480e[0x0],_0x180ba8=_0x19480e[_0x19480e['length']-0x1];(_0x3bb840==='\x22'||_0x3bb840==='\x27')&&_0x3bb840===_0x180ba8&&(_0x19480e=_0x19480e[_0x179b07(_0x2cc9ab._0x5a360a)](0x1,-0x1));}_0xd02196[_0x361bf0]=_0x19480e;}return _0xd02196;}__name(parseEnvContent,_0x3af863(0x150));function serializeEnvValue(_0x49261d){const _0x40a8de={_0x2fc71f:0x141,_0x480b77:0x14c},_0x566c11=_0x3af863;if(_0x49261d==='')return'';if(/[\s#"'=\\]|^[`]/[_0x566c11(_0x40a8de._0x2fc71f)](_0x49261d)||/[\n\r]/[_0x566c11(_0x40a8de._0x2fc71f)](_0x49261d)){const _0x3b13fa=_0x49261d[_0x566c11(0x14c)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')[_0x566c11(0x14c)](/\n/g,'\x5cn')[_0x566c11(_0x40a8de._0x480b77)](/\r/g,'\x5cr');return'\x22'+_0x3b13fa+'\x22';}return _0x49261d;}__name(serializeEnvValue,_0x3af863(0x159));function envKeys(_0x7592e2){const _0xec33c5={_0x3000c4:0x12c},_0x5756a2=_0x3af863,_0x102d9b=new Set();for(const [_0x255e6c]of assignmentEntries(_0x7592e2))_0x102d9b[_0x5756a2(_0xec33c5._0x3000c4)](_0x255e6c);return _0x102d9b;}__name(envKeys,_0x3af863(0x137));function isSectionDivider(_0x1ece30){const _0x30e501={_0x5b2c10:0x141},_0xfa7e13=_0x3af863,_0xb63b3c=_0x1ece30['trim']();return _0xb63b3c['startsWith']('#')&&/---/[_0xfa7e13(_0x30e501._0x5b2c10)](_0xb63b3c);}__name(isSectionDivider,_0x3af863(0xe7));function isAssignmentLine(_0x42f45b){const _0x3494c5={_0x54fa5f:0x10d},_0x47e9db=_0x3af863,_0x783a7=_0x42f45b[_0x47e9db(0x10d)]();if(_0x783a7===''||_0x783a7[_0x47e9db(0xfe)]('#'))return![];const _0x3ec538=_0x783a7[_0x47e9db(0x12e)]('=');return _0x3ec538>0x0&&ENV_KEY_RE[_0x47e9db(0x141)](_0x783a7[_0x47e9db(0x133)](0x0,_0x3ec538)[_0x47e9db(_0x3494c5._0x54fa5f)]());}__name(isAssignmentLine,_0x3af863(0x15d));function isAssignmentOf(_0x13573,_0x2e2e12){const _0x3b0e3d={_0x4575df:0x10d},_0x3e529c=_0x3af863,_0x4ff7fa=_0x13573['trim']();if(_0x4ff7fa===''||_0x4ff7fa[_0x3e529c(0xfe)]('#'))return![];const _0x2be79a=_0x4ff7fa[_0x3e529c(0x12e)]('=');if(_0x2be79a<=0x0)return![];return _0x4ff7fa['slice'](0x0,_0x2be79a)[_0x3e529c(_0x3b0e3d._0x4575df)]()===_0x2e2e12;}__name(isAssignmentOf,_0x3af863(0xf2));function splitLines(_0x4ea897){const _0x4d7f7d={_0x3ad332:0x164},_0x18e2fc=_0x3af863,_0x279d9=_0x4ea897[_0x18e2fc(_0x4d7f7d._0x3ad332)]('\x0a'),_0x4d557f=_0x279d9?_0x4ea897['slice'](0x0,-0x1):_0x4ea897;return{'lines':_0x4d557f===''?[]:_0x4d557f['split']('\x0a'),'trailingNewline':_0x279d9};}__name(splitLines,_0x3af863(0x148));function joinLines(_0x48d273,_0x2c51ec){const _0x1baf2e=_0x48d273['join']('\x0a');return _0x2c51ec||_0x1baf2e===''?_0x1baf2e+'\x0a':_0x1baf2e;}__name(joinLines,_0x3af863(0x126));function insertEnvVar(_0x2ce0d7,_0x1305da,_0x1d4a84,_0x592885){const _0x5404a1={_0x1a310f:0x10b,_0x388478:0x163,_0xf1d692:0x13e,_0x4d5dab:0x129},_0x4159ad=_0x3af863,_0x4e75f8=_0x1305da+'='+serializeEnvValue(_0x1d4a84),{lines:_0x53d799,trailingNewline:_0x44d980}=splitLines(_0x2ce0d7);if(_0x592885){const _0x21f75e=new RegExp('\x5cb'+_0x592885['toLowerCase']()+'\x5cb'),_0x101836=_0x53d799[_0x4159ad(_0x5404a1._0x1a310f)](_0x485c72=>isSectionDivider(_0x485c72)&&_0x21f75e['test'](_0x485c72[_0x4159ad(0x130)]()));if(_0x101836!==-0x1){let _0x175bc2=_0x53d799['length'];for(let _0x5b060e=_0x101836+0x1;_0x5b060e<_0x53d799[_0x4159ad(_0x5404a1._0x388478)];_0x5b060e++){if(isSectionDivider(_0x53d799[_0x5b060e])){_0x175bc2=_0x5b060e;break;}}let _0x2c54c0=-0x1,_0x143a0b=-0x1;for(let _0x19e9bb=_0x101836+0x1;_0x19e9bb<_0x175bc2;_0x19e9bb++){if(_0x53d799[_0x19e9bb]['trim']()!=='')_0x143a0b=_0x19e9bb;if(isAssignmentLine(_0x53d799[_0x19e9bb]))_0x2c54c0=_0x19e9bb;}const _0x46726a=_0x2c54c0>=0x0?_0x2c54c0:_0x143a0b,_0x2beb12=_0x46726a>=0x0?_0x46726a+0x1:_0x101836+0x1;return _0x53d799[_0x4159ad(0x131)](_0x2beb12,0x0,_0x4e75f8),joinLines(_0x53d799,_0x44d980||_0x53d799[_0x4159ad(0x163)]>0x0);}if(_0x53d799[_0x4159ad(_0x5404a1._0x388478)]>0x0)_0x53d799['push']('');return _0x53d799[_0x4159ad(_0x5404a1._0xf1d692)]('#\x20---\x20'+_0x592885+_0x4159ad(_0x5404a1._0x4d5dab),_0x4e75f8),joinLines(_0x53d799,!![]);}return _0x53d799['push'](_0x4e75f8),joinLines(_0x53d799,!![]);}__name(insertEnvVar,_0x3af863(0x156));function removeEnvVar(_0x5cfe9b,_0x296461){const _0x1c0857={_0x1bb897:0xee},_0x42c45d=_0x3af863,{lines:_0x18b79b,trailingNewline:_0x26bcb4}=splitLines(_0x5cfe9b),_0x554dce=_0x18b79b[_0x42c45d(_0x1c0857._0x1bb897)](_0x155987=>!isAssignmentOf(_0x155987,_0x296461)),_0x4bdab9=_0x554dce[_0x42c45d(0x163)]!==_0x18b79b[_0x42c45d(0x163)];return{'content':joinLines(_0x554dce,_0x26bcb4),'removed':_0x4bdab9};}__name(removeEnvVar,_0x3af863(0xfc));var SECTION_BY_KIND={'app':_0x3af863(0xf6),'runner':'Runner','secret':void 0x0};function planAddVariable(_0x3c88ae){const _0x1495a3={_0xa3396c:0x165,_0x22397c:0x11a,_0x5851cd:0x128,_0x290788:0x142,_0x15118d:0x157,_0x1c0a63:0x11f,_0xa26f2e:0x143,_0x2eecfc:0x143},_0x14176e=_0x3af863,{name:_0x5a8edd,kind:_0x568275}=_0x3c88ae;if(_0x568275===_0x14176e(_0x1495a3._0xa3396c)){if(!isRunnerConfigKey(_0x5a8edd))return{'ok':![],'code':_0x14176e(0xe8),'message':_0x5a8edd+'\x20is\x20not\x20a\x20known\x20runner\x20setting\x20—\x20choose\x20one\x20from\x20the\x20runner-config\x20list.'};}else{if(!isExternalVarName(_0x5a8edd))return{'ok':![],'code':_0x14176e(_0x1495a3._0x22397c),'message':_0x5a8edd+_0x14176e(_0x1495a3._0x5851cd)};}const _0x3f7dee=envKeys(_0x3c88ae[_0x14176e(_0x1495a3._0x290788)])[_0x14176e(_0x1495a3._0x15118d)](_0x5a8edd),_0x37f47e=envKeys(_0x3c88ae['secretsContent'])['has'](_0x5a8edd),_0x107c4b=_0x568275==='secret'?_0x14176e(0x101):_0x14176e(0xf9),_0x38302b=_0x107c4b===_0x14176e(0x101)?_0x37f47e:_0x3f7dee,_0x291f59=_0x107c4b===_0x14176e(0x101)?_0x14176e(_0x1495a3._0x1c0a63):_0x14176e(0x146);if(_0x38302b)return{'ok':![],'code':_0x14176e(0x14d),'message':_0x5a8edd+_0x14176e(0x132)+_0x291f59+'\x20—\x20pick\x20a\x20different\x20name\x20or\x20edit\x20the\x20existing\x20value.'};const _0x603722=[];return _0x568275===_0x14176e(_0x1495a3._0xa26f2e)&&_0x3f7dee&&_0x603722['push'](_0x5a8edd+'\x20is\x20also\x20set\x20in\x20unotest/.env\x20—\x20the\x20secret\x20value\x20now\x20shadows\x20it.'),_0x568275!==_0x14176e(_0x1495a3._0x2eecfc)&&_0x37f47e&&_0x603722[_0x14176e(0x13e)](_0x5a8edd+_0x14176e(0xf1)),{'ok':!![],'target':_0x107c4b,'sectionLabel':SECTION_BY_KIND[_0x568275],'warnings':_0x603722};}__name(planAddVariable,_0x3af863(0x134));function deleteShadowWarning(_0x3d5690,_0x4a7604,_0x1bf08b){const _0x434fd0={_0x24ebc7:0x166},_0x535c8e=_0x3af863;if(_0x1bf08b!==void 0x0&&_0x1bf08b!==_0x4a7604)return[_0x3d5690+_0x535c8e(_0x434fd0._0x24ebc7)];return[];}__name(deleteShadowWarning,'deleteShadowWarning');var TERMINAL_RUNTIME_STATES=[_0x3af863(0xe2),_0x3af863(0xf5),_0x3af863(0x104)];function isTerminalRuntimeState(_0x292e8b){const _0x54fe09={_0x1e6c18:0x13f},_0x12d066=_0x3af863;return TERMINAL_RUNTIME_STATES[_0x12d066(_0x54fe09._0x1e6c18)](_0x292e8b);}__name(isTerminalRuntimeState,_0x3af863(0x160));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.9.1",
3
+ "version": "0.10.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": {