@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.
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +102 -10
- package/dist/components/aws.d.ts +8 -7
- package/dist/components/aws.js +6 -0
- package/dist/components/electron-chrome.d.ts +1 -0
- package/dist/components/electron-chrome.js +76 -0
- package/dist/components/electron.d.ts +46 -0
- package/dist/components/electron.js +99 -0
- package/dist/components/emulate/service.js +3 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/microsoft.d.ts +2 -2
- package/dist/components/microsoft.js +5 -6
- package/dist/components/supabase-functions-reach.d.ts +18 -0
- package/dist/components/supabase-functions-reach.js +155 -0
- package/dist/components/supabase.js +33 -5
- package/dist/daemon.js +34 -2
- package/dist/desktop-recorder.d.ts +1 -0
- package/dist/desktop-recorder.js +30 -0
- package/dist/desktop.d.ts +42 -0
- package/dist/desktop.js +10 -0
- package/dist/harness/reach.d.ts +4 -0
- package/dist/harness/reach.js +2 -2
- package/dist/index.d.ts +27 -1
- package/dist/index.js +6 -1
- package/dist/project-files.js +6 -6
- package/dist/recorder.d.ts +2 -0
- package/package.json +1 -1
- package/src/browser.ts +106 -10
- package/src/components/aws.ts +6 -0
- package/src/components/electron-chrome.ts +76 -0
- package/src/components/electron.test.ts +38 -0
- package/src/components/electron.ts +115 -0
- package/src/components/emulate/entry.mjs +5 -7
- package/src/components/emulate/service.ts +3 -4
- package/src/components/index.ts +1 -0
- package/src/components/microsoft.ts +7 -8
- package/src/components/supabase-functions-reach.test.ts +90 -0
- package/src/components/supabase-functions-reach.ts +153 -0
- package/src/components/supabase.ts +33 -5
- package/src/daemon.ts +43 -6
- package/src/desktop-recorder.test.ts +55 -0
- package/src/desktop-recorder.ts +30 -0
- package/src/desktop.ts +43 -0
- package/src/harness/reach.test.ts +12 -0
- package/src/harness/reach.ts +6 -2
- package/src/index.ts +34 -1
- package/src/inputs.test.ts +20 -0
- package/src/project-files.ts +6 -6
- package/src/recorder.ts +2 -0
package/src/project-files.ts
CHANGED
|
@@ -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/.
|
|
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 `.
|
|
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/.
|
|
38
|
-
* when the project ships no `.
|
|
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 .
|
|
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
|
|
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,
|