playwright-checkpoint 0.1.0-beta.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.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +665 -0
  3. package/dist/chunk-DGUM43GV.js +11 -0
  4. package/dist/chunk-DGUM43GV.js.map +1 -0
  5. package/dist/chunk-F5A6XGLJ.js +104 -0
  6. package/dist/chunk-F5A6XGLJ.js.map +1 -0
  7. package/dist/chunk-K5DX32TO.js +214 -0
  8. package/dist/chunk-K5DX32TO.js.map +1 -0
  9. package/dist/chunk-KG37WSYS.js +1549 -0
  10. package/dist/chunk-KG37WSYS.js.map +1 -0
  11. package/dist/chunk-X5IPL32H.js +1484 -0
  12. package/dist/chunk-X5IPL32H.js.map +1 -0
  13. package/dist/cli/bin.cjs +3972 -0
  14. package/dist/cli/bin.cjs.map +1 -0
  15. package/dist/cli/bin.d.cts +1 -0
  16. package/dist/cli/bin.d.ts +1 -0
  17. package/dist/cli/bin.js +43 -0
  18. package/dist/cli/bin.js.map +1 -0
  19. package/dist/cli/index.cjs +1672 -0
  20. package/dist/cli/index.cjs.map +1 -0
  21. package/dist/cli/index.d.cts +31 -0
  22. package/dist/cli/index.d.ts +31 -0
  23. package/dist/cli/index.js +17 -0
  24. package/dist/cli/index.js.map +1 -0
  25. package/dist/cli/mcp-args.cjs +129 -0
  26. package/dist/cli/mcp-args.cjs.map +1 -0
  27. package/dist/cli/mcp-args.d.cts +32 -0
  28. package/dist/cli/mcp-args.d.ts +32 -0
  29. package/dist/cli/mcp-args.js +10 -0
  30. package/dist/cli/mcp-args.js.map +1 -0
  31. package/dist/components.cjs +53 -0
  32. package/dist/components.cjs.map +1 -0
  33. package/dist/components.d.cts +27 -0
  34. package/dist/components.d.ts +27 -0
  35. package/dist/components.js +26 -0
  36. package/dist/components.js.map +1 -0
  37. package/dist/core-CD4jHGgI.d.cts +51 -0
  38. package/dist/core-CZvnc0rE.d.ts +51 -0
  39. package/dist/core.cjs +1576 -0
  40. package/dist/core.cjs.map +1 -0
  41. package/dist/core.d.cts +3 -0
  42. package/dist/core.d.ts +3 -0
  43. package/dist/core.js +32 -0
  44. package/dist/core.js.map +1 -0
  45. package/dist/index-BjYQX_hK.d.ts +8 -0
  46. package/dist/index-Cabk31qi.d.cts +8 -0
  47. package/dist/index.cjs +3318 -0
  48. package/dist/index.cjs.map +1 -0
  49. package/dist/index.d.cts +94 -0
  50. package/dist/index.d.ts +94 -0
  51. package/dist/index.js +285 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/mcp/index.cjs +3467 -0
  54. package/dist/mcp/index.cjs.map +1 -0
  55. package/dist/mcp/index.d.cts +26 -0
  56. package/dist/mcp/index.d.ts +26 -0
  57. package/dist/mcp/index.js +586 -0
  58. package/dist/mcp/index.js.map +1 -0
  59. package/dist/teardown.cjs +1509 -0
  60. package/dist/teardown.cjs.map +1 -0
  61. package/dist/teardown.d.cts +5 -0
  62. package/dist/teardown.d.ts +5 -0
  63. package/dist/teardown.js +52 -0
  64. package/dist/teardown.js.map +1 -0
  65. package/dist/types-G7w4n8kR.d.cts +359 -0
  66. package/dist/types-G7w4n8kR.d.ts +359 -0
  67. package/package.json +109 -0
