shiplightai 0.1.71 → 0.1.73

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/dist/fixture.d.ts CHANGED
@@ -2,6 +2,9 @@ import * as _playwright_test from '@playwright/test';
2
2
  export { expect } from '@playwright/test';
3
3
  import { VariableStore } from './VariableStore.js';
4
4
  import { WebAgent } from './agent/webAgent.js';
5
+ import { ShiplightUseOptions } from './index.js';
6
+ import './core/agentContext.js';
7
+ import './config.js';
5
8
 
6
9
  /**
7
10
  * Per-test auth: path to a login script + optional args passed to the login function.
@@ -43,6 +46,25 @@ interface TestContext {
43
46
  [key: string]: any;
44
47
  }
45
48
  declare function createTestContext(variableStore: VariableStore): TestContext;
49
+ /**
50
+ * Parse the `SHIPLIGHT_VARS_OVERRIDE` env var.
51
+ * Returns null when unset, throws on invalid JSON or non-string values.
52
+ */
53
+ declare function parseVarsOverrideEnv(raw: string | undefined): Record<string, string> | null;
54
+ /**
55
+ * Check whether a key was declared `sensitive: true` in the resolved
56
+ * `use.variables` declarations. Test-level overrides project-level.
57
+ */
58
+ declare function isDeclaredSensitive(key: string, projectVariables: ShiplightUseOptions['variables'], testVariables: ShiplightUseOptions['variables']): boolean;
59
+ /**
60
+ * Apply CLI / env overrides (`SHIPLIGHT_VARS_OVERRIDE`) to the variable store
61
+ * with highest priority. Sensitivity is inherited from whichever declaration
62
+ * the key already has in project/test `use.variables`; undeclared keys are
63
+ * stored as non-sensitive.
64
+ *
65
+ * Exported for testing.
66
+ */
67
+ declare function applyVarsOverride(variableStore: VariableStore, projectVariables: ShiplightUseOptions['variables'], testVariables: ShiplightUseOptions['variables'], envVar?: string | undefined): void;
46
68
  /**
47
69
  * Explicit allowlist of environment variable names that Shiplight forwards
48
70
  * into sdk-core's internal `SdkConfig.env`. sdk-core is strict — it reads
@@ -92,7 +114,8 @@ type ShiplightFixtures = {
92
114
  userDataDir: string | undefined;
93
115
  extensionStorageState: string | undefined;
94
116
  autoDismissModal: boolean;
117
+ variables: ShiplightUseOptions['variables'];
95
118
  };
96
119
  declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & ShiplightFixtures, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
97
120
 
98
- export { type AuthSpec, SDK_ENV_ALLOWLIST, type TestContext, buildSdkEnv, createTestContext, resolveAuthState, test };
121
+ export { type AuthSpec, SDK_ENV_ALLOWLIST, type TestContext, applyVarsOverride, buildSdkEnv, createTestContext, isDeclaredSensitive, parseVarsOverrideEnv, resolveAuthState, test };