@redocly/cli 2.0.0-next.0 → 2.0.0-next.10

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 (170) hide show
  1. package/README.md +2 -0
  2. package/lib/auth/device-flow.d.ts.map +1 -1
  3. package/lib/auth/device-flow.js +2 -0
  4. package/lib/auth/device-flow.js.map +1 -1
  5. package/lib/commands/auth.d.ts +4 -4
  6. package/lib/commands/auth.d.ts.map +1 -1
  7. package/lib/commands/auth.js.map +1 -1
  8. package/lib/commands/build-docs/utils.js +1 -1
  9. package/lib/commands/build-docs/utils.js.map +1 -1
  10. package/lib/commands/bundle.d.ts +4 -4
  11. package/lib/commands/bundle.d.ts.map +1 -1
  12. package/lib/commands/bundle.js.map +1 -1
  13. package/lib/commands/eject.d.ts +2 -2
  14. package/lib/commands/eject.d.ts.map +1 -1
  15. package/lib/commands/eject.js.map +1 -1
  16. package/lib/commands/generate-arazzo.d.ts +8 -0
  17. package/lib/commands/generate-arazzo.d.ts.map +1 -0
  18. package/lib/commands/generate-arazzo.js +25 -0
  19. package/lib/commands/generate-arazzo.js.map +1 -0
  20. package/lib/commands/join.d.ts +2 -2
  21. package/lib/commands/join.d.ts.map +1 -1
  22. package/lib/commands/join.js +7 -8
  23. package/lib/commands/join.js.map +1 -1
  24. package/lib/commands/lint.d.ts +4 -4
  25. package/lib/commands/lint.d.ts.map +1 -1
  26. package/lib/commands/lint.js +1 -4
  27. package/lib/commands/lint.js.map +1 -1
  28. package/lib/commands/preview-project/index.d.ts +2 -2
  29. package/lib/commands/preview-project/index.d.ts.map +1 -1
  30. package/lib/commands/preview-project/index.js.map +1 -1
  31. package/lib/commands/preview-project/types.d.ts +1 -1
  32. package/lib/commands/preview-project/types.d.ts.map +1 -1
  33. package/lib/commands/respect/display-files-summary-table.d.ts +12 -0
  34. package/lib/commands/respect/display-files-summary-table.d.ts.map +1 -0
  35. package/lib/commands/respect/display-files-summary-table.js +65 -0
  36. package/lib/commands/respect/display-files-summary-table.js.map +1 -0
  37. package/lib/commands/respect/har-logs/har-logs.d.ts +6 -0
  38. package/lib/commands/respect/har-logs/har-logs.d.ts.map +1 -0
  39. package/lib/commands/respect/har-logs/har-logs.js +28 -0
  40. package/lib/commands/respect/har-logs/har-logs.js.map +1 -0
  41. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts +2 -0
  42. package/lib/commands/respect/har-logs/helpers/add-headers.d.ts.map +1 -0
  43. package/lib/commands/respect/har-logs/helpers/add-headers.js +17 -0
  44. package/lib/commands/respect/har-logs/helpers/add-headers.js.map +1 -0
  45. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts +10 -0
  46. package/lib/commands/respect/har-logs/helpers/build-headers.d.ts.map +1 -0
  47. package/lib/commands/respect/har-logs/helpers/build-headers.js +32 -0
  48. package/lib/commands/respect/har-logs/helpers/build-headers.js.map +1 -0
  49. package/lib/commands/respect/har-logs/helpers/build-params.d.ts +2 -0
  50. package/lib/commands/respect/har-logs/helpers/build-params.d.ts.map +1 -0
  51. package/lib/commands/respect/har-logs/helpers/build-params.js +18 -0
  52. package/lib/commands/respect/har-logs/helpers/build-params.js.map +1 -0
  53. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts +2 -0
  54. package/lib/commands/respect/har-logs/helpers/build-request-cookies.d.ts.map +1 -0
  55. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js +18 -0
  56. package/lib/commands/respect/har-logs/helpers/build-request-cookies.js.map +1 -0
  57. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts +2 -0
  58. package/lib/commands/respect/har-logs/helpers/build-response-cookies.d.ts.map +1 -0
  59. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js +40 -0
  60. package/lib/commands/respect/har-logs/helpers/build-response-cookies.js.map +1 -0
  61. package/lib/commands/respect/har-logs/helpers/get-agent.d.ts +2 -0
  62. package/lib/commands/respect/har-logs/helpers/get-agent.d.ts.map +1 -0
  63. package/lib/commands/respect/har-logs/helpers/get-agent.js +89 -0
  64. package/lib/commands/respect/har-logs/helpers/get-agent.js.map +1 -0
  65. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts +2 -0
  66. package/lib/commands/respect/har-logs/helpers/get-duration.d.ts.map +1 -0
  67. package/lib/commands/respect/har-logs/helpers/get-duration.js +6 -0
  68. package/lib/commands/respect/har-logs/helpers/get-duration.js.map +1 -0
  69. package/lib/commands/respect/har-logs/helpers/get-input-url.d.ts +2 -0
  70. package/lib/commands/respect/har-logs/helpers/get-input-url.d.ts.map +1 -0
  71. package/lib/commands/respect/har-logs/helpers/get-input-url.js +5 -0
  72. package/lib/commands/respect/har-logs/helpers/get-input-url.js.map +1 -0
  73. package/lib/commands/respect/har-logs/helpers/handle-request.d.ts +9 -0
  74. package/lib/commands/respect/har-logs/helpers/handle-request.d.ts.map +1 -0
  75. package/lib/commands/respect/har-logs/helpers/handle-request.js +199 -0
  76. package/lib/commands/respect/har-logs/helpers/handle-request.js.map +1 -0
  77. package/lib/commands/respect/har-logs/index.d.ts +2 -0
  78. package/lib/commands/respect/har-logs/index.d.ts.map +1 -0
  79. package/lib/commands/respect/har-logs/index.js +2 -0
  80. package/lib/commands/respect/har-logs/index.js.map +1 -0
  81. package/lib/commands/respect/har-logs/with-har.d.ts +7 -0
  82. package/lib/commands/respect/har-logs/with-har.d.ts.map +1 -0
  83. package/lib/commands/respect/har-logs/with-har.js +188 -0
  84. package/lib/commands/respect/har-logs/with-har.js.map +1 -0
  85. package/lib/commands/respect/index.d.ts +21 -0
  86. package/lib/commands/respect/index.d.ts.map +1 -0
  87. package/lib/commands/respect/index.js +109 -0
  88. package/lib/commands/respect/index.js.map +1 -0
  89. package/lib/commands/respect/json-logs.d.ts +10 -0
  90. package/lib/commands/respect/json-logs.d.ts.map +1 -0
  91. package/lib/commands/respect/json-logs.js +80 -0
  92. package/lib/commands/respect/json-logs.js.map +1 -0
  93. package/lib/commands/respect/mtls/create-mtls-client.d.ts +9 -0
  94. package/lib/commands/respect/mtls/create-mtls-client.d.ts.map +1 -0
  95. package/lib/commands/respect/mtls/create-mtls-client.js +32 -0
  96. package/lib/commands/respect/mtls/create-mtls-client.js.map +1 -0
  97. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts +7 -0
  98. package/lib/commands/respect/mtls/resolve-mtls-certificates.d.ts.map +1 -0
  99. package/lib/commands/respect/mtls/resolve-mtls-certificates.js +45 -0
  100. package/lib/commands/respect/mtls/resolve-mtls-certificates.js.map +1 -0
  101. package/lib/commands/split/index.d.ts +2 -2
  102. package/lib/commands/split/index.d.ts.map +1 -1
  103. package/lib/commands/split/index.js +17 -13
  104. package/lib/commands/split/index.js.map +1 -1
  105. package/lib/commands/split/types.d.ts +4 -23
  106. package/lib/commands/split/types.d.ts.map +1 -1
  107. package/lib/commands/split/types.js +17 -40
  108. package/lib/commands/split/types.js.map +1 -1
  109. package/lib/commands/stats.d.ts +2 -2
  110. package/lib/commands/stats.d.ts.map +1 -1
  111. package/lib/commands/stats.js.map +1 -1
  112. package/lib/commands/translations.d.ts +2 -2
  113. package/lib/commands/translations.d.ts.map +1 -1
  114. package/lib/commands/translations.js.map +1 -1
  115. package/lib/index.js +4 -17
  116. package/lib/index.js.map +1 -1
  117. package/lib/reunite/api/api-client.d.ts.map +1 -1
  118. package/lib/reunite/api/api-client.js +2 -1
  119. package/lib/reunite/api/api-client.js.map +1 -1
  120. package/lib/reunite/commands/push-status.d.ts +2 -2
  121. package/lib/reunite/commands/push-status.d.ts.map +1 -1
  122. package/lib/reunite/commands/push-status.js +1 -2
  123. package/lib/reunite/commands/push-status.js.map +1 -1
  124. package/lib/reunite/commands/push.d.ts +2 -2
  125. package/lib/reunite/commands/push.d.ts.map +1 -1
  126. package/lib/reunite/commands/push.js.map +1 -1
  127. package/lib/types.d.ts +17 -16
  128. package/lib/types.d.ts.map +1 -1
  129. package/lib/types.js +1 -1
  130. package/lib/types.js.map +1 -1
  131. package/lib/utils/constants.d.ts +4 -0
  132. package/lib/utils/constants.d.ts.map +1 -0
  133. package/lib/utils/constants.js +4 -0
  134. package/lib/utils/constants.js.map +1 -0
  135. package/lib/utils/fetch-with-timeout.d.ts +0 -1
  136. package/lib/utils/fetch-with-timeout.d.ts.map +1 -1
  137. package/lib/utils/fetch-with-timeout.js +4 -14
  138. package/lib/utils/fetch-with-timeout.js.map +1 -1
  139. package/lib/utils/miscellaneous.d.ts +9 -9
  140. package/lib/utils/miscellaneous.d.ts.map +1 -1
  141. package/lib/utils/miscellaneous.js +8 -14
  142. package/lib/utils/miscellaneous.js.map +1 -1
  143. package/lib/utils/network-check.d.ts +2 -0
  144. package/lib/utils/network-check.d.ts.map +1 -0
  145. package/lib/utils/network-check.js +12 -0
  146. package/lib/utils/network-check.js.map +1 -0
  147. package/lib/{otel.d.ts → utils/otel.d.ts} +1 -2
  148. package/lib/utils/otel.d.ts.map +1 -0
  149. package/lib/{otel.js → utils/otel.js} +5 -9
  150. package/lib/utils/otel.js.map +1 -0
  151. package/lib/utils/read-env-variables.d.ts +2 -0
  152. package/lib/utils/read-env-variables.d.ts.map +1 -0
  153. package/lib/utils/read-env-variables.js +18 -0
  154. package/lib/utils/read-env-variables.js.map +1 -0
  155. package/lib/utils/telemetry.d.ts +3 -3
  156. package/lib/utils/telemetry.d.ts.map +1 -1
  157. package/lib/utils/telemetry.js +6 -2
  158. package/lib/utils/telemetry.js.map +1 -1
  159. package/lib/utils/update-version-notifier.d.ts.map +1 -1
  160. package/lib/utils/update-version-notifier.js +2 -1
  161. package/lib/utils/update-version-notifier.js.map +1 -1
  162. package/lib/wrapper.d.ts +3 -3
  163. package/lib/wrapper.d.ts.map +1 -1
  164. package/package.json +11 -7
  165. package/lib/otel.d.ts.map +0 -1
  166. package/lib/otel.js.map +0 -1
  167. package/lib/utils/js-utils.d.ts +0 -6
  168. package/lib/utils/js-utils.d.ts.map +0 -1
  169. package/lib/utils/js-utils.js +0 -24
  170. package/lib/utils/js-utils.js.map +0 -1