@@ -0,0 +1,27 @@
1
+ type ScreenshotProps = {
2
+ src: string;
3
+ alt?: string;
4
+ caption?: string;
5
+ };
6
+ type StepListProps = {
7
+ children?: unknown;
8
+ };
9
+ type StepProps = {
10
+ number: number;
11
+ title: string;
12
+ children?: unknown;
13
+ };
14
+ type DeviceTabsProps = {
15
+ children?: unknown;
16
+ };
17
+ type DeviceTabProps = {
18
+ label: string;
19
+ children?: unknown;
20
+ };
21
+ declare function Screenshot(_props: ScreenshotProps): null;
22
+ declare function StepList(_props: StepListProps): null;
23
+ declare function Step(_props: StepProps): null;
24
+ declare function DeviceTabs(_props: DeviceTabsProps): null;
25
+ declare function DeviceTab(_props: DeviceTabProps): null;
26
+
27
+ export { DeviceTab, type DeviceTabProps, DeviceTabs, type DeviceTabsProps, Screenshot, type ScreenshotProps, Step, StepList, type StepListProps, type StepProps };
@@ -0,0 +1,27 @@
1
+ type ScreenshotProps = {
2
+ src: string;
3
+ alt?: string;
4
+ caption?: string;
5
+ };
6
+ type StepListProps = {
7
+ children?: unknown;
8
+ };
9
+ type StepProps = {
10
+ number: number;
11
+ title: string;
12
+ children?: unknown;
13
+ };
14
+ type DeviceTabsProps = {
15
+ children?: unknown;
16
+ };
17
+ type DeviceTabProps = {
18
+ label: string;
19
+ children?: unknown;
20
+ };
21
+ declare function Screenshot(_props: ScreenshotProps): null;
22
+ declare function StepList(_props: StepListProps): null;
23
+ declare function Step(_props: StepProps): null;
24
+ declare function DeviceTabs(_props: DeviceTabsProps): null;
25
+ declare function DeviceTab(_props: DeviceTabProps): null;
26
+
27
+ export { DeviceTab, type DeviceTabProps, DeviceTabs, type DeviceTabsProps, Screenshot, type ScreenshotProps, Step, StepList, type StepListProps, type StepProps };
@@ -0,0 +1,26 @@
1
+ import "./chunk-DGUM43GV.js";
2
+
3
+ // src/components.ts
4
+ function Screenshot(_props) {
5
+ return null;
6
+ }
7
+ function StepList(_props) {
8
+ return null;
9
+ }
10
+ function Step(_props) {
11
+ return null;
12
+ }
13
+ function DeviceTabs(_props) {
14
+ return null;
15
+ }
16
+ function DeviceTab(_props) {
17
+ return null;
18
+ }
19
+ export {
20
+ DeviceTab,
21
+ DeviceTabs,
22
+ Screenshot,
23
+ Step,
24
+ StepList
25
+ };
26
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components.ts"],"sourcesContent":["export type ScreenshotProps = {\n src: string;\n alt?: string;\n caption?: string;\n};\n\nexport type StepListProps = {\n children?: unknown;\n};\n\nexport type StepProps = {\n number: number;\n title: string;\n children?: unknown;\n};\n\nexport type DeviceTabsProps = {\n children?: unknown;\n};\n\nexport type DeviceTabProps = {\n label: string;\n children?: unknown;\n};\n\nexport function Screenshot(_props: ScreenshotProps): null {\n return null;\n}\n\nexport function StepList(_props: StepListProps): null {\n return null;\n}\n\nexport function Step(_props: StepProps): null {\n return null;\n}\n\nexport function DeviceTabs(_props: DeviceTabsProps): null {\n return null;\n}\n\nexport function DeviceTab(_props: DeviceTabProps): null {\n return null;\n}\n"],"mappings":";;;AAyBO,SAAS,WAAW,QAA+B;AACxD,SAAO;AACT;AAEO,SAAS,SAAS,QAA6B;AACpD,SAAO;AACT;AAEO,SAAS,KAAK,QAAyB;AAC5C,SAAO;AACT;AAEO,SAAS,WAAW,QAA+B;AACxD,SAAO;AACT;AAEO,SAAS,UAAU,QAA8B;AACtD,SAAO;AACT;","names":[]}
@@ -0,0 +1,51 @@
1
+ import { Page, TestInfo } from '@playwright/test';
2
+ import { c as CheckpointCollector, C as CheckpointConfig, d as CollectorConfig, e as CheckpointManifest, f as CheckpointOptions, g as CheckpointRecord, h as ResolvedCollectorConfig, T as TestCheckpointConfig } from './types-G7w4n8kR.cjs';
3
+
4
+ declare function registerBuiltinCollector(collector: CheckpointCollector): void;
5
+ declare function registerBuiltinCollectors(collectors: CheckpointCollector[]): void;
6
+ declare function getBuiltinCollectors(): Map<string, CheckpointCollector>;
7
+
8
+ declare function settlePage(page: Page): Promise<void>;
9
+
10
+ type CheckpointSessionMetadata = Partial<Pick<CheckpointManifest, 'environment' | 'project' | 'testId' | 'title' | 'tags'>>;
11
+ type CheckpointSessionOptions = Omit<CheckpointConfig, 'collectors'> & {
12
+ outputDir: string;
13
+ collectors?: Partial<Record<string, boolean | CollectorConfig>>;
14
+ sessionMetadata?: CheckpointSessionMetadata;
15
+ manifest?: CheckpointManifest;
16
+ manifestPath?: string;
17
+ testInfo?: TestInfo;
18
+ adjustTimeout?: (ms: number) => void;
19
+ };
20
+ type CaptureCheckpointOptions = CheckpointSessionOptions & CheckpointOptions;
21
+ type CheckpointSession = {
22
+ outputDir: string;
23
+ manifest: CheckpointManifest;
24
+ checkpoint(name: string, options?: CheckpointOptions): Promise<CheckpointRecord>;
25
+ finalize(): Promise<CheckpointManifest>;
26
+ };
27
+ type RunCollectorPipelineArgs = {
28
+ page: Page;
29
+ name: string;
30
+ outputDir: string;
31
+ resolvedCollectors: Map<string, ResolvedCollectorConfig>;
32
+ registry: Map<string, CheckpointCollector>;
33
+ options?: CheckpointOptions;
34
+ manifest?: CheckpointManifest;
35
+ slug?: string;
36
+ redact?: string[];
37
+ testInfo?: TestInfo;
38
+ adjustTimeout?: (ms: number) => void;
39
+ };
40
+ declare function warn(message: string, error?: unknown): void;
41
+ declare function sanitizeSegment(value: string): string;
42
+ declare function checkpointSlug(name: string, existing: CheckpointRecord[]): string;
43
+ declare function collectPageTitle(page: Page): Promise<string>;
44
+ declare function runCollectorSetup(collectors: Iterable<CheckpointCollector>, page: Page, testInfo?: TestInfo): Promise<void>;
45
+ declare function runCollectorTeardown(collectors: Iterable<CheckpointCollector>, page: Page, testInfo?: TestInfo): Promise<void>;
46
+ declare function resolveCollectors(globalConfig?: CheckpointConfig, testConfig?: TestCheckpointConfig | null, checkpointOptions?: CheckpointOptions): Map<string, ResolvedCollectorConfig>;
47
+ declare function runCollectorPipeline(args: RunCollectorPipelineArgs): Promise<CheckpointRecord>;
48
+ declare function captureCheckpoint(page: Page, name: string, options: CaptureCheckpointOptions): Promise<CheckpointRecord>;
49
+ declare function createCheckpointSession(page: Page, options: CheckpointSessionOptions): Promise<CheckpointSession>;
50
+
51
+ export { type CaptureCheckpointOptions as C, type RunCollectorPipelineArgs as R, type CheckpointSession as a, type CheckpointSessionMetadata as b, type CheckpointSessionOptions as c, captureCheckpoint as d, checkpointSlug as e, collectPageTitle as f, createCheckpointSession as g, getBuiltinCollectors as h, registerBuiltinCollectors as i, resolveCollectors as j, runCollectorPipeline as k, runCollectorSetup as l, runCollectorTeardown as m, settlePage as n, registerBuiltinCollector as r, sanitizeSegment as s, warn as w };
@@ -0,0 +1,51 @@
1
+ import { Page, TestInfo } from '@playwright/test';
2
+ import { c as CheckpointCollector, C as CheckpointConfig, d as CollectorConfig, e as CheckpointManifest, f as CheckpointOptions, g as CheckpointRecord, h as ResolvedCollectorConfig, T as TestCheckpointConfig } from './types-G7w4n8kR.js';
3
+
4
+ declare function registerBuiltinCollector(collector: CheckpointCollector): void;
5
+ declare function registerBuiltinCollectors(collectors: CheckpointCollector[]): void;
6
+ declare function getBuiltinCollectors(): Map<string, CheckpointCollector>;
7
+
8
+ declare function settlePage(page: Page): Promise<void>;
9
+
10
+ type CheckpointSessionMetadata = Partial<Pick<CheckpointManifest, 'environment' | 'project' | 'testId' | 'title' | 'tags'>>;
11
+ type CheckpointSessionOptions = Omit<CheckpointConfig, 'collectors'> & {
12
+ outputDir: string;
13
+ collectors?: Partial<Record<string, boolean | CollectorConfig>>;
14
+ sessionMetadata?: CheckpointSessionMetadata;
15
+ manifest?: CheckpointManifest;
16
+ manifestPath?: string;
17
+ testInfo?: TestInfo;
18
+ adjustTimeout?: (ms: number) => void;
19
+ };
20
+ type CaptureCheckpointOptions = CheckpointSessionOptions & CheckpointOptions;
21
+ type CheckpointSession = {
22
+ outputDir: string;
23
+ manifest: CheckpointManifest;
24
+ checkpoint(name: string, options?: CheckpointOptions): Promise<CheckpointRecord>;
25
+ finalize(): Promise<CheckpointManifest>;
26
+ };
27
+ type RunCollectorPipelineArgs = {
28
+ page: Page;
29
+ name: string;
30
+ outputDir: string;
31
+ resolvedCollectors: Map<string, ResolvedCollectorConfig>;
32
+ registry: Map<string, CheckpointCollector>;
33
+ options?: CheckpointOptions;
34
+ manifest?: CheckpointManifest;
35
+ slug?: string;
36
+ redact?: string[];
37
+ testInfo?: TestInfo;
38
+ adjustTimeout?: (ms: number) => void;
39
+ };
40
+ declare function warn(message: string, error?: unknown): void;
41
+ declare function sanitizeSegment(value: string): string;
42
+ declare function checkpointSlug(name: string, existing: CheckpointRecord[]): string;
43
+ declare function collectPageTitle(page: Page): Promise<string>;
44
+ declare function runCollectorSetup(collectors: Iterable<CheckpointCollector>, page: Page, testInfo?: TestInfo): Promise<void>;
45
+ declare function runCollectorTeardown(collectors: Iterable<CheckpointCollector>, page: Page, testInfo?: TestInfo): Promise<void>;
46
+ declare function resolveCollectors(globalConfig?: CheckpointConfig, testConfig?: TestCheckpointConfig | null, checkpointOptions?: CheckpointOptions): Map<string, ResolvedCollectorConfig>;
47
+ declare function runCollectorPipeline(args: RunCollectorPipelineArgs): Promise<CheckpointRecord>;
48
+ declare function captureCheckpoint(page: Page, name: string, options: CaptureCheckpointOptions): Promise<CheckpointRecord>;
49
+ declare function createCheckpointSession(page: Page, options: CheckpointSessionOptions): Promise<CheckpointSession>;
50
+
51
+ export { type CaptureCheckpointOptions as C, type RunCollectorPipelineArgs as R, type CheckpointSession as a, type CheckpointSessionMetadata as b, type CheckpointSessionOptions as c, captureCheckpoint as d, checkpointSlug as e, collectPageTitle as f, createCheckpointSession as g, getBuiltinCollectors as h, registerBuiltinCollectors as i, resolveCollectors as j, runCollectorPipeline as k, runCollectorSetup as l, runCollectorTeardown as m, settlePage as n, registerBuiltinCollector as r, sanitizeSegment as s, warn as w };