@memlab/e2e 1.0.40 → 1.0.41

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 (110) hide show
  1. package/dist/BaseSynthesizer.d.ts +1 -1
  2. package/dist/E2EInteractionManager.d.ts +2 -1
  3. package/dist/E2EInteractionManager.d.ts.map +1 -1
  4. package/dist/E2EInteractionManager.js +29 -15
  5. package/dist/NetworkManager.d.ts +1 -1
  6. package/dist/NetworkManager.js +4 -4
  7. package/dist/ScriptManager.d.ts +1 -1
  8. package/dist/ScriptManager.js +3 -3
  9. package/dist/TestRunnerLoader.d.ts +1 -1
  10. package/dist/TestRunnerLoader.js +1 -1
  11. package/dist/TypesThirdParty.d.ts +1 -1
  12. package/dist/TypesThirdParty.js +1 -1
  13. package/dist/__tests__/scope/lib.d.ts +1 -1
  14. package/dist/__tests__/scope/lib.js +2 -3
  15. package/dist/__tests__/scope/scope-analysis.test.d.ts +1 -1
  16. package/dist/__tests__/scope/scope-analysis.test.js +1 -1
  17. package/dist/code-analysis/Script.d.ts +1 -1
  18. package/dist/code-analysis/Script.js +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +3 -3
  21. package/dist/instrumentation/BaseAstTransform.d.ts +1 -1
  22. package/dist/instrumentation/BaseAstTransform.js +5 -5
  23. package/dist/instrumentation/ScriptRewriteManager.d.ts +1 -1
  24. package/dist/instrumentation/ScriptRewriteManager.js +3 -3
  25. package/dist/instrumentation/TransformLoader.d.ts +1 -1
  26. package/dist/instrumentation/TransformLoader.js +1 -1
  27. package/dist/instrumentation/transforms/InjectSourceInfoTranform.js +3 -3
  28. package/dist/instrumentation/transforms/InjectSourceInfoTransform.js +3 -3
  29. package/dist/lib/E2EUtils.d.ts +1 -1
  30. package/dist/lib/E2EUtils.js +9 -9
  31. package/dist/lib/SynthesisUtils.d.ts +1 -1
  32. package/dist/lib/SynthesisUtils.js +1 -1
  33. package/dist/lib/operations/BackOperation.d.ts +1 -1
  34. package/dist/lib/operations/BackOperation.js +1 -1
  35. package/dist/lib/operations/BackspaceOperation.d.ts +1 -1
  36. package/dist/lib/operations/BackspaceOperation.js +1 -1
  37. package/dist/lib/operations/BaseOperation.d.ts +1 -1
  38. package/dist/lib/operations/BaseOperation.js +5 -5
  39. package/dist/lib/operations/CachePageContent.d.ts +1 -1
  40. package/dist/lib/operations/CachePageContent.js +1 -1
  41. package/dist/lib/operations/ClickOperation.d.ts +1 -1
  42. package/dist/lib/operations/ClickOperation.js +1 -1
  43. package/dist/lib/operations/CompoundOperation.d.ts +1 -1
  44. package/dist/lib/operations/CompoundOperation.js +1 -1
  45. package/dist/lib/operations/EnterOperation.d.ts +1 -1
  46. package/dist/lib/operations/EnterOperation.js +1 -1
  47. package/dist/lib/operations/EscOperation.d.ts +1 -1
  48. package/dist/lib/operations/EscOperation.js +1 -1
  49. package/dist/lib/operations/HoverOperation.d.ts +1 -1
  50. package/dist/lib/operations/HoverOperation.js +1 -1
  51. package/dist/lib/operations/InteractionUtils.d.ts +1 -1
  52. package/dist/lib/operations/InteractionUtils.js +18 -18
  53. package/dist/lib/operations/Operations.d.ts +1 -1
  54. package/dist/lib/operations/Operations.js +1 -1
  55. package/dist/lib/operations/RevertOperation.d.ts +1 -1
  56. package/dist/lib/operations/RevertOperation.js +3 -3
  57. package/dist/lib/operations/RunJSCode.d.ts +1 -1
  58. package/dist/lib/operations/RunJSCode.js +1 -1
  59. package/dist/lib/operations/ScrollOperation.d.ts +1 -1
  60. package/dist/lib/operations/ScrollOperation.js +5 -5
  61. package/dist/lib/operations/TargetExtraOperation.d.ts +1 -1
  62. package/dist/lib/operations/TargetExtraOperation.js +1 -1
  63. package/dist/lib/operations/TestPlanner.d.ts +1 -1
  64. package/dist/lib/operations/TestPlanner.js +1 -1
  65. package/dist/lib/operations/TypeOperation.d.ts +1 -1
  66. package/dist/lib/operations/TypeOperation.js +1 -1
  67. package/dist/lib/operations/UploadOperation.d.ts +1 -1
  68. package/dist/lib/operations/UploadOperation.js +1 -1
  69. package/dist/lib/operations/WaitForElementOperation.d.ts +1 -1
  70. package/dist/lib/operations/WaitForElementOperation.js +1 -1
  71. package/dist/lib/operations/WaitOperation.d.ts +1 -1
  72. package/dist/lib/operations/WaitOperation.js +1 -1
  73. package/dist/lib/operations/WithCachedPageContent.d.ts +1 -1
  74. package/dist/lib/operations/WithCachedPageContent.js +1 -1
  75. package/dist/lib/operations/XVirtualFrameBuffer.d.ts +1 -1
  76. package/dist/lib/operations/XVirtualFrameBuffer.d.ts.map +1 -1
  77. package/dist/lib/operations/XVirtualFrameBuffer.js +1 -1
  78. package/dist/plugins/DefaultScenarioSynthesizer.d.ts +1 -1
  79. package/dist/plugins/DefaultScenarioSynthesizer.js +1 -1
  80. package/dist/plugins/TestSPAVisitSynthesizer.d.ts +1 -1
  81. package/dist/plugins/TestSPAVisitSynthesizer.js +1 -1
  82. package/dist/plugins/scenarios/test-airbnb.d.ts +1 -1
  83. package/dist/plugins/scenarios/test-airbnb.js +1 -1
  84. package/dist/plugins/scenarios/test-databricks.d.ts +1 -1
  85. package/dist/plugins/scenarios/test-databricks.js +1 -1
  86. package/dist/plugins/scenarios/test-ebay.d.ts +1 -1
  87. package/dist/plugins/scenarios/test-ebay.js +1 -1
  88. package/dist/plugins/scenarios/test-google-maps.d.ts +1 -1
  89. package/dist/plugins/scenarios/test-google-maps.js +1 -1
  90. package/dist/plugins/scenarios/test-shopify.d.ts +1 -1
  91. package/dist/plugins/scenarios/test-shopify.js +1 -1
  92. package/dist/plugins/scenarios/test-youtube.d.ts +1 -1
  93. package/dist/plugins/scenarios/test-youtube.js +1 -1
  94. package/package.json +5 -4
  95. package/static/example/components/layout.jsx +1 -1
  96. package/static/example/leak-filters/filter-by-retained-size.js +1 -1
  97. package/static/example/next.config.js +1 -1
  98. package/static/example/package.json +1 -1
  99. package/static/example/pages/_app.js +1 -1
  100. package/static/example/pages/_document.js +1 -1
  101. package/static/example/pages/examples/detached-dom.jsx +1 -1
  102. package/static/example/pages/examples/oversized-object.jsx +1 -1
  103. package/static/example/pages/index.js +1 -1
  104. package/static/example/scenarios/detached-dom.js +1 -1
  105. package/static/example/scenarios/oversized-leak-filter.js +1 -1
  106. package/static/example/scenarios/oversized-object-with-filter.js +1 -1
  107. package/static/example/scenarios/oversized-object.js +1 -1
  108. package/static/links/min.js +1 -1
  109. package/static/links/src/App.js +1 -1
  110. package/static/links/src/index.js +1 -1
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @format
8
8
  * @lightSyntaxTransform
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  import type { AnyOptions, Config, E2EOperation, E2EStepInfo, IE2EScenarioVisitPlan, E2ESynthesizerOptions, IScenario, IE2EStepBasic, IE2EScenarioSynthesizer, CheckPageLoadCallback, Nullable, PageSetupCallback } from '@memlab/core';
12
12
  declare class BaseSynthesizer implements IE2EScenarioSynthesizer {
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { Browser, CDPSession, Page, Target } from 'puppeteer';
11
11
  import type { AnyFunction, Nullable, OperationArgs, MemLabConfig } from '@memlab/core';
@@ -27,6 +27,7 @@ export default class E2EInteractionManager {
27
27
  selectCDPSession(predicate: (t: Target) => boolean): Promise<Nullable<CDPSession>>;
28
28
  clearCDPSession(): void;
29
29
  setEvalFuncAfterInitLoad(func: AnyFunction | null): void;
30
+ private enableLeakOutlineDisplay;
30
31
  protected initialLoad(page: Page, url: string, opArgs?: OperationArgs): Promise<void>;
31
32
  private beforeInteractions;
32
33
  visitAndGetSnapshots(options?: PageInteractOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"E2EInteractionManager.d.ts","sourceRoot":"","sources":["../src/E2EInteractionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,OAAO,EAAE,UAAU,E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;YAoBF,kBAAkB;IAgBnB,oBAAoB,CAC/B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC;IAgEH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;YA4C5B,SAAS;YAeT,iBAAiB;YAyEjB,gBAAgB;YAoBhB,iBAAiB;YAQjB,+BAA+B;IA0C7C,OAAO,CAAC,cAAc;YAeR,sBAAsB;YActB,MAAM;YAeN,iBAAiB;YAUjB,cAAc;CA4B7B"}
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -25,6 +25,7 @@ const fs_1 = __importDefault(require("fs"));
25
25
  const path_1 = __importDefault(require("path"));
26
26
  const E2EUtils_1 = __importDefault(require("./lib/E2EUtils"));
27
27
  const core_1 = require("@memlab/core");
28
+ const lens_1 = require("@memlab/lens");
28
29
  const InteractionUtils_1 = __importDefault(require("./lib/operations/InteractionUtils"));
29
30
  const TestPlanner_1 = __importDefault(require("./lib/operations/TestPlanner"));
30
31
  const NetworkManager_1 = __importDefault(require("./NetworkManager"));
@@ -84,8 +85,20 @@ class E2EInteractionManager {
84
85
  setEvalFuncAfterInitLoad(func) {
85
86
  this.evalFuncAfterInitLoad = func;
86
87
  }
87
- initialLoad(page, url, opArgs = {}) {
88
+ enableLeakOutlineDisplay() {
88
89
  return __awaiter(this, void 0, void 0, function* () {
90
+ if (core_1.config.displayLeakOutlines) {
91
+ core_1.info.lowLevel('Enabling leak outlines display...');
92
+ // import the code from memlens
93
+ const leakVisualizationScript = (0, lens_1.getBundleContent)();
94
+ yield this.page.evaluate((script) => {
95
+ eval(script);
96
+ }, leakVisualizationScript);
97
+ }
98
+ });
99
+ }
100
+ initialLoad(page_1, url_1) {
101
+ return __awaiter(this, arguments, void 0, function* (page, url, opArgs = {}) {
89
102
  if (core_1.config.verbose) {
90
103
  core_1.info.lowLevel(`loading: ${url}`);
91
104
  }
@@ -102,6 +115,7 @@ class E2EInteractionManager {
102
115
  yield page.evaluate(this.evalFuncAfterInitLoad);
103
116
  }
104
117
  yield InteractionUtils_1.default.waitUntilLoaded(page, opArgs);
118
+ yield this.enableLeakOutlineDisplay();
105
119
  });
106
120
  }
107
121
  beforeInteractions() {
@@ -120,9 +134,9 @@ class E2EInteractionManager {
120
134
  }
121
135
  });
122
136
  }
123
- visitAndGetSnapshots(options = {}) {
124
- var _a;
125
- return __awaiter(this, void 0, void 0, function* () {
137
+ visitAndGetSnapshots() {
138
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
139
+ var _a;
126
140
  const visitPlan = options.testPlanner
127
141
  ? options.testPlanner.getVisitPlan()
128
142
  : TestPlanner_1.default.getVisitPlan();
@@ -209,8 +223,8 @@ class E2EInteractionManager {
209
223
  }
210
224
  });
211
225
  }
212
- visitPage(url, options = {}) {
213
- return __awaiter(this, void 0, void 0, function* () {
226
+ visitPage(url_1) {
227
+ return __awaiter(this, arguments, void 0, function* (url, options = {}) {
214
228
  try {
215
229
  yield this.page.goto(url, {
216
230
  timeout: core_1.config.warmupPageLoadTimeout,
@@ -223,9 +237,9 @@ class E2EInteractionManager {
223
237
  }
224
238
  });
225
239
  }
226
- getPageStatistics(url, tabInfo, opArgs = {}) {
227
- var _a, _b;
228
- return __awaiter(this, void 0, void 0, function* () {
240
+ getPageStatistics(url_1, tabInfo_1) {
241
+ return __awaiter(this, arguments, void 0, function* (url, tabInfo, opArgs = {}) {
242
+ var _a, _b;
229
243
  if (core_1.config.verbose) {
230
244
  core_1.info.lowLevel('url: ' + url);
231
245
  }
@@ -279,8 +293,8 @@ class E2EInteractionManager {
279
293
  }
280
294
  });
281
295
  }
282
- interactWithPage(page, operations, opArgs = {}) {
283
- return __awaiter(this, void 0, void 0, function* () {
296
+ interactWithPage(page_1, operations_1) {
297
+ return __awaiter(this, arguments, void 0, function* (page, operations, opArgs = {}) {
284
298
  const args = Object.assign(Object.assign({}, opArgs), { pageHistoryLength: this.pageHistoryLength });
285
299
  if (typeof operations === 'function') {
286
300
  yield operations(page, args);
@@ -376,8 +390,8 @@ class E2EInteractionManager {
376
390
  yield this.forceMainThreadGC(6);
377
391
  });
378
392
  }
379
- forceMainThreadGC(repeat = 1) {
380
- return __awaiter(this, void 0, void 0, function* () {
393
+ forceMainThreadGC() {
394
+ return __awaiter(this, arguments, void 0, function* (repeat = 1) {
381
395
  const client = yield this.getMainThreadCDPSession();
382
396
  for (let i = 0; i < repeat; i++) {
383
397
  yield client.send('HeapProfiler.collectGarbage');
@@ -388,8 +402,8 @@ class E2EInteractionManager {
388
402
  });
389
403
  }
390
404
  collectMetrics(tabInfo) {
391
- var _a;
392
405
  return __awaiter(this, void 0, void 0, function* () {
406
+ var _a;
393
407
  // collect navigation history info
394
408
  const historyLength = yield getNavigationHistoryLength(this.page);
395
409
  this.pageHistoryLength.push(historyLength);
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { CDPSession, Page } from 'puppeteer';
11
11
  export default class NetworkManager {
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -72,15 +72,15 @@ class NetworkManager {
72
72
  })),
73
73
  ],
74
74
  });
75
- session.on('Network.requestIntercepted', ({ interceptionId, request, responseHeaders, resourceType }) => __awaiter(this, void 0, void 0, function* () {
76
- var _a;
75
+ session.on('Network.requestIntercepted', (_a) => __awaiter(this, [_a], void 0, function* ({ interceptionId, request, responseHeaders, resourceType }) {
76
+ var _b;
77
77
  this.networkLog(`Intercepted ${request.url} {interception id: ${interceptionId}}`);
78
78
  const response = (yield session.send('Network.getResponseBodyForInterception', { interceptionId }));
79
79
  // responseHeaders could be null if requesting from
80
80
  // local files (i.e., urls starting with 'file:///')
81
81
  let contentType = null;
82
82
  if (responseHeaders) {
83
- const contentTypeHeader = (_a = Object.keys(responseHeaders).find(k => k.toLowerCase() === 'content-type')) !== null && _a !== void 0 ? _a : '';
83
+ const contentTypeHeader = (_b = Object.keys(responseHeaders).find(k => k.toLowerCase() === 'content-type')) !== null && _b !== void 0 ? _b : '';
84
84
  contentType = responseHeaders[contentTypeHeader];
85
85
  }
86
86
  let newBody = '';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { Nullable } from '@memlab/core';
11
11
  import type { RewriteScriptOption } from './instrumentation/ScriptRewriteManager';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -87,8 +87,8 @@ class ScriptManager {
87
87
  }
88
88
  return null;
89
89
  }
90
- rewriteScript(code, options = {}) {
91
- return __awaiter(this, void 0, void 0, function* () {
90
+ rewriteScript(code_1) {
91
+ return __awaiter(this, arguments, void 0, function* (code, options = {}) {
92
92
  if (!core_1.config.instrumentJS) {
93
93
  return code;
94
94
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { E2EScenarioSynthesizerConstructor } from '@memlab/core';
11
11
  declare class TestRunnerLoader {
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  declare module 'xvfb' {
11
11
  interface XvfbParams {
@@ -6,5 +6,5 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { AnyValue } from '@memlab/core';
11
11
  export declare function testScopeAnalysis(code: string, expectedScope: AnyValue): void;
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.removeLoc = exports.testScopeAnalysis = void 0;
6
+ exports.testScopeAnalysis = testScopeAnalysis;
7
+ exports.removeLoc = removeLoc;
7
8
  const Script_1 = __importDefault(require("../../code-analysis/Script"));
8
9
  function testScopeAnalysis(code, expectedScope) {
9
10
  const script = new Script_1.default(code);
10
11
  const scope = script.getClosureScopeTree();
11
12
  expect(removeLoc(scope)).toEqual(removeLoc(expectedScope));
12
13
  }
13
- exports.testScopeAnalysis = testScopeAnalysis;
14
14
  function removeLoc(entity) {
15
15
  const visited = new Set();
16
16
  function remove(e) {
@@ -30,4 +30,3 @@ function removeLoc(entity) {
30
30
  remove(entity);
31
31
  return entity;
32
32
  }
33
- exports.removeLoc = removeLoc;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  export {};
11
11
  //# sourceMappingURL=scope-analysis.test.d.ts.map
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { Optional } from '@memlab/core';
11
11
  import type { SourceLocation } from '@babel/types';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  /** @internal */
11
11
  export declare function registerPackage(): Promise<void>;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -35,7 +35,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.ScriptManager = exports.E2EUtils = exports.BaseSynthesizer = exports.E2EInteractionManager = exports.Xvfb = exports.defaultTestPlanner = exports.registerPackage = void 0;
38
+ exports.ScriptManager = exports.E2EUtils = exports.BaseSynthesizer = exports.E2EInteractionManager = exports.Xvfb = exports.defaultTestPlanner = void 0;
39
+ exports.registerPackage = registerPackage;
39
40
  const path_1 = __importDefault(require("path"));
40
41
  const core_1 = require("@memlab/core");
41
42
  /** @internal */
@@ -44,7 +45,6 @@ function registerPackage() {
44
45
  return core_1.PackageInfoLoader.registerPackage(path_1.default.join(__dirname, '..'));
45
46
  });
46
47
  }
47
- exports.registerPackage = registerPackage;
48
48
  var TestPlanner_1 = require("./lib/operations/TestPlanner");
49
49
  Object.defineProperty(exports, "defaultTestPlanner", { enumerable: true, get: function () { return __importDefault(TestPlanner_1).default; } });
50
50
  __exportStar(require("./lib/operations/TestPlanner"), exports);
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { ParseResult } from '@babel/core';
11
11
  import type { RewriteScriptOption } from './ScriptRewriteManager';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -20,10 +20,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  const core_1 = require("@memlab/core");
22
22
  class BaseAstTransform {
23
- transform(ast,
24
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
25
- options = {}) {
26
- return __awaiter(this, void 0, void 0, function* () {
23
+ transform(ast_1) {
24
+ return __awaiter(this, arguments, void 0, function* (ast,
25
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
+ options = {}) {
27
27
  throw core_1.utils.haltOrThrow('BaseAstTransform.transform is not implemented');
28
28
  });
29
29
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  export type RewriteScriptOption = {
11
11
  url?: string;
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -25,8 +25,8 @@ const parser_1 = require("@babel/parser");
25
25
  const generator_1 = __importDefault(require("@babel/generator"));
26
26
  const TransformLoader_1 = __importDefault(require("./TransformLoader"));
27
27
  class ScriptRewriteManager {
28
- rewriteScript(code, options = {}) {
29
- return __awaiter(this, void 0, void 0, function* () {
28
+ rewriteScript(code_1) {
29
+ return __awaiter(this, arguments, void 0, function* (code, options = {}) {
30
30
  // parse code
31
31
  const ast = (0, parser_1.parse)(code, {
32
32
  sourceType: 'script',
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type BaseAstTransform from './BaseAstTransform';
11
11
  export default class TransformLoader {
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -16,9 +16,9 @@ const traverse_1 = __importDefault(require("@babel/traverse"));
16
16
  const template_1 = __importDefault(require("@babel/template"));
17
17
  const BaseAstTransform_1 = __importDefault(require("../BaseAstTransform"));
18
18
  class InjectSourceInfoTranform extends BaseAstTransform_1.default {
19
- transform(ast, options = {}) {
20
- var _a;
21
- return __awaiter(this, void 0, void 0, function* () {
19
+ transform(ast_1) {
20
+ return __awaiter(this, arguments, void 0, function* (ast, options = {}) {
21
+ var _a;
22
22
  const url = (_a = options.url) !== null && _a !== void 0 ? _a : '';
23
23
  const instrumentFunction = function (path) {
24
24
  var _a, _b;
@@ -16,9 +16,9 @@ const traverse_1 = __importDefault(require("@babel/traverse"));
16
16
  const template_1 = __importDefault(require("@babel/template"));
17
17
  const BaseAstTransform_1 = __importDefault(require("../BaseAstTransform"));
18
18
  class InjectSourceInfoTransform extends BaseAstTransform_1.default {
19
- transform(ast, options = {}) {
20
- var _a;
21
- return __awaiter(this, void 0, void 0, function* () {
19
+ transform(ast_1) {
20
+ return __awaiter(this, arguments, void 0, function* (ast, options = {}) {
21
+ var _a;
22
22
  const url = (_a = options.url) !== null && _a !== void 0 ? _a : '';
23
23
  const instrumentFunction = function (path) {
24
24
  var _a, _b;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import { AnyOptions, AnyValue, E2EOperation, E2EStepInfo, IE2EScenarioVisitPlan, IScenario, Nullable, OperationArgs } from '@memlab/core';
11
11
  import type { CDPSession, Page } from 'puppeteer';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -134,12 +134,12 @@ function maybeWaitForConsoleInput(stepId) {
134
134
  }
135
135
  });
136
136
  }
137
- function applyAsyncWithGuard(f, self, args,
138
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
139
- exceptionHandler = (_ex) => {
140
- /*noop*/
141
- }) {
142
- return __awaiter(this, void 0, void 0, function* () {
137
+ function applyAsyncWithGuard(f_1, self_1, args_1) {
138
+ return __awaiter(this, arguments, void 0, function* (f, self, args,
139
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
140
+ exceptionHandler = (_ex) => {
141
+ /*noop*/
142
+ }) {
143
143
  let ret;
144
144
  try {
145
145
  ret = yield f.apply(self, args);
@@ -150,8 +150,8 @@ exceptionHandler = (_ex) => {
150
150
  return ret;
151
151
  });
152
152
  }
153
- function applyAsyncWithRetry(f, self, args, options = {}) {
154
- return __awaiter(this, void 0, void 0, function* () {
153
+ function applyAsyncWithRetry(f_1, self_1, args_1) {
154
+ return __awaiter(this, arguments, void 0, function* (f, self, args, options = {}) {
155
155
  options.retry = options.retry || 0;
156
156
  const retry = options.retry;
157
157
  const exceptionHandler = (ex) => __awaiter(this, void 0, void 0, function* () {
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import BackOperation from './operations/BackOperation';
11
11
  import RevertOperation from './operations/RevertOperation';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import BaseOperation from './BaseOperation';
11
11
  import type { Page } from 'puppeteer';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import BaseOperation from './BaseOperation';
11
11
  import type { Page } from 'puppeteer';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall web_perf_infra
8
+ * @oncall memory_lab
9
9
  */
10
10
  import type { Page } from 'puppeteer';
11
11
  import type { E2EOperation, OperationArgs } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall web_perf_infra
9
+ * @oncall memory_lab
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -38,8 +38,8 @@ class BaseOperation {
38
38
  core_1.info.overwrite(msg);
39
39
  }
40
40
  }
41
- do(page, opArgs = {}) {
42
- return __awaiter(this, void 0, void 0, function* () {
41
+ do(page_1) {
42
+ return __awaiter(this, arguments, void 0, function* (page, opArgs = {}) {
43
43
  if (core_1.config.verbose && core_1.config.runningMode.shouldTakeScreenShot()) {
44
44
  yield InteractionUtils_1.default.screenshot(page, `${++opId}-${this.kind}`);
45
45
  }
@@ -56,8 +56,8 @@ class BaseOperation {
56
56
  });
57
57
  }
58
58
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
59
- act(_page, _opArgs = {}) {
60
- return __awaiter(this, void 0, void 0, function* () {
59
+ act(_page_1) {
60
+ return __awaiter(this, arguments, void 0, function* (_page, _opArgs = {}) {
61
61
  const error = new Error('BaseOperation.act can not be called.');
62
62
  error.stack;
63
63
  throw error;