@@ -0,0 +1,65 @@
1
+ import { green, red, gray, yellow } from 'colorette';
2
+ import * as path from 'node:path';
3
+ import { RESET_ESCAPE_CODE, calculateTotals, } from '@redocly/respect-core';
4
+ export function displayFilesSummaryTable(filesResult, logger) {
5
+ const DEFAULT_FILENAME_PADDING = 40;
6
+ const maxFilenameLength = Math.max(...filesResult.map(({ file }) => path.basename(file).length + DEFAULT_FILENAME_PADDING));
7
+ const columns = [
8
+ { name: 'Filename', width: maxFilenameLength },
9
+ { name: 'Workflows', width: 10 },
10
+ { name: 'Passed', width: 7 },
11
+ { name: 'Failed', width: 7 },
12
+ { name: 'Warnings', width: 8 },
13
+ ];
14
+ let output = '';
15
+ // Top line
16
+ output += `${gray(`┌${columns.map((col) => '─'.repeat(col.width + 2)).join('┬')}┐`)}\n`;
17
+ // Header
18
+ output += `${gray(`│${columns.map((col) => ` ${col.name.padEnd(col.width)} `).join('│')}│`)}\n`;
19
+ // Separator
20
+ output += `${gray(`├${columns.map((col) => '─'.repeat(col.width + 2)).join('┼')}┤`)}\n`;
21
+ // Data rows
22
+ filesResult.forEach(({ file, executedWorkflows: workflows, argv }) => {
23
+ const fileName = path.basename(file);
24
+ const workflowArgv = argv?.workflow || [];
25
+ const skippedWorkflowArgv = argv?.skip || [];
26
+ let executedWorkflows = workflowArgv && workflowArgv.length
27
+ ? workflows.filter(({ workflowId }) => workflowArgv.includes(workflowId))
28
+ : workflows;
29
+ executedWorkflows =
30
+ skippedWorkflowArgv && skippedWorkflowArgv.length
31
+ ? executedWorkflows.filter(({ workflowId }) => !skippedWorkflowArgv.includes(workflowId))
32
+ : executedWorkflows;
33
+ const { workflows: testWorkflows } = calculateTotals(executedWorkflows);
34
+ const total = gray(testWorkflows.total.toString().padEnd(11));
35
+ const passed = green(testWorkflows.passed.toString().padEnd(8));
36
+ const failed = testWorkflows.failed > 0
37
+ ? red(testWorkflows.failed.toString().padEnd(8))
38
+ : gray('-'.padEnd(8));
39
+ const warnings = testWorkflows.warnings > 0
40
+ ? yellow(testWorkflows.warnings.toString().padEnd(9))
41
+ : gray('-'.padEnd(9));
42
+ // First pad the content, then add colors
43
+ const statusSymbol = testWorkflows.failed > 0 ? 'x' : '✓';
44
+ const paddedContent = `${statusSymbol} ${fileName}`.padEnd(maxFilenameLength + 1);
45
+ const fileNameWithStatus = testWorkflows.failed > 0 ? red(paddedContent) : green(paddedContent);
46
+ output +=
47
+ gray('│') +
48
+ ` ${fileNameWithStatus}` +
49
+ gray('│') +
50
+ ` ${total}` +
51
+ gray('│') +
52
+ ` ${passed}` +
53
+ gray('│') +
54
+ ` ${failed}` +
55
+ gray('│') +
56
+ ` ${warnings}` +
57
+ gray('│') +
58
+ '\n';
59
+ });
60
+ // Bottom line
61
+ output += `${gray(`└${columns.map((col) => '─'.repeat(col.width + 2)).join('┴')}┘`)}${RESET_ESCAPE_CODE}\n`;
62
+ // Add a single reset at the very end
63
+ logger.output(output);
64
+ }
65
+ //# sourceMappingURL=display-files-summary-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-files-summary-table.js","sourceRoot":"","sources":["../../../src/commands/respect/display-files-summary-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,UAAU,wBAAwB,CACtC,WAKG,EACH,MAAuB;IAEvB,MAAM,wBAAwB,GAAG,EAAE,CAAC;IACpC,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAChC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,wBAAwB,CAAC,CACxF,CAAC;IAEF,MAAM,OAAO,GAAG;QACd,EAAE,IAAI,EAAE,UAAU,EAAE,KA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ageInfo?: any;
4
+ version?: string;
5
+ }): any;
6
+ //# sourceMappingURL=har-logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"har-logs.d.ts","sourceRoot":"","sources":["../../../../src/commands/respect/har-logs/har-logs.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC1B,EACE,OAAY,EACZ,QAAa,EACb,OAAO,GACR,GAAE;IAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAIrD,GACA,GAAG,CAyBL"}
@@ -0,0 +1,28 @@
1
+ export function createHarLog({ entries = [], pageInfo = {}, version, } = {
2
+ entries: [],
3
+ pageInfo: {},
4
+ version: undefined,
5
+ }) {
6
+ return {
7
+ log: {
8
+ version: '1.2',
9
+ creator: {
10
+ name: '@redocly/respect-core',
11
+ version: version,
12
+ },
13
+ pages: [
14
+ Object.assign({
15
+ startedDateTime: new Date().toISOString(),
16
+ id: 'page_1',
17
+ title: 'Page',
18
+ pageTimings: {
19
+ onContentLoad: -1,
20
+ onLoad: -1,
21
+ },
22
+ }, pageInfo),
23
+ ],
24
+ entries,
25
+ },
26
+ };
27
+ }
28
+ //# sourceMappingURL=har-logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"har-logs.js","sourceRoot":"","sources":["../../../../src/commands/respect/har-logs/har-logs.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAC1B,EACE,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,OAAO,MACkD;IACzD,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,SAAS;CACnB;IAED,OAAO;QACL,GAAG,EAAE;YACH,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,OAAO;aACjB;YACD,KAAK,EAAE;gBACL,MAAM,CAAC,MAAM,CACX;oBACE,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;oBACzC,EAAE,EAAE,QAAQ;oBACZ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE;wBACX,aAAa,EAAE,CAAC,CAAC;wBACjB,MAAM,EAAE,CAAC,CAAC;qBACX;iBACF,EACD,QAAQ,CACT;aACF;YACD,OAAO;SACR;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function addHeaders(oldHeaders: any, newHeaders: any): any;
2
+ //# sourceMappingURL=add-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-headers.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/add-headers.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,GAAG,GAAG,CAahE"}
@@ -0,0 +1,17 @@
1
+ export function addHeaders(oldHeaders, newHeaders) {
2
+ if (!oldHeaders) {
3
+ return newHeaders;
4
+ }
5
+ else if (typeof oldHeaders.set === 'function' && typeof oldHeaders.constructor === 'function') {
6
+ const Headers = oldHeaders.constructor;
7
+ const headers = new Headers(oldHeaders);
8
+ for (const name in newHeaders) {
9
+ headers.set(name, newHeaders[name]);
10
+ }
11
+ return headers;
12
+ }
13
+ else {
14
+ return Object.assign({}, oldHeaders, newHeaders);
15
+ }
16
+ }
17
+ //# sourceMappingURL=add-headers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-headers.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/add-headers.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,UAAe,EAAE,UAAe;IACzD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,UAAU,CAAC;IACpB,CAAC;SAAM,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU,IAAI,OAAO,UAAU,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;QAChG,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;QACxC,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Support the three possible header formats we'd get from a request or
3
+ * response:
4
+ *
5
+ * - A flat array with both names and values: [name, value, name, value, ...]
6
+ * - An object with array values: { name: [value, value] }
7
+ * - An object with string values: { name: value }
8
+ */
9
+ export declare function buildHeaders(headers: any): any[];
10
+ //# sourceMappingURL=build-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-headers.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,CAoBhD"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Support the three possible header formats we'd get from a request or
3
+ * response:
4
+ *
5
+ * - A flat array with both names and values: [name, value, name, value, ...]
6
+ * - An object with array values: { name: [value, value] }
7
+ * - An object with string values: { name: value }
8
+ */
9
+ export function buildHeaders(headers) {
10
+ const list = [];
11
+ if (Array.isArray(headers)) {
12
+ for (let i = 0; i < headers.length; i += 2) {
13
+ list.push({
14
+ name: headers[i],
15
+ value: headers[i + 1],
16
+ });
17
+ }
18
+ }
19
+ else if (headers instanceof Map || headers.entries) {
20
+ // Handle both Map and Headers objects (which have entries())
21
+ for (const [name, value] of headers.entries()) {
22
+ list.push({ name, value });
23
+ }
24
+ }
25
+ else if (typeof headers === 'object') {
26
+ for (const [name, value] of Object.entries(headers)) {
27
+ list.push({ name, value: value });
28
+ }
29
+ }
30
+ return list;
31
+ }
32
+ //# sourceMappingURL=build-headers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-headers.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-headers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAY;IACvC,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC;gBACR,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;gBAChB,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;aACtB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACrD,6DAA6D;QAC7D,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC9C,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YACpD,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAe,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function buildParams(paramString: string): any[];
2
+ //# sourceMappingURL=build-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-params.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-params.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,EAAE,CActD"}
@@ -0,0 +1,18 @@
1
+ import * as querystring from 'querystring';
2
+ export function buildParams(paramString) {
3
+ const params = [];
4
+ const parsed = querystring.parse(paramString);
5
+ for (const name in parsed) {
6
+ const value = parsed[name];
7
+ if (Array.isArray(value)) {
8
+ value.forEach((item) => {
9
+ params.push({ name, value: item });
10
+ });
11
+ }
12
+ else {
13
+ params.push({ name, value });
14
+ }
15
+ }
16
+ return params;
17
+ }
18
+ //# sourceMappingURL=build-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-params.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAE3C,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACrB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function buildRequestCookies(headers: any): any[];
2
+ //# sourceMappingURL=build-request-cookies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-request-cookies.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-request-cookies.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,CAevD"}
@@ -0,0 +1,18 @@
1
+ import * as cookie from 'cookie';
2
+ export function buildRequestCookies(headers) {
3
+ const cookies = [];
4
+ for (const [header, headerValue] of Object.entries(headers)) {
5
+ if (header.toLowerCase() === 'cookie') {
6
+ // Handle both array and single string cases
7
+ const cookieValues = Array.isArray(headerValue) ? headerValue : [headerValue];
8
+ for (const value of cookieValues) {
9
+ const parsed = cookie.parse(value);
10
+ for (const [name, value] of Object.entries(parsed)) {
11
+ cookies.push({ name, value });
12
+ }
13
+ }
14
+ }
15
+ }
16
+ return cookies;
17
+ }
18
+ //# sourceMappingURL=build-request-cookies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-request-cookies.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-request-cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,UAAU,mBAAmB,CAAC,OAAY;IAC9C,MAAM,OAAO,GAAU,EAAE,CAAC;IAC1B,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5D,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE,CAAC;YACtC,4CAA4C;YAC5C,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;YAC9E,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;gBACjC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACnC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;oBACnD,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function buildResponseCookies(headers: any): any[];
2
+ //# sourceMappingURL=build-response-cookies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-response-cookies.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-response-cookies.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,CAsCxD"}
@@ -0,0 +1,40 @@
1
+ import * as setCookie from 'set-cookie-parser';
2
+ export function buildResponseCookies(headers) {
3
+ const cookies = [];
4
+ // Handle both plain objects and Headers instance
5
+ const setCookies = headers instanceof Headers
6
+ ? headers.getSetCookie() // For Headers object
7
+ : headers['set-cookie']; // For plain objects
8
+ if (setCookies) {
9
+ for (const headerValue of setCookies) {
10
+ let parsed;
11
+ try {
12
+ parsed = setCookie.parse(headerValue);
13
+ }
14
+ catch {
15
+ continue;
16
+ }
17
+ for (const cookie of parsed) {
18
+ const { name, value, path, domain, expires, httpOnly, secure } = cookie;
19
+ const harCookie = {
20
+ name,
21
+ value,
22
+ httpOnly: httpOnly || false,
23
+ secure: secure || false,
24
+ };
25
+ if (path) {
26
+ harCookie.path = path;
27
+ }
28
+ if (domain) {
29
+ harCookie.domain = domain;
30
+ }
31
+ if (expires) {
32
+ harCookie.expires = expires.toISOString();
33
+ }
34
+ cookies.push(harCookie);
35
+ }
36
+ }
37
+ }
38
+ return cookies;
39
+ }
40
+ //# sourceMappingURL=build-response-cookies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-response-cookies.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/build-response-cookies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,oBAAoB,CAAC,OAAY;IAC/C,MAAM,OAAO,GAAU,EAAE,CAAC;IAC1B,iDAAiD;IACjD,MAAM,UAAU,GACd,OAAO,YAAY,OAAO;QACxB,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,qBAAqB;QAC9C,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,oBAAoB;IAEjD,IAAI,UAAU,EAAE,CAAC;QACf,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE,CAAC;YACrC,IAAI,MAAM,CAAC;YACX,IAAI,CAAC;gBACH,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACxC,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;YACD,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;gBAC5B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;gBACxE,MAAM,SAAS,GAAQ;oBACrB,IAAI;oBACJ,KAAK;oBACL,QAAQ,EAAE,QAAQ,IAAI,KAAK;oBAC3B,MAAM,EAAE,MAAM,IAAI,KAAK;iBACxB,CAAC;gBACF,IAAI,IAAI,EAAE,CAAC;oBACT,SAAS,CAAC,IAAI,GAAG,IAA0B,CAAC;gBAC9C,CAAC;gBACD,IAAI,MAAM,EAAE,CAAC;oBACX,SAAS,CAAC,MAAM,GAAG,MAA4B,CAAC;gBAClD,CAAC;gBACD,IAAI,OAAO,EAAE,CAAC;oBACZ,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;gBAC5C,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getAgent(input: any, options: any): any;
2
+ //# sourceMappingURL=get-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-agent.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-agent.ts"],"names":[],"mappings":"AAyBA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,GAAG,CA0BtD"}
@@ -0,0 +1,89 @@
1
+ import * as http from 'http';
2
+ import * as https from 'https';
3
+ import { Dispatcher } from 'undici';
4
+ import { getInputUrl } from './get-input-url.js';
5
+ import { handleRequest } from './handle-request.js';
6
+ const HarHttpAgent = createAgentClass(http.Agent);
7
+ const HarHttpsAgent = createAgentClass(https.Agent);
8
+ let globalHttpAgent;
9
+ let globalHttpsAgent;
10
+ // Add new Undici dispatcher
11
+ class HarDispatcher extends Dispatcher {
12
+ constructor(opts) {
13
+ super(opts);
14
+ }
15
+ dispatch(options, handler) {
16
+ // Handle HAR logging here similar to handleRequest
17
+ handleRequest({ input: options, handler, harLog: new Map(), isUndici: true });
18
+ return super.dispatch(options, handler);
19
+ }
20
+ }
21
+ export function getAgent(input, options) {
22
+ // Add Undici dispatcher support
23
+ if (options.dispatcher) {
24
+ if (options.dispatcher instanceof Dispatcher) {
25
+ return new HarDispatcher(options.dispatcher);
26
+ }
27
+ return options.dispatcher;
28
+ }
29
+ if (options.agent) {
30
+ if (typeof options.agent === 'function') {
31
+ return function (...args) {
32
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
33
+ // @ts-ignore
34
+ const agent = options.agent.call(this, ...args);
35
+ if (agent) {
36
+ instrumentAgentInstance(agent);
37
+ return agent;
38
+ }
39
+ return getGlobalAgent(input);
40
+ };
41
+ }
42
+ instrumentAgentInstance(options.agent);
43
+ return options.agent;
44
+ }
45
+ return getGlobalAgent(input);
46
+ }
47
+ function getGlobalAgent(input) {
48
+ const url = getInputUrl(input);
49
+ if (url.protocol === 'http:') {
50
+ if (!globalHttpAgent) {
51
+ globalHttpAgent = new HarHttpAgent();
52
+ }
53
+ return globalHttpAgent;
54
+ }
55
+ if (!globalHttpsAgent) {
56
+ globalHttpsAgent = new HarHttpsAgent();
57
+ }
58
+ return globalHttpsAgent;
59
+ }
60
+ /**
61
+ * Instrument an existing Agent instance. This overrides the instance's
62
+ * `addRequest` method. It should be fine to continue using for requests made
63
+ * without `withHar` - if the request doesn't have our `x-har-request-id`
64
+ * header, it won't do anything extra.
65
+ */
66
+ function instrumentAgentInstance(agent) {
67
+ const { addRequest: originalAddRequest } = agent;
68
+ if (!originalAddRequest.isHarEnabled) {
69
+ agent.addRequest = function addRequest(request, ...args) {
70
+ handleRequest(request, ...args);
71
+ return originalAddRequest.call(this, request, ...args);
72
+ };
73
+ agent.addRequest.isHarEnabled = true;
74
+ }
75
+ }
76
+ function createAgentClass(BaseAgent) {
77
+ class HarAgent extends BaseAgent {
78
+ constructor(...args) {
79
+ super(...args);
80
+ this.addRequest.isHarEnabled = true;
81
+ }
82
+ addRequest(request, ...args) {
83
+ handleRequest(request, ...args);
84
+ return super.addRequest(request, ...args);
85
+ }
86
+ }
87
+ return HarAgent;
88
+ }
89
+ //# sourceMappingURL=get-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-agent.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,M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K,CAAC,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;IACvC,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,SAAc;IACtC,MAAM,QAAS,SAAQ,SAAS;QAC9B,YAAY,GAAG,IAAW;YACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YACd,IAAI,CAAC,UAAkB,CAAC,YAAY,GAAG,IAAI,CAAC;QAC/C,CAAC;QAED,UAAU,CAAC,OAAY,EAAE,GAAG,IAAQ;YAClC,aAAa,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;YAChC,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QAC5C,CAAC;KACF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getDuration(a: [number, number], b: [number, number]): number;
2
+ //# sourceMappingURL=get-duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-duration.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-duration.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAI5E"}
@@ -0,0 +1,6 @@
1
+ export function getDuration(a, b) {
2
+ const seconds = b[0] - a[0];
3
+ const nanoseconds = b[1] - a[1];
4
+ return seconds * 1000 + nanoseconds / 1e6;
5
+ }
6
+ //# sourceMappingURL=get-duration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-duration.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-duration.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,CAAmB,EAAE,CAAmB;IAClE,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,OAAO,OAAO,GAAG,IAAI,GAAG,WAAW,GAAG,GAAG,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getInputUrl(input: any): URL;
2
+ //# sourceMappingURL=get-input-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-input-url.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-input-url.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAG3C"}
@@ -0,0 +1,5 @@
1
+ export function getInputUrl(input) {
2
+ const url = typeof input === 'string' ? input : input.url;
3
+ return new URL(url);
4
+ }
5
+ //# sourceMappingURL=get-input-url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-input-url.js","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/get-input-url.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IAC1D,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Dispatcher } from 'undici';
2
+ import type { Har } from 'har-format';
3
+ export declare function handleRequest({ input, handler, harLog, isUndici, }: {
4
+ input: Request | Dispatcher.DispatchOptions;
5
+ handler: Dispatcher.DispatchHandlers | NodeJS.EventEmitter;
6
+ harLog?: Map<string, Har>;
7
+ isUndici?: boolean;
8
+ }): Dispatcher.DispatchHandlers | NodeJS.EventEmitter;
9
+ //# sourceMappingURL=handle-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-request.d.ts","sourceRoot":"","sources":["../../../../../src/commands/respect/har-logs/helpers/handle-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,GAAG,EAAS,MAAM,YAAY,CAAC;AAW7C,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC;IAC5C,OAAO,EAAE,UAAU,CAAC,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC;IAC3D,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,UAAU,CAAC,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAWpD"}