@specific.dev/spectest 0.87.0 → 0.88.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/browser.d.ts +7 -0
  2. package/dist/browser.js +102 -10
  3. package/dist/components/aws.d.ts +8 -7
  4. package/dist/components/aws.js +6 -0
  5. package/dist/components/electron-chrome.d.ts +1 -0
  6. package/dist/components/electron-chrome.js +76 -0
  7. package/dist/components/electron.d.ts +46 -0
  8. package/dist/components/electron.js +99 -0
  9. package/dist/components/emulate/service.js +3 -4
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/components/index.js +1 -0
  12. package/dist/components/microsoft.d.ts +2 -2
  13. package/dist/components/microsoft.js +5 -6
  14. package/dist/components/supabase-functions-reach.d.ts +18 -0
  15. package/dist/components/supabase-functions-reach.js +155 -0
  16. package/dist/components/supabase.js +33 -5
  17. package/dist/daemon.js +34 -2
  18. package/dist/desktop-recorder.d.ts +1 -0
  19. package/dist/desktop-recorder.js +30 -0
  20. package/dist/desktop.d.ts +42 -0
  21. package/dist/desktop.js +10 -0
  22. package/dist/harness/reach.d.ts +4 -0
  23. package/dist/harness/reach.js +2 -2
  24. package/dist/index.d.ts +27 -1
  25. package/dist/index.js +6 -1
  26. package/dist/project-files.js +6 -6
  27. package/dist/recorder.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/src/browser.ts +106 -10
  30. package/src/components/aws.ts +6 -0
  31. package/src/components/electron-chrome.ts +76 -0
  32. package/src/components/electron.test.ts +38 -0
  33. package/src/components/electron.ts +115 -0
  34. package/src/components/emulate/entry.mjs +5 -7
  35. package/src/components/emulate/service.ts +3 -4
  36. package/src/components/index.ts +1 -0
  37. package/src/components/microsoft.ts +7 -8
  38. package/src/components/supabase-functions-reach.test.ts +90 -0
  39. package/src/components/supabase-functions-reach.ts +153 -0
  40. package/src/components/supabase.ts +33 -5
  41. package/src/daemon.ts +43 -6
  42. package/src/desktop-recorder.test.ts +55 -0
  43. package/src/desktop-recorder.ts +30 -0
  44. package/src/desktop.ts +43 -0
  45. package/src/harness/reach.test.ts +12 -0
  46. package/src/harness/reach.ts +6 -2
  47. package/src/index.ts +34 -1
  48. package/src/inputs.test.ts +20 -0
  49. package/src/project-files.ts +6 -6
  50. package/src/recorder.ts +2 -0
@@ -12,14 +12,14 @@
12
12
  // is correct for every file that is IN that hash. It can be behind for the two
13
13
  // kinds of file the hash excludes: `spectest/tests/**` (excluded so a test-only
14
14
  // edit keeps the fast start) and anything a project lists in
15
- // `spectest/.envignore`.
15
+ // `spectest/.specignore`.
16
16
  //
17
17
  // Hence the rule below: a path under `spectest/` resolves against the app copy
18
18
  // first, because that copy is always current — this is what lets a fixture live
19
19
  // in `spectest/tests/fixtures/` and still be found after it was added. Any
20
20
  // other path resolves against /workspace, which the hash keeps current.
21
21
  //
22
- // The remaining hole is a file that `.envignore` excludes AND that sits outside
22
+ // The remaining hole is a file that `.specignore` excludes AND that sits outside
23
23
  // `spectest/`: /workspace holds whatever the cold start uploaded, so a later
24
24
  // edit is invisible. Nothing can repair those bytes at read time, so we refuse
25
25
  // to read them instead of returning stale content. The control plane writes the
@@ -34,8 +34,8 @@ export const WORKSPACE = process.env.SPECTEST_WORKSPACE ?? "/workspace";
34
34
  export const APP_DIR = process.env.SPECTEST_APP_DIR ?? "/opt/spectest/app";
35
35
 
36
36
  /** Paths (repo-relative) the warm-template hash skipped because of
37
- * `spectest/.envignore`. Written by the control plane at env start; absent
38
- * when the project ships no `.envignore`. */
37
+ * `spectest/.specignore`. Written by the control plane at env start; absent
38
+ * when the project ships no `.specignore`. */
39
39
  const ENV_IGNORED_FILE = "/run/spectest-env-ignored.json";
40
40
 
41
41
  let _envIgnored: Set<string> | undefined;
@@ -46,7 +46,7 @@ function envIgnored(): Set<string> {
46
46
  const raw = JSON.parse(readFileSync(ENV_IGNORED_FILE, "utf8")) as { paths?: string[] };
47
47
  paths = raw.paths ?? [];
48
48
  } catch {
49
- /* No file (no .envignore, or an older env) — nothing to refuse. */
49
+ /* No file (no .specignore, or an older env) — nothing to refuse. */
50
50
  }
51
51
  _envIgnored = new Set(paths);
52
52
  return _envIgnored;
@@ -94,7 +94,7 @@ export function resolveProjectPath(p: string, opts: { record?: boolean } = {}):
94
94
  }
95
95
  if (envIgnored().has(rel)) {
96
96
  throw new Error(
97
- `project file "${p}" is excluded by spectest/.envignore, so the copy in the VM ` +
97
+ `project file "${p}" is excluded by the environment cache ignore rules, so the copy in the VM ` +
98
98
  `is whatever a cold start uploaded and can be out of date. Move it under ` +
99
99
  `spectest/tests/ (still cache-free, and always re-uploaded), or drop the pattern.`,
100
100
  );
package/src/recorder.ts CHANGED
@@ -520,6 +520,8 @@ export interface BrowserEvent extends BaseEvent {
520
520
  * bundle to look the session up in.
521
521
  */
522
522
  sessionName?: string;
523
+ /** Presentation kind; Electron and mobile share the browser event transport. */
524
+ frame?: "browser" | "mobile" | "desktop";
523
525
  /**
524
526
  * Wall-clock `Date.now()` captured at the moment this op *finished*.
525
527
  * Lives in the same time base as rrweb's `event.timestamp` fields,