screenright-client 0.9.4 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ import { Page } from '@playwright/test';
2
+ export declare const initializeScreenwright: () => Promise<void>;
3
+ export declare const finalize: () => Promise<void>;
4
+ export declare const capture: (page: Page, key: string, title: string, parentKey?: string) => Promise<void>;
package/dist/index.js CHANGED
@@ -86,16 +86,16 @@ export const capture = (page, key, title, parentKey) => __awaiter(void 0, void 0
86
86
  key,
87
87
  title,
88
88
  url: page.url(),
89
- childrens: [],
89
+ children: [],
90
90
  };
91
91
  if (parentKey) {
92
92
  const searchParent = (attributes) => {
93
93
  for (let i = 0; i < attributes.length; i++) {
94
94
  if (attributes[i].key === parentKey) {
95
- attributes[i].childrens.push(attribute);
95
+ attributes[i].children.push(attribute);
96
96
  break;
97
97
  }
98
- searchParent(attributes[i].childrens);
98
+ searchParent(attributes[i].children);
99
99
  }
100
100
  };
101
101
  searchParent(result.screenshotItemAttributes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screenright-client",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "description": "screenright's nodejs client library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/tsconfig.json CHANGED
@@ -6,7 +6,8 @@
6
6
  "forceConsistentCasingInFileNames": true,
7
7
  "strict": true,
8
8
  "skipLibCheck": true,
9
- "outDir": "./dist"
9
+ "outDir": "./dist",
10
+ "declaration": true
10
11
  },
11
12
  "ts-node": {
12
13
  "esm": true,