@azure/playwright 1.1.2 → 1.1.3-alpha.20260310.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 (168) hide show
  1. package/dist/browser/common/types.d.ts +1 -1
  2. package/dist/browser/common/types.d.ts.map +1 -1
  3. package/dist/browser/common/types.js.map +1 -1
  4. package/dist/browser/index.d.ts +1 -1
  5. package/dist/browser/index.d.ts.map +1 -1
  6. package/dist/browser/index.js.map +1 -1
  7. package/dist/browser/utils/PlaywrightServiceClient.d.ts +1 -1
  8. package/dist/browser/utils/PlaywrightServiceClient.d.ts.map +1 -1
  9. package/dist/browser/utils/PlaywrightServiceClient.js.map +1 -1
  10. package/dist/browser/utils/playwrightReporterStorageManager.d.ts.map +1 -1
  11. package/dist/browser/utils/playwrightReporterStorageManager.js.map +1 -1
  12. package/dist/browser/utils/utils.d.ts +2 -2
  13. package/dist/browser/utils/utils.d.ts.map +1 -1
  14. package/dist/browser/utils/utils.js.map +1 -1
  15. package/dist/commonjs/common/constants.js +127 -95
  16. package/dist/commonjs/common/constants.js.map +7 -1
  17. package/dist/commonjs/common/customerConfig.js +31 -14
  18. package/dist/commonjs/common/customerConfig.js.map +7 -1
  19. package/dist/commonjs/common/entraIdAccessToken.js +106 -83
  20. package/dist/commonjs/common/entraIdAccessToken.js.map +7 -1
  21. package/dist/commonjs/common/environmentVariables.js +43 -24
  22. package/dist/commonjs/common/environmentVariables.js.map +7 -1
  23. package/dist/commonjs/common/executor.js +88 -67
  24. package/dist/commonjs/common/executor.js.map +7 -1
  25. package/dist/commonjs/common/httpService.js +54 -35
  26. package/dist/commonjs/common/httpService.js.map +7 -1
  27. package/dist/commonjs/common/logger.js +28 -8
  28. package/dist/commonjs/common/logger.js.map +7 -1
  29. package/dist/commonjs/common/messages.js +189 -169
  30. package/dist/commonjs/common/messages.js.map +7 -1
  31. package/dist/commonjs/common/playwrightServiceConfig.js +113 -98
  32. package/dist/commonjs/common/playwrightServiceConfig.js.map +7 -1
  33. package/dist/commonjs/common/state.js +30 -10
  34. package/dist/commonjs/common/state.js.map +7 -1
  35. package/dist/commonjs/common/types.d.ts +1 -1
  36. package/dist/commonjs/common/types.d.ts.map +1 -1
  37. package/dist/commonjs/common/types.js +15 -5
  38. package/dist/commonjs/common/types.js.map +7 -1
  39. package/dist/commonjs/core/global/playwright-service-global-setup.js +52 -26
  40. package/dist/commonjs/core/global/playwright-service-global-setup.js.map +7 -1
  41. package/dist/commonjs/core/global/playwright-service-global-teardown.js +49 -20
  42. package/dist/commonjs/core/global/playwright-service-global-teardown.js.map +7 -1
  43. package/dist/commonjs/core/initializePlaywrightServiceTestRun.js +39 -27
  44. package/dist/commonjs/core/initializePlaywrightServiceTestRun.js.map +7 -1
  45. package/dist/commonjs/core/playwrightService.js +166 -205
  46. package/dist/commonjs/core/playwrightService.js.map +7 -1
  47. package/dist/commonjs/core/playwrightServiceEntra.js +67 -48
  48. package/dist/commonjs/core/playwrightServiceEntra.js.map +7 -1
  49. package/dist/commonjs/core/playwrightServiceUtils.d.ts +1 -1
  50. package/dist/commonjs/core/playwrightServiceUtils.d.ts.map +1 -0
  51. package/dist/commonjs/core/playwrightServiceUtils.js +44 -11
  52. package/dist/commonjs/core/playwrightServiceUtils.js.map +7 -0
  53. package/dist/commonjs/index.d.ts +1 -1
  54. package/dist/commonjs/index.d.ts.map +1 -1
  55. package/dist/commonjs/index.js +36 -18
  56. package/dist/commonjs/index.js.map +7 -1
  57. package/dist/commonjs/reporter/index.js +34 -15
  58. package/dist/commonjs/reporter/index.js.map +7 -1
  59. package/dist/commonjs/reporter/playwrightReporter.js +222 -216
  60. package/dist/commonjs/reporter/playwrightReporter.js.map +7 -1
  61. package/dist/commonjs/tsdoc-metadata.json +1 -1
  62. package/dist/commonjs/utils/PlaywrightServiceClient.d.ts +1 -1
  63. package/dist/commonjs/utils/PlaywrightServiceClient.d.ts.map +1 -1
  64. package/dist/commonjs/utils/PlaywrightServiceClient.js +140 -91
  65. package/dist/commonjs/utils/PlaywrightServiceClient.js.map +7 -1
  66. package/dist/commonjs/utils/cIInfoProvider.js +81 -74
  67. package/dist/commonjs/utils/cIInfoProvider.js.map +7 -1
  68. package/dist/commonjs/utils/getPackageVersion.d.ts +1 -1
  69. package/dist/commonjs/utils/getPackageVersion.d.ts.map +1 -0
  70. package/dist/commonjs/utils/getPackageVersion.js +50 -19
  71. package/dist/commonjs/utils/getPackageVersion.js.map +7 -0
  72. package/dist/commonjs/utils/getPlaywrightVersion.js +42 -21
  73. package/dist/commonjs/utils/getPlaywrightVersion.js.map +7 -1
  74. package/dist/commonjs/utils/packageManager.js +59 -40
  75. package/dist/commonjs/utils/packageManager.js.map +7 -1
  76. package/dist/commonjs/utils/parseJwt.js +37 -17
  77. package/dist/commonjs/utils/parseJwt.js.map +7 -1
  78. package/dist/commonjs/utils/playwrightReporterStorageManager.d.ts.map +1 -1
  79. package/dist/commonjs/utils/playwrightReporterStorageManager.js +381 -342
  80. package/dist/commonjs/utils/playwrightReporterStorageManager.js.map +7 -1
  81. package/dist/commonjs/utils/utils.d.ts +2 -2
  82. package/dist/commonjs/utils/utils.d.ts.map +1 -1
  83. package/dist/commonjs/utils/utils.js +417 -369
  84. package/dist/commonjs/utils/utils.js.map +7 -1
  85. package/dist/esm/common/constants.js +92 -92
  86. package/dist/esm/common/constants.js.map +7 -1
  87. package/dist/esm/common/customerConfig.js +11 -11
  88. package/dist/esm/common/customerConfig.js.map +7 -1
  89. package/dist/esm/common/entraIdAccessToken.js +85 -77
  90. package/dist/esm/common/entraIdAccessToken.js.map +7 -1
  91. package/dist/esm/common/environmentVariables.js +19 -19
  92. package/dist/esm/common/environmentVariables.js.map +7 -1
  93. package/dist/esm/common/executor.js +51 -58
  94. package/dist/esm/common/executor.js.map +7 -1
  95. package/dist/esm/common/httpService.js +34 -29
  96. package/dist/esm/common/httpService.js.map +7 -1
  97. package/dist/esm/common/logger.js +4 -4
  98. package/dist/esm/common/logger.js.map +7 -1
  99. package/dist/esm/common/messages.js +166 -166
  100. package/dist/esm/common/messages.js.map +7 -1
  101. package/dist/esm/common/playwrightServiceConfig.js +91 -91
  102. package/dist/esm/common/playwrightServiceConfig.js.map +7 -1
  103. package/dist/esm/common/state.js +7 -7
  104. package/dist/esm/common/state.js.map +7 -1
  105. package/dist/esm/common/types.d.ts +1 -1
  106. package/dist/esm/common/types.d.ts.map +1 -1
  107. package/dist/esm/common/types.js +0 -4
  108. package/dist/esm/common/types.js.map +7 -1
  109. package/dist/esm/core/global/playwright-service-global-setup.js +17 -17
  110. package/dist/esm/core/global/playwright-service-global-setup.js.map +7 -1
  111. package/dist/esm/core/global/playwright-service-global-teardown.js +16 -13
  112. package/dist/esm/core/global/playwright-service-global-teardown.js.map +7 -1
  113. package/dist/esm/core/initializePlaywrightServiceTestRun.js +13 -21
  114. package/dist/esm/core/initializePlaywrightServiceTestRun.js.map +7 -1
  115. package/dist/esm/core/playwrightService.js +144 -195
  116. package/dist/esm/core/playwrightService.js.map +7 -1
  117. package/dist/esm/core/playwrightServiceEntra.js +44 -42
  118. package/dist/esm/core/playwrightServiceEntra.js.map +7 -1
  119. package/dist/esm/core/playwrightServiceUtils.js +6 -8
  120. package/dist/esm/core/playwrightServiceUtils.js.map +7 -1
  121. package/dist/esm/index.d.ts +1 -1
  122. package/dist/esm/index.d.ts.map +1 -1
  123. package/dist/esm/index.js +7 -9
  124. package/dist/esm/index.js.map +7 -1
  125. package/dist/esm/reporter/index.js +4 -11
  126. package/dist/esm/reporter/index.js.map +7 -1
  127. package/dist/esm/reporter/playwrightReporter.js +202 -207
  128. package/dist/esm/reporter/playwrightReporter.js.map +7 -1
  129. package/dist/esm/utils/PlaywrightServiceClient.d.ts +1 -1
  130. package/dist/esm/utils/PlaywrightServiceClient.d.ts.map +1 -1
  131. package/dist/esm/utils/PlaywrightServiceClient.js +120 -85
  132. package/dist/esm/utils/PlaywrightServiceClient.js.map +7 -1
  133. package/dist/esm/utils/cIInfoProvider.js +58 -71
  134. package/dist/esm/utils/cIInfoProvider.js.map +7 -1
  135. package/dist/esm/utils/getPackageVersion.js +12 -17
  136. package/dist/esm/utils/getPackageVersion.js.map +7 -1
  137. package/dist/esm/utils/getPlaywrightVersion.js +15 -13
  138. package/dist/esm/utils/getPlaywrightVersion.js.map +7 -1
  139. package/dist/esm/utils/packageManager.js +37 -37
  140. package/dist/esm/utils/packageManager.js.map +7 -1
  141. package/dist/esm/utils/parseJwt.js +15 -14
  142. package/dist/esm/utils/parseJwt.js.map +7 -1
  143. package/dist/esm/utils/playwrightReporterStorageManager.d.ts.map +1 -1
  144. package/dist/esm/utils/playwrightReporterStorageManager.js +358 -333
  145. package/dist/esm/utils/playwrightReporterStorageManager.js.map +7 -1
  146. package/dist/esm/utils/utils.d.ts +2 -2
  147. package/dist/esm/utils/utils.d.ts.map +1 -1
  148. package/dist/esm/utils/utils.js +377 -350
  149. package/dist/esm/utils/utils.js.map +7 -1
  150. package/dist/react-native/common/types.d.ts +1 -1
  151. package/dist/react-native/common/types.d.ts.map +1 -1
  152. package/dist/react-native/common/types.js.map +1 -1
  153. package/dist/react-native/index.d.ts +1 -1
  154. package/dist/react-native/index.d.ts.map +1 -1
  155. package/dist/react-native/index.js.map +1 -1
  156. package/dist/react-native/utils/PlaywrightServiceClient.d.ts +1 -1
  157. package/dist/react-native/utils/PlaywrightServiceClient.d.ts.map +1 -1
  158. package/dist/react-native/utils/PlaywrightServiceClient.js.map +1 -1
  159. package/dist/react-native/utils/playwrightReporterStorageManager.d.ts.map +1 -1
  160. package/dist/react-native/utils/playwrightReporterStorageManager.js.map +1 -1
  161. package/dist/react-native/utils/utils.d.ts +2 -2
  162. package/dist/react-native/utils/utils.d.ts.map +1 -1
  163. package/dist/react-native/utils/utils.js.map +1 -1
  164. package/package.json +6 -24
  165. package/dist/commonjs/core/playwrightServiceUtils-cjs.cjs.map +0 -1
  166. package/dist/commonjs/core/playwrightServiceUtils-cjs.d.cts.map +0 -1
  167. package/dist/commonjs/utils/getPackageVersion-cjs.cjs.map +0 -1
  168. package/dist/commonjs/utils/getPackageVersion-cjs.d.cts.map +0 -1
@@ -1,105 +1,120 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.PlaywrightServiceConfig = void 0;
6
- const constants_js_1 = require("./constants.js");
7
- const utils_js_1 = require("../utils/utils.js");
8
- const cIInfoProvider_js_1 = require("../utils/cIInfoProvider.js");
9
- const state_js_1 = require("./state.js");
10
- const messages_js_1 = require("./messages.js");
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var playwrightServiceConfig_exports = {};
19
+ __export(playwrightServiceConfig_exports, {
20
+ PlaywrightServiceConfig: () => PlaywrightServiceConfig
21
+ });
22
+ module.exports = __toCommonJS(playwrightServiceConfig_exports);
23
+ var import_constants = require("./constants.js");
24
+ var import_utils = require("../utils/utils.js");
25
+ var import_cIInfoProvider = require("../utils/cIInfoProvider.js");
26
+ var import_state = require("./state.js");
27
+ var import_messages = require("./messages.js");
11
28
  class PlaywrightServiceConfig {
12
- serviceOs;
13
- runId;
14
- connectTimeout;
15
- slowMo;
16
- exposeNetwork;
17
- runName;
18
- apiVersion;
19
- _serviceAuthType = constants_js_1.ServiceAuth.ENTRA_ID;
20
- credential;
21
- constructor() {
22
- this.serviceOs = (process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_OS] ||
23
- constants_js_1.DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS);
24
- this.runName = process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || "";
25
- this.runId = process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || "";
26
- this.connectTimeout = constants_js_1.DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;
27
- this.slowMo = constants_js_1.DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;
28
- this.exposeNetwork = constants_js_1.DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;
29
- this.apiVersion =
30
- process.env[constants_js_1.InternalEnvironmentVariables.MPT_API_VERSION] || constants_js_1.Constants.LatestAPIVersion;
29
+ serviceOs;
30
+ runId;
31
+ connectTimeout;
32
+ slowMo;
33
+ exposeNetwork;
34
+ runName;
35
+ apiVersion;
36
+ _serviceAuthType = import_constants.ServiceAuth.ENTRA_ID;
37
+ credential;
38
+ constructor() {
39
+ this.serviceOs = process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_OS] || import_constants.DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS;
40
+ this.runName = process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || "";
41
+ this.runId = process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || "";
42
+ this.connectTimeout = import_constants.DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;
43
+ this.slowMo = import_constants.DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;
44
+ this.exposeNetwork = import_constants.DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;
45
+ this.apiVersion = process.env[import_constants.InternalEnvironmentVariables.MPT_API_VERSION] || import_constants.Constants.LatestAPIVersion;
46
+ }
47
+ static get instance() {
48
+ if (!import_state.state.playwrightServiceConfig) {
49
+ import_state.state.playwrightServiceConfig = new PlaywrightServiceConfig();
31
50
  }
32
- static get instance() {
33
- if (!state_js_1.state.playwrightServiceConfig) {
34
- state_js_1.state.playwrightServiceConfig = new PlaywrightServiceConfig();
35
- }
36
- return state_js_1.state.playwrightServiceConfig;
51
+ return import_state.state.playwrightServiceConfig;
52
+ }
53
+ get serviceAuthType() {
54
+ return this._serviceAuthType;
55
+ }
56
+ set serviceAuthType(value) {
57
+ this._serviceAuthType = value;
58
+ }
59
+ async initialize() {
60
+ if (!this.runName) {
61
+ const ciConfigInfo = import_cIInfoProvider.CIInfoProvider.getCIInfo();
62
+ this.runName = await (0, import_utils.getRunName)(ciConfigInfo);
37
63
  }
38
- get serviceAuthType() {
39
- return this._serviceAuthType;
64
+ }
65
+ validateOptions = (options) => {
66
+ if (!options) return;
67
+ const isUsingServiceConfig = process.env[import_constants.InternalEnvironmentVariables.USING_SERVICE_CONFIG] === "true";
68
+ if (isUsingServiceConfig) {
69
+ if (options.serviceAuthType || options.runId || options.runName) {
70
+ const errorMessage = import_messages.ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;
71
+ throw new Error(errorMessage);
72
+ }
73
+ return;
40
74
  }
41
- set serviceAuthType(value) {
42
- this._serviceAuthType = value;
75
+ };
76
+ setOptions = (options, isGetConnectOptions = false) => {
77
+ if (isGetConnectOptions) {
78
+ this.validateOptions(options);
43
79
  }
44
- async initialize() {
45
- if (!this.runName) {
46
- const ciConfigInfo = cIInfoProvider_js_1.CIInfoProvider.getCIInfo();
47
- this.runName = await (0, utils_js_1.getRunName)(ciConfigInfo);
48
- }
80
+ if (options?.exposeNetwork) {
81
+ this.exposeNetwork = options.exposeNetwork;
49
82
  }
50
- validateOptions = (options) => {
51
- if (!options)
52
- return;
53
- const isUsingServiceConfig = process.env[constants_js_1.InternalEnvironmentVariables.USING_SERVICE_CONFIG] === "true";
54
- if (isUsingServiceConfig) {
55
- if (options.serviceAuthType || options.runId || options.runName) {
56
- const errorMessage = messages_js_1.ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;
57
- throw new Error(errorMessage);
58
- }
59
- return;
60
- }
61
- };
62
- setOptions = (options, isGetConnectOptions = false) => {
63
- if (isGetConnectOptions) {
64
- this.validateOptions(options);
65
- }
66
- if (options?.exposeNetwork) {
67
- this.exposeNetwork = options.exposeNetwork;
68
- }
69
- if (options?.apiVersion) {
70
- if (!process.env[constants_js_1.InternalEnvironmentVariables.MPT_API_VERSION]) {
71
- process.env[constants_js_1.InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;
72
- }
73
- this.apiVersion = options.apiVersion;
74
- }
75
- if (!process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {
76
- if (options?.runId) {
77
- (0, utils_js_1.ValidateRunID)(options.runId);
78
- this.runId = options.runId;
79
- process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;
80
- }
81
- else {
82
- this.runId = (0, utils_js_1.getAndSetRunId)();
83
- }
84
- }
85
- if (!process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {
86
- this.runName = options.runName;
87
- process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;
88
- }
89
- if (options?.os) {
90
- this.serviceOs = options.os;
91
- process.env[constants_js_1.InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;
92
- }
93
- if (options?.slowMo) {
94
- this.slowMo = options.slowMo;
95
- }
96
- if (options?.connectTimeout) {
97
- this.connectTimeout = options.connectTimeout;
98
- }
99
- if (options?.credential) {
100
- this.credential = options.credential;
101
- }
102
- };
83
+ if (options?.apiVersion) {
84
+ if (!process.env[import_constants.InternalEnvironmentVariables.MPT_API_VERSION]) {
85
+ process.env[import_constants.InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;
86
+ }
87
+ this.apiVersion = options.apiVersion;
88
+ }
89
+ if (!process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {
90
+ if (options?.runId) {
91
+ (0, import_utils.ValidateRunID)(options.runId);
92
+ this.runId = options.runId;
93
+ process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;
94
+ } else {
95
+ this.runId = (0, import_utils.getAndSetRunId)();
96
+ }
97
+ }
98
+ if (!process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {
99
+ this.runName = options.runName;
100
+ process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;
101
+ }
102
+ if (options?.os) {
103
+ this.serviceOs = options.os;
104
+ process.env[import_constants.InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;
105
+ }
106
+ if (options?.slowMo) {
107
+ this.slowMo = options.slowMo;
108
+ }
109
+ if (options?.connectTimeout) {
110
+ this.connectTimeout = options.connectTimeout;
111
+ }
112
+ if (options?.credential) {
113
+ this.credential = options.credential;
114
+ }
115
+ };
103
116
  }
104
- exports.PlaywrightServiceConfig = PlaywrightServiceConfig;
105
- //# sourceMappingURL=playwrightServiceConfig.js.map
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ PlaywrightServiceConfig
120
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"playwrightServiceConfig.js","sourceRoot":"","sources":["../../../src/common/playwrightServiceConfig.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,iDAKwB;AAGxB,gDAA8E;AAC9E,kEAA4D;AAC5D,yCAAmC;AACnC,+CAA6D;AAE7D,MAAM,uBAAuB;IACpB,SAAS,CAAS;IAClB,KAAK,CAAS;IACd,cAAc,CAAS;IACvB,MAAM,CAAS;IACf,aAAa,CAAS;IACtB,OAAO,CAAS;IAChB,UAAU,CAAS;IAClB,gBAAgB,GAAW,0BAAW,CAAC,QAAQ,CAAC;I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AG,OAAO,CAAC,KAAK,CAAC;gBAC3B,OAAO,CAAC,GAAG,CAAC,2CAA4B,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC5E,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,GAAG,IAAA,yBAAc,GAAE,CAAC;YAChC,CAAC;QACH,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2CAA4B,CAAC,oBAAoB,CAAC,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACxF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,2CAA4B,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QAChF,CAAC;QACD,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,2CAA4B,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAC5E,CAAC;QACD,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC/B,CAAC;QACD,IAAI,OAAO,EAAE,cAAc,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC/C,CAAC;QACD,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACvC,CAAC;IACH,CAAC,CAAC;CACH;AAEQ,0DAAuB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Constants,\n DefaultConnectOptionsConstants,\n InternalEnvironmentVariables,\n ServiceAuth,\n} from \"./constants.js\";\nimport type { PlaywrightServiceAdditionalOptions, OsType } from \"./types.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport { getAndSetRunId, getRunName, ValidateRunID } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\nimport { state } from \"./state.js\";\nimport { ServiceErrorMessageConstants } from \"./messages.js\";\n\nclass PlaywrightServiceConfig {\n public serviceOs: OsType;\n public runId: string;\n public connectTimeout: number;\n public slowMo: number;\n public exposeNetwork: string;\n public runName: string;\n public apiVersion: string;\n private _serviceAuthType: string = ServiceAuth.ENTRA_ID;\n public credential?: TokenCredential;\n\n constructor() {\n this.serviceOs = (process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] ||\n DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS) as OsType;\n this.runName = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || \"\";\n this.runId = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || \"\";\n this.connectTimeout = DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;\n this.slowMo = DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;\n this.exposeNetwork = DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;\n this.apiVersion =\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] || Constants.LatestAPIVersion;\n }\n\n public static get instance(): PlaywrightServiceConfig {\n if (!state.playwrightServiceConfig) {\n state.playwrightServiceConfig = new PlaywrightServiceConfig();\n }\n return state.playwrightServiceConfig;\n }\n\n public get serviceAuthType(): string {\n return this._serviceAuthType;\n }\n\n public set serviceAuthType(value: string) {\n this._serviceAuthType = value;\n }\n\n public async initialize(): Promise<void> {\n if (!this.runName) {\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n this.runName = await getRunName(ciConfigInfo);\n }\n }\n\n validateOptions = (options?: PlaywrightServiceAdditionalOptions): void => {\n if (!options) return;\n\n const isUsingServiceConfig =\n process.env[InternalEnvironmentVariables.USING_SERVICE_CONFIG] === \"true\";\n if (isUsingServiceConfig) {\n if (options.serviceAuthType || options.runId || options.runName) {\n const errorMessage = ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;\n throw new Error(errorMessage);\n }\n return;\n }\n };\n\n setOptions = (\n options?: PlaywrightServiceAdditionalOptions,\n isGetConnectOptions: boolean = false,\n ): void => {\n if (isGetConnectOptions) {\n this.validateOptions(options);\n }\n\n if (options?.exposeNetwork) {\n this.exposeNetwork = options.exposeNetwork;\n }\n if (options?.apiVersion) {\n if (!process.env[InternalEnvironmentVariables.MPT_API_VERSION]) {\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;\n }\n this.apiVersion = options.apiVersion;\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {\n if (options?.runId) {\n ValidateRunID(options.runId);\n this.runId = options.runId;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;\n } else {\n this.runId = getAndSetRunId();\n }\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {\n this.runName = options.runName;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;\n }\n if (options?.os) {\n this.serviceOs = options.os;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;\n }\n if (options?.slowMo) {\n this.slowMo = options.slowMo;\n }\n if (options?.connectTimeout) {\n this.connectTimeout = options.connectTimeout;\n }\n if (options?.credential) {\n this.credential = options.credential;\n }\n };\n}\n\nexport { PlaywrightServiceConfig };\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/common/playwrightServiceConfig.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Constants,\n DefaultConnectOptionsConstants,\n InternalEnvironmentVariables,\n ServiceAuth,\n} from \"./constants.js\";\nimport type { PlaywrightServiceAdditionalOptions, OsType } from \"./types.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport { getAndSetRunId, getRunName, ValidateRunID } from \"../utils/utils.js\";\nimport { CIInfoProvider } from \"../utils/cIInfoProvider.js\";\nimport { state } from \"./state.js\";\nimport { ServiceErrorMessageConstants } from \"./messages.js\";\n\nclass PlaywrightServiceConfig {\n public serviceOs: OsType;\n public runId: string;\n public connectTimeout: number;\n public slowMo: number;\n public exposeNetwork: string;\n public runName: string;\n public apiVersion: string;\n private _serviceAuthType: string = ServiceAuth.ENTRA_ID;\n public credential?: TokenCredential;\n\n constructor() {\n this.serviceOs = (process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] ||\n DefaultConnectOptionsConstants.DEFAULT_SERVICE_OS) as OsType;\n this.runName = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] || \"\";\n this.runId = process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] || \"\";\n this.connectTimeout = DefaultConnectOptionsConstants.DEFAULT_TIMEOUT;\n this.slowMo = DefaultConnectOptionsConstants.DEFAULT_SLOW_MO;\n this.exposeNetwork = DefaultConnectOptionsConstants.DEFAULT_EXPOSE_NETWORK;\n this.apiVersion =\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] || Constants.LatestAPIVersion;\n }\n\n public static get instance(): PlaywrightServiceConfig {\n if (!state.playwrightServiceConfig) {\n state.playwrightServiceConfig = new PlaywrightServiceConfig();\n }\n return state.playwrightServiceConfig;\n }\n\n public get serviceAuthType(): string {\n return this._serviceAuthType;\n }\n\n public set serviceAuthType(value: string) {\n this._serviceAuthType = value;\n }\n\n public async initialize(): Promise<void> {\n if (!this.runName) {\n const ciConfigInfo = CIInfoProvider.getCIInfo();\n this.runName = await getRunName(ciConfigInfo);\n }\n }\n\n validateOptions = (options?: PlaywrightServiceAdditionalOptions): void => {\n if (!options) return;\n\n const isUsingServiceConfig =\n process.env[InternalEnvironmentVariables.USING_SERVICE_CONFIG] === \"true\";\n if (isUsingServiceConfig) {\n if (options.serviceAuthType || options.runId || options.runName) {\n const errorMessage = ServiceErrorMessageConstants.INVALID_PARAM_WITH_SERVICE_CONFIG.message;\n throw new Error(errorMessage);\n }\n return;\n }\n };\n\n setOptions = (\n options?: PlaywrightServiceAdditionalOptions,\n isGetConnectOptions: boolean = false,\n ): void => {\n if (isGetConnectOptions) {\n this.validateOptions(options);\n }\n\n if (options?.exposeNetwork) {\n this.exposeNetwork = options.exposeNetwork;\n }\n if (options?.apiVersion) {\n if (!process.env[InternalEnvironmentVariables.MPT_API_VERSION]) {\n process.env[InternalEnvironmentVariables.MPT_API_VERSION] = options.apiVersion;\n }\n this.apiVersion = options.apiVersion;\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID]) {\n if (options?.runId) {\n ValidateRunID(options.runId);\n this.runId = options.runId;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_ID] = this.runId;\n } else {\n this.runId = getAndSetRunId();\n }\n }\n if (!process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] && options?.runName) {\n this.runName = options.runName;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_RUN_NAME] = this.runName;\n }\n if (options?.os) {\n this.serviceOs = options.os;\n process.env[InternalEnvironmentVariables.MPT_SERVICE_OS] = this.serviceOs;\n }\n if (options?.slowMo) {\n this.slowMo = options.slowMo;\n }\n if (options?.connectTimeout) {\n this.connectTimeout = options.connectTimeout;\n }\n if (options?.credential) {\n this.credential = options.credential;\n }\n };\n}\n\nexport { PlaywrightServiceConfig };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAKO;AAGP,mBAA0D;AAC1D,4BAA+B;AAC/B,mBAAsB;AACtB,sBAA6C;AAE7C,MAAM,wBAAwB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACC,mBAA2B,6BAAY;AAAA,EACxC;AAAA,EAEP,cAAc;AACZ,SAAK,YAAa,QAAQ,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B,eAAe,GAAG;AAC9D,gBAAQ,IAAI,8CAA6B,eAAe,IAAI,QAAQ;AAAA,MACtE;AACA,WAAK,aAAa,QAAQ;AAAA,IAC5B;AACA,QAAI,CAAC,QAAQ,IAAI,8CAA6B,kBAAkB,GAAG;AACjE,UAAI,SAAS,OAAO;AAClB,wCAAc,QAAQ,KAAK;AAC3B,aAAK,QAAQ,QAAQ;AACrB,gBAAQ,IAAI,8CAA6B,kBAAkB,IAAI,KAAK;AAAA,MACtE,OAAO;AACL,aAAK,YAAQ,6BAAe;AAAA,MAC9B;AAAA,IACF;AACA,QAAI,CAAC,QAAQ,IAAI,8CAA6B,oBAAoB,KAAK,SAAS,SAAS;AACvF,WAAK,UAAU,QAAQ;AACvB,cAAQ,IAAI,8CAA6B,oBAAoB,IAAI,KAAK;AAAA,IACxE;AACA,QAAI,SAAS,IAAI;AACf,WAAK,YAAY,QAAQ;AACzB,cAAQ,IAAI,8CAA6B,cAAc,IAAI,KAAK;AAAA,IAClE;AACA,QAAI,SAAS,QAAQ;AACnB,WAAK,SAAS,QAAQ;AAAA,IACxB;AACA,QAAI,SAAS,gBAAgB;AAC3B,WAAK,iBAAiB,QAAQ;AAAA,IAChC;AACA,QAAI,SAAS,YAAY;AACvB,WAAK,aAAa,QAAQ;AAAA,IAC5B;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,12 +1,32 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.state = void 0;
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var state_exports = {};
19
+ __export(state_exports, {
20
+ state: () => state
21
+ });
22
+ module.exports = __toCommonJS(state_exports);
6
23
  globalThis.state = globalThis.state || {
7
- playwrightServiceEntra: null,
8
- customerConfig: null,
9
- playwrightServiceConfig: null,
24
+ playwrightServiceEntra: null,
25
+ customerConfig: null,
26
+ playwrightServiceConfig: null
10
27
  };
11
- exports.state = globalThis.state;
12
- //# sourceMappingURL=state.js.map
28
+ const state = globalThis.state;
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ state
32
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/common/state.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAEjC,UAAkB,CAAC,KAAK,GAAI,UAAkB,CAAC,KAAK,IAAI;IACvD,sBAAsB,EAAE,IAAI;IAC5B,cAAc,EAAE,IAAI;IACpB,uBAAuB,EAAE,IAAI;CAC9B,CAAC;AACW,QAAA,KAAK,GAAyB,UAAkB,CAAC,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n(globalThis as any).state = (globalThis as any).state || {\n playwrightServiceEntra: null,\n customerConfig: null,\n playwrightServiceConfig: null,\n};\nexport const state: Record<string, any> = (globalThis as any).state;\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/common/state.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n(globalThis as any).state = (globalThis as any).state || {\n playwrightServiceEntra: null,\n customerConfig: null,\n playwrightServiceConfig: null,\n};\nexport const state: Record<string, any> = (globalThis as any).state;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGC,WAAmB,QAAS,WAAmB,SAAS;AAAA,EACvD,wBAAwB;AAAA,EACxB,gBAAgB;AAAA,EAChB,yBAAyB;AAC3B;AACO,MAAM,QAA8B,WAAmB;",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
1
  import type { ConnectOptions } from "@playwright/test";
2
2
  import type { ServiceAuth, ServiceOS, SDKLanguage } from "./constants.js";
3
3
  import type { TokenCredential } from "@azure/identity";
4
- import { CIInfo } from "../utils/cIInfoProvider.js";
4
+ import type { CIInfo } from "../utils/cIInfoProvider.js";
5
5
  /**
6
6
  * @public
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAIpD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACpD,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ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,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -1,5 +1,15 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=types.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var types_exports = {};
15
+ module.exports = __toCommonJS(types_exports);
@@ -1 +1,7 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ConnectOptions } from \"@playwright/test\";\nimport type { ServiceAuth, ServiceOS, SDKLanguage } from \"./constants.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport { CIInfo } from \"../utils/cIInfoProvider.js\";\n\n// Public APIs\n\n/**\n * @public\n *\n * Endpoint options for the service.\n */\nexport type EndpointOptions = {\n /**\n * @public\n *\n * A browser websocket endpoint to connect to.\n */\n wsEndpoint: string;\n};\n\n/**\n * @public\n *\n * Browser connect options for the service. This includes endpoint options and connect options.\n *\n * @example\n * ```\n * import playwright, { test, expect, BrowserType } from \"@playwright/test\";\n * import { getConnectOptions, BrowserConnectOptions } from \"@azure/playwright\";\n *\n * test(\"has title\", async ({ browserName }) => {\n * const { wsEndpoint, options } : BrowserConnectOptions = await getConnectOptions();\n * const browser = await (playwright[browserName] as BrowserType).connect(wsEndpoint, options);\n * const context = await browser.newContext();\n * const page = await context.newPage();\n *\n * await page.goto(\"https://playwright.dev/\");\n * await expect(page).toHaveTitle(/Playwright/);\n *\n * await page.close();\n * await context.close();\n * await browser.close();\n * });\n * ```\n */\nexport type BrowserConnectOptions = EndpointOptions & {\n options: ConnectOptions;\n};\n\n/**\n * @public\n *\n * Additional options for the service.\n */\nexport type PlaywrightServiceAdditionalOptions = {\n /**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n *\n * @defaultValue `ENTRA_ID`\n */\n serviceAuthType?: AuthenticationType;\n\n /**\n * @public\n *\n * Operating system types supported by Azure Playwright.\n *\n * @defaultValue `linux`\n */\n os?: OsType;\n\n /**\n * @public\n *\n * Run id for the test run.\n *\n * @defaultValue `current datetime as ISO string`\n */\n runId?: string;\n\n /**\n * @public\n *\n * Maximum time in milliseconds to wait for the connection to be established.\n *\n * @defaultValue `30000`\n */\n connectTimeout?: number;\n\n /**\n * @public\n *\n * Slows down Playwright operations by the specified amount of milliseconds.\n *\n * @defaultValue `0`\n */\n slowMo?: number;\n\n /**\n * @public\n *\n * Exposes network available on the connecting client to the browser being connected to.\n *\n * @defaultValue `<loopback>`\n */\n exposeNetwork?: string;\n\n /**\n * @public\n *\n * Custom token credential for Entra ID authentication. Learn more at {@link https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/using-azure-identity.md | Using Azure Identity}.\n *\n * @defaultValue `DefaultAzureCredential`\n */\n credential?: TokenCredential;\n /**\n * @public\n *\n * Run name for the test run.\n *\n * @defaultValue `guid`\n */\n runName?: string;\n\n /**\n * @public\n *\n * API Version\n *\n * @defaultValue `2025-09-01`\n */\n apiVersion?: \"2025-09-01\";\n};\n\n/**\n * @public\n *\n * OS Types supported by Azure Playwright.\n */\nexport type OsType = (typeof ServiceOS)[keyof typeof ServiceOS];\n\n/**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n */\nexport type AuthenticationType = (typeof ServiceAuth)[keyof typeof ServiceAuth];\n\n// Internal APIs\n\nexport type JwtPayload = {\n iss?: string;\n sub?: string;\n aud?: string[] | string;\n exp?: number;\n nbf?: number;\n iat?: number;\n jti?: string;\n};\n\nexport type AccessTokenClaims = JwtPayload & {\n pwid?: string;\n};\n\nexport type VersionInfo = {\n major: number;\n minor: number;\n patch: number;\n};\n\nexport type PackageManager = {\n runCommand: (command: string, args: string) => string;\n getVersionFromStdout: (stdout: string) => string;\n};\n\nexport type RunConfig = {\n framework?: RunFramework;\n sdkLanguage?: (typeof SDKLanguage)[keyof typeof SDKLanguage];\n maxWorkers?: number;\n};\n\nexport type RunFramework = {\n name?: string;\n version?: string;\n runnerName?: string;\n};\n\nexport type TestRunCreatePayload = {\n displayName: string;\n config?: RunConfig;\n ciConfig?: CIInfo;\n};\n\nexport type WorkspaceMetaData = {\n id?: string;\n resourceId?: string;\n name?: string;\n state?: string;\n subscriptionId?: string;\n subscriptionState?: string;\n tenantId?: string;\n location?: string;\n regionalAffinity?: string;\n localAuth?: string;\n storageUri?: string;\n reporting?: string;\n};\n\nexport type TenantInfo = {\n tenantId?: string;\n defaultDomain?: string;\n};\n\nexport interface UploadResult {\n success: boolean;\n errorMessage?: string;\n failedFileCount?: number;\n totalFiles?: number;\n failedFiles?: string[];\n failedFileDetails?: Array<{ fileName: string; error: string }>;\n partialSuccess?: boolean;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/common/types.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ConnectOptions } from \"@playwright/test\";\nimport type { ServiceAuth, ServiceOS, SDKLanguage } from \"./constants.js\";\nimport type { TokenCredential } from \"@azure/identity\";\nimport type { CIInfo } from \"../utils/cIInfoProvider.js\";\n\n// Public APIs\n\n/**\n * @public\n *\n * Endpoint options for the service.\n */\nexport type EndpointOptions = {\n /**\n * @public\n *\n * A browser websocket endpoint to connect to.\n */\n wsEndpoint: string;\n};\n\n/**\n * @public\n *\n * Browser connect options for the service. This includes endpoint options and connect options.\n *\n * @example\n * ```\n * import playwright, { test, expect, BrowserType } from \"@playwright/test\";\n * import { getConnectOptions, BrowserConnectOptions } from \"@azure/playwright\";\n *\n * test(\"has title\", async ({ browserName }) => {\n * const { wsEndpoint, options } : BrowserConnectOptions = await getConnectOptions();\n * const browser = await (playwright[browserName] as BrowserType).connect(wsEndpoint, options);\n * const context = await browser.newContext();\n * const page = await context.newPage();\n *\n * await page.goto(\"https://playwright.dev/\");\n * await expect(page).toHaveTitle(/Playwright/);\n *\n * await page.close();\n * await context.close();\n * await browser.close();\n * });\n * ```\n */\nexport type BrowserConnectOptions = EndpointOptions & {\n options: ConnectOptions;\n};\n\n/**\n * @public\n *\n * Additional options for the service.\n */\nexport type PlaywrightServiceAdditionalOptions = {\n /**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n *\n * @defaultValue `ENTRA_ID`\n */\n serviceAuthType?: AuthenticationType;\n\n /**\n * @public\n *\n * Operating system types supported by Azure Playwright.\n *\n * @defaultValue `linux`\n */\n os?: OsType;\n\n /**\n * @public\n *\n * Run id for the test run.\n *\n * @defaultValue `current datetime as ISO string`\n */\n runId?: string;\n\n /**\n * @public\n *\n * Maximum time in milliseconds to wait for the connection to be established.\n *\n * @defaultValue `30000`\n */\n connectTimeout?: number;\n\n /**\n * @public\n *\n * Slows down Playwright operations by the specified amount of milliseconds.\n *\n * @defaultValue `0`\n */\n slowMo?: number;\n\n /**\n * @public\n *\n * Exposes network available on the connecting client to the browser being connected to.\n *\n * @defaultValue `<loopback>`\n */\n exposeNetwork?: string;\n\n /**\n * @public\n *\n * Custom token credential for Entra ID authentication. Learn more at {@link https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/using-azure-identity.md | Using Azure Identity}.\n *\n * @defaultValue `DefaultAzureCredential`\n */\n credential?: TokenCredential;\n /**\n * @public\n *\n * Run name for the test run.\n *\n * @defaultValue `guid`\n */\n runName?: string;\n\n /**\n * @public\n *\n * API Version\n *\n * @defaultValue `2025-09-01`\n */\n apiVersion?: \"2025-09-01\";\n};\n\n/**\n * @public\n *\n * OS Types supported by Azure Playwright.\n */\nexport type OsType = (typeof ServiceOS)[keyof typeof ServiceOS];\n\n/**\n * @public\n *\n * Authentication types supported by Azure Playwright.\n */\nexport type AuthenticationType = (typeof ServiceAuth)[keyof typeof ServiceAuth];\n\n// Internal APIs\n\nexport type JwtPayload = {\n iss?: string;\n sub?: string;\n aud?: string[] | string;\n exp?: number;\n nbf?: number;\n iat?: number;\n jti?: string;\n};\n\nexport type AccessTokenClaims = JwtPayload & {\n pwid?: string;\n};\n\nexport type VersionInfo = {\n major: number;\n minor: number;\n patch: number;\n};\n\nexport type PackageManager = {\n runCommand: (command: string, args: string) => string;\n getVersionFromStdout: (stdout: string) => string;\n};\n\nexport type RunConfig = {\n framework?: RunFramework;\n sdkLanguage?: (typeof SDKLanguage)[keyof typeof SDKLanguage];\n maxWorkers?: number;\n};\n\nexport type RunFramework = {\n name?: string;\n version?: string;\n runnerName?: string;\n};\n\nexport type TestRunCreatePayload = {\n displayName: string;\n config?: RunConfig;\n ciConfig?: CIInfo;\n};\n\nexport type WorkspaceMetaData = {\n id?: string;\n resourceId?: string;\n name?: string;\n state?: string;\n subscriptionId?: string;\n subscriptionState?: string;\n tenantId?: string;\n location?: string;\n regionalAffinity?: string;\n localAuth?: string;\n storageUri?: string;\n reporting?: string;\n};\n\nexport type TenantInfo = {\n tenantId?: string;\n defaultDomain?: string;\n};\n\nexport interface UploadResult {\n success: boolean;\n errorMessage?: string;\n failedFileCount?: number;\n totalFiles?: number;\n failedFiles?: string[];\n failedFileDetails?: Array<{ fileName: string; error: string }>;\n partialSuccess?: boolean;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,28 +1,54 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
6
- const node_path_1 = require("node:path");
7
- const playwrightServiceEntra_js_1 = tslib_1.__importDefault(require("../playwrightServiceEntra.js"));
8
- const executor_js_1 = require("../../common/executor.js");
9
- const customerConfig_js_1 = tslib_1.__importDefault(require("../../common/customerConfig.js"));
10
- const playwrightServiceConfig_js_1 = require("../../common/playwrightServiceConfig.js");
11
- const initializePlaywrightServiceTestRun_js_1 = require("../initializePlaywrightServiceTestRun.js");
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var playwright_service_global_setup_exports = {};
29
+ __export(playwright_service_global_setup_exports, {
30
+ default: () => playwright_service_global_setup_default
31
+ });
32
+ module.exports = __toCommonJS(playwright_service_global_setup_exports);
33
+ var import_node_path = require("node:path");
34
+ var import_playwrightServiceEntra = __toESM(require("../playwrightServiceEntra.js"));
35
+ var import_executor = require("../../common/executor.js");
36
+ var import_customerConfig = __toESM(require("../../common/customerConfig.js"));
37
+ var import_playwrightServiceConfig = require("../../common/playwrightServiceConfig.js");
38
+ var import_initializePlaywrightServiceTestRun = require("../initializePlaywrightServiceTestRun.js");
12
39
  const playwrightServiceGlobalSetupWrapper = async (config) => {
13
- const rootDir = config.configFile ? (0, node_path_1.dirname)(config.configFile) : process.cwd();
14
- let customerGlobalSetupFunc = null;
15
- if (customerConfig_js_1.default.globalSetup && typeof customerConfig_js_1.default.globalSetup === "string") {
16
- customerGlobalSetupFunc = await (0, executor_js_1.loadCustomerGlobalFunction)(rootDir, customerConfig_js_1.default.globalSetup);
17
- }
18
- const serviceAuthType = playwrightServiceConfig_js_1.PlaywrightServiceConfig.instance.serviceAuthType;
19
- if (serviceAuthType === "ENTRA_ID") {
20
- await playwrightServiceEntra_js_1.default.globalSetup();
21
- }
22
- await (0, initializePlaywrightServiceTestRun_js_1.initializePlaywrightServiceTestRun)(config);
23
- if (customerGlobalSetupFunc) {
24
- return customerGlobalSetupFunc(config);
25
- }
40
+ const rootDir = config.configFile ? (0, import_node_path.dirname)(config.configFile) : process.cwd();
41
+ let customerGlobalSetupFunc = null;
42
+ if (import_customerConfig.default.globalSetup && typeof import_customerConfig.default.globalSetup === "string") {
43
+ customerGlobalSetupFunc = await (0, import_executor.loadCustomerGlobalFunction)(rootDir, import_customerConfig.default.globalSetup);
44
+ }
45
+ const serviceAuthType = import_playwrightServiceConfig.PlaywrightServiceConfig.instance.serviceAuthType;
46
+ if (serviceAuthType === "ENTRA_ID") {
47
+ await import_playwrightServiceEntra.default.globalSetup();
48
+ }
49
+ await (0, import_initializePlaywrightServiceTestRun.initializePlaywrightServiceTestRun)(config);
50
+ if (customerGlobalSetupFunc) {
51
+ return customerGlobalSetupFunc(config);
52
+ }
26
53
  };
27
- exports.default = playwrightServiceGlobalSetupWrapper;
28
- //# sourceMappingURL=playwright-service-global-setup.js.map
54
+ var playwright_service_global_setup_default = playwrightServiceGlobalSetupWrapper;
@@ -1 +1,7 @@
1
- {"version":3,"file":"playwright-service-global-setup.js","sourceRoot":"","sources":["../../../../src/core/global/playwright-service-global-setup.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,yCAAoC;AAEpC,qGAAkE;AAClE,0DAAsE;AACtE,+FAA4D;AAC5D,wFAAkF;AAClF,oGAA8F;AAE9F,MAAM,mCAAmC,GAAG,KAAK,EAAE,MAAkB,EAAgB,EAAE;IACrF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,mBAAO,EAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAChF,IAAI,uBAAuB,GAAQ,IAAI,CAAC;IACxC,IAAI,2BAAc,CAAC,WAAW,IAAI,OAAO,2BAAc,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QACjF,uBAAuB,GAAG,MAAM,IAAA,wCAA0B,EAAC,OAAO,EAAE,2BAAc,CAAC,WAAW,CAAC,CAAC;IAClG,CAAC;IACD,MAAM,eAAe,GAAG,oDAAuB,CAAC,QAAQ,CAAC,eAAe,CAAC;IACzE,IAAI,eAAe,KAAK,UAAU,EAAE,CAAC;QACnC,MAAM,mCAAsB,CAAC,WAAW,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,IAAA,0EAAkC,EAAC,MAAM,CAAC,CAAC;IACjD,IAAI,uBAAuB,EAAE,CAAC;QAC5B,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,mCAAmC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\nimport { PlaywrightServiceConfig } from \"../../common/playwrightServiceConfig.js\";\nimport { initializePlaywrightServiceTestRun } from \"../initializePlaywrightServiceTestRun.js\";\n\nconst playwrightServiceGlobalSetupWrapper = async (config: FullConfig): Promise<any> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalSetupFunc: any = null;\n if (customerConfig.globalSetup && typeof customerConfig.globalSetup === \"string\") {\n customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);\n }\n const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;\n if (serviceAuthType === \"ENTRA_ID\") {\n await playwrightServiceEntra.globalSetup();\n }\n await initializePlaywrightServiceTestRun(config);\n if (customerGlobalSetupFunc) {\n return customerGlobalSetupFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalSetupWrapper;\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/core/global/playwright-service-global-setup.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\nimport { PlaywrightServiceConfig } from \"../../common/playwrightServiceConfig.js\";\nimport { initializePlaywrightServiceTestRun } from \"../initializePlaywrightServiceTestRun.js\";\n\nconst playwrightServiceGlobalSetupWrapper = async (config: FullConfig): Promise<any> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalSetupFunc: any = null;\n if (customerConfig.globalSetup && typeof customerConfig.globalSetup === \"string\") {\n customerGlobalSetupFunc = await loadCustomerGlobalFunction(rootDir, customerConfig.globalSetup);\n }\n const serviceAuthType = PlaywrightServiceConfig.instance.serviceAuthType;\n if (serviceAuthType === \"ENTRA_ID\") {\n await playwrightServiceEntra.globalSetup();\n }\n await initializePlaywrightServiceTestRun(config);\n if (customerGlobalSetupFunc) {\n return customerGlobalSetupFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalSetupWrapper;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAwB;AAExB,oCAAmC;AACnC,sBAA2C;AAC3C,4BAA2B;AAC3B,qCAAwC;AACxC,gDAAmD;AAEnD,MAAM,sCAAsC,OAAO,WAAqC;AACtF,QAAM,UAAU,OAAO,iBAAa,0BAAQ,OAAO,UAAW,IAAI,QAAQ,IAAI;AAC9E,MAAI,0BAA+B;AACnC,MAAI,sBAAAA,QAAe,eAAe,OAAO,sBAAAA,QAAe,gBAAgB,UAAU;AAChF,8BAA0B,UAAM,4CAA2B,SAAS,sBAAAA,QAAe,WAAW;AAAA,EAChG;AACA,QAAM,kBAAkB,uDAAwB,SAAS;AACzD,MAAI,oBAAoB,YAAY;AAClC,UAAM,8BAAAC,QAAuB,YAAY;AAAA,EAC3C;AACA,YAAM,8EAAmC,MAAM;AAC/C,MAAI,yBAAyB;AAC3B,WAAO,wBAAwB,MAAM;AAAA,EACvC;AACF;AAEA,IAAO,0CAAQ;",
6
+ "names": ["customerConfig", "playwrightServiceEntra"]
7
+ }
@@ -1,22 +1,51 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
6
- const node_path_1 = require("node:path");
7
- const playwrightServiceEntra_js_1 = tslib_1.__importDefault(require("../playwrightServiceEntra.js"));
8
- const executor_js_1 = require("../../common/executor.js");
9
- const customerConfig_js_1 = tslib_1.__importDefault(require("../../common/customerConfig.js"));
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var playwright_service_global_teardown_exports = {};
29
+ __export(playwright_service_global_teardown_exports, {
30
+ default: () => playwright_service_global_teardown_default
31
+ });
32
+ module.exports = __toCommonJS(playwright_service_global_teardown_exports);
33
+ var import_node_path = require("node:path");
34
+ var import_playwrightServiceEntra = __toESM(require("../playwrightServiceEntra.js"));
35
+ var import_executor = require("../../common/executor.js");
36
+ var import_customerConfig = __toESM(require("../../common/customerConfig.js"));
10
37
  const playwrightServiceGlobalTeardownWrapper = async (config) => {
11
- const rootDir = config.configFile ? (0, node_path_1.dirname)(config.configFile) : process.cwd();
12
- let customerGlobalTeardownFunc = null;
13
- if (customerConfig_js_1.default.globalTeardown && typeof customerConfig_js_1.default.globalTeardown === "string") {
14
- customerGlobalTeardownFunc = await (0, executor_js_1.loadCustomerGlobalFunction)(rootDir, customerConfig_js_1.default.globalTeardown);
15
- }
16
- playwrightServiceEntra_js_1.default.globalTeardown();
17
- if (customerGlobalTeardownFunc) {
18
- await customerGlobalTeardownFunc(config);
19
- }
38
+ const rootDir = config.configFile ? (0, import_node_path.dirname)(config.configFile) : process.cwd();
39
+ let customerGlobalTeardownFunc = null;
40
+ if (import_customerConfig.default.globalTeardown && typeof import_customerConfig.default.globalTeardown === "string") {
41
+ customerGlobalTeardownFunc = await (0, import_executor.loadCustomerGlobalFunction)(
42
+ rootDir,
43
+ import_customerConfig.default.globalTeardown
44
+ );
45
+ }
46
+ import_playwrightServiceEntra.default.globalTeardown();
47
+ if (customerGlobalTeardownFunc) {
48
+ await customerGlobalTeardownFunc(config);
49
+ }
20
50
  };
21
- exports.default = playwrightServiceGlobalTeardownWrapper;
22
- //# sourceMappingURL=playwright-service-global-teardown.js.map
51
+ var playwright_service_global_teardown_default = playwrightServiceGlobalTeardownWrapper;
@@ -1 +1,7 @@
1
- {"version":3,"file":"playwright-service-global-teardown.js","sourceRoot":"","sources":["../../../../src/core/global/playwright-service-global-teardown.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,yCAAoC;AAEpC,qGAAkE;AAClE,0DAAsE;AACtE,+FAA4D;AAE5D,MAAM,sCAAsC,GAAG,KAAK,EAAE,MAAkB,EAAiB,EAAE;IACzF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,mBAAO,EAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAChF,IAAI,0BAA0B,GAAQ,IAAI,CAAC;IAC3C,IAAI,2BAAc,CAAC,cAAc,IAAI,OAAO,2BAAc,CAAC,cAAc,KAAK,QAAQ,EAAE,CAAC;QACvF,0BAA0B,GAAG,MAAM,IAAA,wCAA0B,EAC3D,OAAO,EACP,2BAAc,CAAC,cAAc,CAC9B,CAAC;IACJ,CAAC;IACD,mCAAsB,CAAC,cAAc,EAAE,CAAC;IACxC,IAAI,0BAA0B,EAAE,CAAC;QAC/B,MAAM,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,sCAAsC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\n\nconst playwrightServiceGlobalTeardownWrapper = async (config: FullConfig): Promise<void> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalTeardownFunc: any = null;\n if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === \"string\") {\n customerGlobalTeardownFunc = await loadCustomerGlobalFunction(\n rootDir,\n customerConfig.globalTeardown,\n );\n }\n playwrightServiceEntra.globalTeardown();\n if (customerGlobalTeardownFunc) {\n await customerGlobalTeardownFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalTeardownWrapper;\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/playwright/src/core/global/playwright-service-global-teardown.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { dirname } from \"node:path\";\nimport type { FullConfig } from \"@playwright/test\";\nimport playwrightServiceEntra from \"../playwrightServiceEntra.js\";\nimport { loadCustomerGlobalFunction } from \"../../common/executor.js\";\nimport customerConfig from \"../../common/customerConfig.js\";\n\nconst playwrightServiceGlobalTeardownWrapper = async (config: FullConfig): Promise<void> => {\n const rootDir = config.configFile ? dirname(config.configFile!) : process.cwd();\n let customerGlobalTeardownFunc: any = null;\n if (customerConfig.globalTeardown && typeof customerConfig.globalTeardown === \"string\") {\n customerGlobalTeardownFunc = await loadCustomerGlobalFunction(\n rootDir,\n customerConfig.globalTeardown,\n );\n }\n playwrightServiceEntra.globalTeardown();\n if (customerGlobalTeardownFunc) {\n await customerGlobalTeardownFunc(config);\n }\n};\n\nexport default playwrightServiceGlobalTeardownWrapper;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAwB;AAExB,oCAAmC;AACnC,sBAA2C;AAC3C,4BAA2B;AAE3B,MAAM,yCAAyC,OAAO,WAAsC;AAC1F,QAAM,UAAU,OAAO,iBAAa,0BAAQ,OAAO,UAAW,IAAI,QAAQ,IAAI;AAC9E,MAAI,6BAAkC;AACtC,MAAI,sBAAAA,QAAe,kBAAkB,OAAO,sBAAAA,QAAe,mBAAmB,UAAU;AACtF,iCAA6B,UAAM;AAAA,MACjC;AAAA,MACA,sBAAAA,QAAe;AAAA,IACjB;AAAA,EACF;AACA,gCAAAC,QAAuB,eAAe;AACtC,MAAI,4BAA4B;AAC9B,UAAM,2BAA2B,MAAM;AAAA,EACzC;AACF;AAEA,IAAO,6CAAQ;",
6
+ "names": ["customerConfig", "playwrightServiceEntra"]
7
+ }