@apiquest/fracture 1.0.2 → 1.0.4

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/README.md +119 -0
  2. package/bin/cli.js +2 -2
  3. package/dist/CollectionRunner.js +3 -3
  4. package/dist/ScriptEngine.js +4 -4
  5. package/dist/cli/plugin-commands.d.ts.map +1 -1
  6. package/dist/cli/plugin-commands.js +2 -1
  7. package/dist/cli/plugin-commands.js.map +1 -1
  8. package/package.json +55 -50
  9. package/src/CollectionAnalyzer.ts +102 -102
  10. package/src/CollectionRunner.ts +1423 -1423
  11. package/src/CollectionRunner.types.ts +9 -9
  12. package/src/CollectionValidator.ts +289 -289
  13. package/src/ConsoleReporter.ts +143 -143
  14. package/src/CookieJar.ts +258 -258
  15. package/src/DagScheduler.ts +439 -439
  16. package/src/Logger.ts +85 -85
  17. package/src/PluginLoader.ts +126 -126
  18. package/src/PluginManager.ts +208 -208
  19. package/src/PluginResolver.ts +154 -154
  20. package/src/QuestAPI.ts +764 -764
  21. package/src/QuestAPI.types.ts +33 -33
  22. package/src/QuestTestAPI.ts +164 -164
  23. package/src/RequestFilter.ts +224 -224
  24. package/src/ScriptEngine.ts +219 -219
  25. package/src/ScriptValidator.ts +428 -428
  26. package/src/TaskGraph.ts +598 -598
  27. package/src/TestCounter.ts +109 -109
  28. package/src/VariableResolver.ts +114 -114
  29. package/src/cli/index.ts +480 -480
  30. package/src/cli/plugin-commands.ts +342 -341
  31. package/src/cli/plugin-discovery.ts +44 -44
  32. package/src/index.ts +24 -24
  33. package/src/utils.ts +52 -52
  34. package/tsconfig.json +20 -20
  35. package/tsconfig.test.json +5 -5
  36. package/vitest.config.ts +22 -22
  37. package/dist/ExecutionTree.d.ts +0 -77
  38. package/dist/ExecutionTree.d.ts.map +0 -1
  39. package/dist/ExecutionTree.js +0 -265
  40. package/dist/ExecutionTree.js.map +0 -1
  41. package/dist/fracture/src/CollectionAnalyzer.d.ts +0 -17
  42. package/dist/fracture/src/CollectionAnalyzer.d.ts.map +0 -1
  43. package/dist/fracture/src/CollectionAnalyzer.js +0 -70
  44. package/dist/fracture/src/CollectionAnalyzer.js.map +0 -1
  45. package/dist/fracture/src/CollectionRunner.d.ts +0 -39
  46. package/dist/fracture/src/CollectionRunner.d.ts.map +0 -1
  47. package/dist/fracture/src/CollectionRunner.js +0 -802
  48. package/dist/fracture/src/CollectionRunner.js.map +0 -1
  49. package/dist/fracture/src/CollectionRunner.types.d.ts +0 -8
  50. package/dist/fracture/src/CollectionRunner.types.d.ts.map +0 -1
  51. package/dist/fracture/src/CollectionRunner.types.js +0 -2
  52. package/dist/fracture/src/CollectionRunner.types.js.map +0 -1
  53. package/dist/fracture/src/CollectionValidator.d.ts +0 -14
  54. package/dist/fracture/src/CollectionValidator.d.ts.map +0 -1
  55. package/dist/fracture/src/CollectionValidator.js +0 -145
  56. package/dist/fracture/src/CollectionValidator.js.map +0 -1
  57. package/dist/fracture/src/ConsoleReporter.d.ts +0 -24
  58. package/dist/fracture/src/ConsoleReporter.d.ts.map +0 -1
  59. package/dist/fracture/src/ConsoleReporter.js +0 -123
  60. package/dist/fracture/src/ConsoleReporter.js.map +0 -1
  61. package/dist/fracture/src/CookieJar.d.ts +0 -70
  62. package/dist/fracture/src/CookieJar.d.ts.map +0 -1
  63. package/dist/fracture/src/CookieJar.js +0 -233
  64. package/dist/fracture/src/CookieJar.js.map +0 -1
  65. package/dist/fracture/src/ExecutionTree.d.ts +0 -77
  66. package/dist/fracture/src/ExecutionTree.d.ts.map +0 -1
  67. package/dist/fracture/src/ExecutionTree.js +0 -258
  68. package/dist/fracture/src/ExecutionTree.js.map +0 -1
  69. package/dist/fracture/src/Logger.d.ts +0 -25
  70. package/dist/fracture/src/Logger.d.ts.map +0 -1
  71. package/dist/fracture/src/Logger.js +0 -78
  72. package/dist/fracture/src/Logger.js.map +0 -1
  73. package/dist/fracture/src/PluginLoader.d.ts +0 -23
  74. package/dist/fracture/src/PluginLoader.d.ts.map +0 -1
  75. package/dist/fracture/src/PluginLoader.js +0 -102
  76. package/dist/fracture/src/PluginLoader.js.map +0 -1
  77. package/dist/fracture/src/PluginManager.d.ts +0 -64
  78. package/dist/fracture/src/PluginManager.d.ts.map +0 -1
  79. package/dist/fracture/src/PluginManager.js +0 -162
  80. package/dist/fracture/src/PluginManager.js.map +0 -1
  81. package/dist/fracture/src/PluginResolver.d.ts +0 -35
  82. package/dist/fracture/src/PluginResolver.d.ts.map +0 -1
  83. package/dist/fracture/src/PluginResolver.js +0 -128
  84. package/dist/fracture/src/PluginResolver.js.map +0 -1
  85. package/dist/fracture/src/QuestAPI.d.ts +0 -9
  86. package/dist/fracture/src/QuestAPI.d.ts.map +0 -1
  87. package/dist/fracture/src/QuestAPI.js +0 -679
  88. package/dist/fracture/src/QuestAPI.js.map +0 -1
  89. package/dist/fracture/src/QuestAPI.types.d.ts +0 -35
  90. package/dist/fracture/src/QuestAPI.types.d.ts.map +0 -1
  91. package/dist/fracture/src/QuestAPI.types.js +0 -3
  92. package/dist/fracture/src/QuestAPI.types.js.map +0 -1
  93. package/dist/fracture/src/QuestTestAPI.d.ts +0 -12
  94. package/dist/fracture/src/QuestTestAPI.d.ts.map +0 -1
  95. package/dist/fracture/src/QuestTestAPI.js +0 -133
  96. package/dist/fracture/src/QuestTestAPI.js.map +0 -1
  97. package/dist/fracture/src/ScriptEngine.d.ts +0 -21
  98. package/dist/fracture/src/ScriptEngine.d.ts.map +0 -1
  99. package/dist/fracture/src/ScriptEngine.js +0 -183
  100. package/dist/fracture/src/ScriptEngine.js.map +0 -1
  101. package/dist/fracture/src/ScriptValidator.d.ts +0 -68
  102. package/dist/fracture/src/ScriptValidator.d.ts.map +0 -1
  103. package/dist/fracture/src/ScriptValidator.js +0 -351
  104. package/dist/fracture/src/ScriptValidator.js.map +0 -1
  105. package/dist/fracture/src/TestCounter.d.ts +0 -18
  106. package/dist/fracture/src/TestCounter.d.ts.map +0 -1
  107. package/dist/fracture/src/TestCounter.js +0 -82
  108. package/dist/fracture/src/TestCounter.js.map +0 -1
  109. package/dist/fracture/src/VariableResolver.d.ts +0 -20
  110. package/dist/fracture/src/VariableResolver.d.ts.map +0 -1
  111. package/dist/fracture/src/VariableResolver.js +0 -100
  112. package/dist/fracture/src/VariableResolver.js.map +0 -1
  113. package/dist/fracture/src/cli/index.d.ts +0 -3
  114. package/dist/fracture/src/cli/index.d.ts.map +0 -1
  115. package/dist/fracture/src/cli/index.js +0 -347
  116. package/dist/fracture/src/cli/index.js.map +0 -1
  117. package/dist/fracture/src/cli/plugin-commands.d.ts +0 -6
  118. package/dist/fracture/src/cli/plugin-commands.d.ts.map +0 -1
  119. package/dist/fracture/src/cli/plugin-commands.js +0 -263
  120. package/dist/fracture/src/cli/plugin-commands.js.map +0 -1
  121. package/dist/fracture/src/cli/plugin-discovery.d.ts +0 -11
  122. package/dist/fracture/src/cli/plugin-discovery.d.ts.map +0 -1
  123. package/dist/fracture/src/cli/plugin-discovery.js +0 -64
  124. package/dist/fracture/src/cli/plugin-discovery.js.map +0 -1
  125. package/dist/fracture/src/index.d.ts +0 -13
  126. package/dist/fracture/src/index.d.ts.map +0 -1
  127. package/dist/fracture/src/index.js +0 -17
  128. package/dist/fracture/src/index.js.map +0 -1
  129. package/dist/fracture/src/utils.d.ts +0 -28
  130. package/dist/fracture/src/utils.d.ts.map +0 -1
  131. package/dist/fracture/src/utils.js +0 -48
  132. package/dist/fracture/src/utils.js.map +0 -1
  133. package/dist/plugin-auth/src/apikey-auth.d.ts +0 -3
  134. package/dist/plugin-auth/src/apikey-auth.d.ts.map +0 -1
  135. package/dist/plugin-auth/src/apikey-auth.js +0 -73
  136. package/dist/plugin-auth/src/apikey-auth.js.map +0 -1
  137. package/dist/plugin-auth/src/basic-auth.d.ts +0 -3
  138. package/dist/plugin-auth/src/basic-auth.d.ts.map +0 -1
  139. package/dist/plugin-auth/src/basic-auth.js +0 -61
  140. package/dist/plugin-auth/src/basic-auth.js.map +0 -1
  141. package/dist/plugin-auth/src/bearer-auth.d.ts +0 -3
  142. package/dist/plugin-auth/src/bearer-auth.d.ts.map +0 -1
  143. package/dist/plugin-auth/src/bearer-auth.js +0 -49
  144. package/dist/plugin-auth/src/bearer-auth.js.map +0 -1
  145. package/dist/plugin-auth/src/helpers.d.ts +0 -3
  146. package/dist/plugin-auth/src/helpers.d.ts.map +0 -1
  147. package/dist/plugin-auth/src/helpers.js +0 -8
  148. package/dist/plugin-auth/src/helpers.js.map +0 -1
  149. package/dist/plugin-auth/src/index.d.ts +0 -10
  150. package/dist/plugin-auth/src/index.d.ts.map +0 -1
  151. package/dist/plugin-auth/src/index.js +0 -25
  152. package/dist/plugin-auth/src/index.js.map +0 -1
  153. package/dist/plugin-auth/src/oauth2-auth.d.ts +0 -35
  154. package/dist/plugin-auth/src/oauth2-auth.d.ts.map +0 -1
  155. package/dist/plugin-auth/src/oauth2-auth.js +0 -266
  156. package/dist/plugin-auth/src/oauth2-auth.js.map +0 -1
  157. package/dist/plugin-http/src/index.d.ts +0 -4
  158. package/dist/plugin-http/src/index.d.ts.map +0 -1
  159. package/dist/plugin-http/src/index.js +0 -266
  160. package/dist/plugin-http/src/index.js.map +0 -1
  161. package/dist/plugin-vault-file/src/index.d.ts +0 -67
  162. package/dist/plugin-vault-file/src/index.d.ts.map +0 -1
  163. package/dist/plugin-vault-file/src/index.js +0 -171
  164. package/dist/plugin-vault-file/src/index.js.map +0 -1
  165. package/dist/types.d.ts +0 -374
  166. package/dist/types.d.ts.map +0 -1
  167. package/dist/types.js +0 -13
  168. package/dist/types.js.map +0 -1
@@ -1,233 +0,0 @@
1
- /**
2
- * CookieJar using tough-cookie library for RFC-compliant cookie handling
3
- */
4
- import { CookieJar as ToughCookieJar, Cookie } from 'tough-cookie';
5
- /**
6
- * CookieJar implementation using tough-cookie for production-quality cookie management.
7
- * Wraps tough-cookie's CookieJar to provide ICookieJar interface.
8
- */
9
- export class CookieJar {
10
- jar;
11
- options;
12
- constructor(options) {
13
- this.options = options ?? { persist: false };
14
- this.jar = new ToughCookieJar();
15
- }
16
- /**
17
- * Store cookies from Set-Cookie headers
18
- * @param setCookieHeaders - Single header string or array of header strings
19
- * @param requestUrl - URL the cookies came from (REQUIRED for domain/path matching)
20
- */
21
- store(setCookieHeaders, requestUrl) {
22
- if (setCookieHeaders === null || setCookieHeaders === undefined) {
23
- return;
24
- }
25
- const headers = Array.isArray(setCookieHeaders) ? setCookieHeaders : [setCookieHeaders];
26
- for (const header of headers) {
27
- try {
28
- this.jar.setCookieSync(header, requestUrl);
29
- }
30
- catch (error) {
31
- // Ignore invalid cookies (tough-cookie throws on malformed cookies)
32
- // Silent failure is fine here
33
- }
34
- }
35
- }
36
- /**
37
- * Get cookie value by name
38
- * When called without domain, searches ALL cookies (across all domains)
39
- *
40
- * @param name - Cookie name
41
- * @param domain - Optional domain to filter (not commonly used)
42
- * @param path - Optional path to filter (not commonly used)
43
- * @returns Cookie value or null if not found
44
- */
45
- get(name, domain, path) {
46
- // Use toJSON to get ALL cookies, then manually filter for expiration only
47
- const allCookiesJson = this.jar.toJSON();
48
- if (allCookiesJson?.cookies === undefined) {
49
- return null;
50
- }
51
- // Search for cookie by name
52
- for (const cookieData of allCookiesJson.cookies) {
53
- // Use Cookie.fromJSON for proper typing
54
- const cookie = Cookie.fromJSON(cookieData);
55
- if (cookie === null || cookie === undefined) {
56
- continue;
57
- }
58
- if (cookie.key !== name) {
59
- continue;
60
- }
61
- // Check expiration
62
- const expiryTime = cookie.expiryTime();
63
- if (expiryTime !== null && expiryTime !== undefined && expiryTime < Date.now()) {
64
- continue; // Skip expired cookies
65
- }
66
- // If domain filter specified, check it
67
- if (domain !== null && domain !== undefined && domain !== '') {
68
- if (cookie.domain === null) {
69
- continue;
70
- }
71
- if (cookie.domain !== domain && !cookie.domain.endsWith(domain)) {
72
- continue;
73
- }
74
- }
75
- // If path filter specified, check it
76
- if (path !== null && path !== undefined && path !== '') {
77
- if (cookie.path === null || cookie.path !== path) {
78
- continue;
79
- }
80
- }
81
- return cookie.value;
82
- }
83
- return null;
84
- }
85
- /**
86
- * Check if cookie exists
87
- * @param name - Cookie name
88
- * @param domain - Optional domain filter
89
- * @param path - Optional path filter
90
- * @returns true if cookie exists
91
- */
92
- has(name, domain, path) {
93
- return this.get(name, domain, path) !== null;
94
- }
95
- /**
96
- * Remove a cookie by name
97
- * @param name - Cookie name
98
- * @param domain - Optional domain
99
- * @param path - Optional path
100
- */
101
- remove(name, domain, path) {
102
- const allCookiesJson = this.jar.toJSON();
103
- if (allCookiesJson?.cookies === undefined) {
104
- return;
105
- }
106
- // Find matching cookies using Cookie.fromJSON for proper typing
107
- const cookiesToRemove = [];
108
- for (const cookieData of allCookiesJson.cookies) {
109
- const cookie = Cookie.fromJSON(cookieData);
110
- if (cookie === null || cookie === undefined) {
111
- continue;
112
- }
113
- if (cookie.key !== name) {
114
- continue;
115
- }
116
- // Check domain filter
117
- if (domain !== null && domain !== undefined && domain !== '') {
118
- if (cookie.domain === null) {
119
- continue;
120
- }
121
- if (cookie.domain !== domain && !cookie.domain.endsWith(domain)) {
122
- continue;
123
- }
124
- }
125
- // Check path filter
126
- if (path !== null && path !== undefined && path !== '') {
127
- if (cookie.path === null || cookie.path !== path) {
128
- continue;
129
- }
130
- }
131
- cookiesToRemove.push(cookie);
132
- }
133
- // Remove each matching cookie
134
- for (const cookie of cookiesToRemove) {
135
- // Domain should always be present in cookies from tough-cookie
136
- const cookieDomain = cookie.domain;
137
- if (cookieDomain === null || cookieDomain === undefined) {
138
- continue; // Skip cookies without domain
139
- }
140
- const cookiePath = cookie.path ?? '/';
141
- try {
142
- this.jar.store.removeCookie(cookieDomain, cookiePath, cookie.key, () => {
143
- // Callback required by tough-cookie API
144
- });
145
- }
146
- catch {
147
- // Ignore errors
148
- }
149
- }
150
- }
151
- /**
152
- * Set a cookie manually
153
- * Constructs URL from cookie's domain for RFC 6265 validation
154
- * @param name - Cookie name
155
- * @param value - Cookie value
156
- * @param options - Cookie options
157
- */
158
- set(name, value, options) {
159
- let cookieStr = `${name}=${value}; Domain=${options.domain}; Path=${options.path ?? '/'}`;
160
- if (options.expires !== null && options.expires !== undefined) {
161
- cookieStr += `; Expires=${options.expires}`;
162
- }
163
- if (options.httpOnly === true) {
164
- cookieStr += '; HttpOnly';
165
- }
166
- if (options.secure === true) {
167
- cookieStr += '; Secure';
168
- }
169
- if (options.sameSite !== null && options.sameSite !== undefined) {
170
- cookieStr += `; SameSite=${options.sameSite}`;
171
- }
172
- const protocol = options.secure === true ? 'https' : 'http';
173
- const url = `${protocol}://${options.domain}${options.path ?? '/'}`;
174
- this.jar.setCookieSync(cookieStr, url);
175
- }
176
- /**
177
- * Clear all cookies
178
- */
179
- clear() {
180
- this.jar.removeAllCookiesSync();
181
- }
182
- /**
183
- * Get all cookies as an object
184
- * Returns non-expired cookies from ALL domains
185
- * @returns Object with cookie names as keys and values
186
- */
187
- toObject() {
188
- const result = {};
189
- // Use toJSON to get all cookies, filter expired manually
190
- const allCookiesJson = this.jar.toJSON();
191
- if (allCookiesJson?.cookies === undefined) {
192
- return result;
193
- }
194
- // Add all non-expired cookies
195
- for (const cookieData of allCookiesJson.cookies) {
196
- try {
197
- const cookie = Cookie.fromJSON(cookieData);
198
- if (cookie === null || cookie === undefined) {
199
- continue;
200
- }
201
- const expiryTime = cookie.expiryTime();
202
- // Not expired if: no expiry time OR expiry time is in the future
203
- const isExpired = expiryTime !== null && expiryTime !== undefined && expiryTime < Date.now();
204
- if (!isExpired) {
205
- result[cookie.key] = cookie.value;
206
- }
207
- }
208
- catch {
209
- // Skip cookies that can't be parsed
210
- }
211
- }
212
- return result;
213
- }
214
- /**
215
- * Get Cookie header string for a URL
216
- * This is the main method used by HTTP plugin to send cookies with requests
217
- * @param url - URL to get cookies for
218
- * @returns Cookie header string in "name1=value1; name2=value2" format, or null if no cookies
219
- */
220
- getCookieHeader(url) {
221
- try {
222
- const cookieString = this.jar.getCookieStringSync(url);
223
- if (cookieString === null || cookieString === undefined || cookieString === '') {
224
- return null;
225
- }
226
- return cookieString;
227
- }
228
- catch {
229
- return null;
230
- }
231
- }
232
- }
233
- //# sourceMappingURL=CookieJar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CookieJar.js","sourceRoot":"","sources":["../../../src/CookieJar.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGnE;;;GAGG;AACH,MAAM,OAAO,SAAS;IACZ,GAAG,CAAiB;IACpB,OAAO,CAAmB;IAElC,YAAY,OAA0B;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC7C,IAAI,CAAC,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,gBAAsD,EAAE,UAAkB;QAC9E,IAAI,gBAAgB,KAAK,IAAI,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YAChE,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;QAExF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC;gBACH,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YAC7C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,oEAAoE;gBACpE,8BAA8B;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACH,GAAG,CAAC,IAAY,EAAE,MAAe,EAAE,IAAa;QAC9C,0EAA0E;QAC1E,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;QACzC,IAAI,cAAc,EAAE,OAAO,KAAK,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AAS,EAAE,CAAC;oBACf,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;gBACpC,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,oCAAoC;YACtC,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,GAAW;QACzB,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;YACvD,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,EAAE,EAAE,CAAC;gBAC/E,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,YAAY,CAAC;QACtB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -1,77 +0,0 @@
1
- import type { Collection, Folder, Request, IterationData, ILogger, PathType, NodeType, Auth } from '@apiquest/types';
2
- /**
3
- * Represents a node in the collection tree
4
- * - Tree structure: parent/children for hierarchical organization
5
- * - Graph structure: dependencies for execution order
6
- */
7
- export declare class ExecutionNode {
8
- id: string;
9
- name: string;
10
- type: NodeType;
11
- item: Collection | Folder | Request;
12
- parent: ExecutionNode | null;
13
- children: ExecutionNode[];
14
- depth: number;
15
- path: PathType;
16
- /**
17
- * Scripts inherited from parent chain
18
- * Accumulated during tree construction for efficient execution
19
- */
20
- inheritedScripts: {
21
- collectionPre?: string;
22
- collectionPost?: string;
23
- folderPre?: string[];
24
- folderPost?: string[];
25
- preRequest?: string[];
26
- postRequest?: string[];
27
- };
28
- /**
29
- * Effective auth for this node (cascades from parents)
30
- * Request auth > Folder auth > Parent folder auth > Collection auth
31
- */
32
- effectiveAuth?: Auth;
33
- condition?: string;
34
- dependsOn: string[];
35
- constructor(type: NodeType, item: Collection | Folder | Request, parent: ExecutionNode | null);
36
- /**
37
- * Accumulate scripts from parent chain
38
- * All scripts stack (collected from parents during tree construction)
39
- */
40
- private inheritScripts;
41
- /**
42
- * Cascade auth from parent chain
43
- * Child auth overrides parent auth
44
- */
45
- private inheritAuth;
46
- addChild(child: ExecutionNode): void;
47
- }
48
- /**
49
- * Builds execution tree from collection JSON
50
- * Handles CLI --data override at construction time
51
- */
52
- export declare class TreeBuilder {
53
- private cliData;
54
- private logger;
55
- constructor(cliData?: IterationData[], logger?: ILogger);
56
- build(collection: Collection): ExecutionNode;
57
- private buildChildren;
58
- private countNodes;
59
- }
60
- /**
61
- * Dependency graph for request execution order
62
- * Flattens tree to request nodes only, topologically sorted by dependencies
63
- */
64
- export declare class DependencyGraph {
65
- private nodes;
66
- private edges;
67
- constructor(root: ExecutionNode);
68
- private buildGraph;
69
- /**
70
- * Topological sort: returns requests grouped by execution level
71
- * Requests in same level can execute in parallel
72
- */
73
- getExecutionLevels(): string[][];
74
- getNode(id: string): ExecutionNode | undefined;
75
- canRunInParallel(idA: string, idB: string): boolean;
76
- }
77
- //# sourceMappingURL=ExecutionTree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionTree.d.ts","sourceRoot":"","sources":["../../../src/ExecutionTree.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAkB,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKrI;;;;GAIG;AACH,qBAAa,aAAa;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IAEpC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;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,GAAG,EAAE,MAAM,GAAG,OAAO;CAMpD"}
@@ -1,258 +0,0 @@
1
- // Execution Tree & Dependency Graph
2
- // Separates collection structure (tree) from execution order (graph)
3
- import { LogLevel } from '@apiquest/types';
4
- import { Logger } from './Logger.js';
5
- import { isNullOrEmpty, isValidAuth } from './utils.js';
6
- /**
7
- * Represents a node in the collection tree
8
- * - Tree structure: parent/children for hierarchical organization
9
- * - Graph structure: dependencies for execution order
10
- */
11
- export class ExecutionNode {
12
- id;
13
- name;
14
- type;
15
- item;
16
- parent;
17
- children;
18
- depth;
19
- path;
20
- /**
21
- * Scripts inherited from parent chain
22
- * Accumulated during tree construction for efficient execution
23
- */
24
- inheritedScripts;
25
- /**
26
- * Effective auth for this node (cascades from parents)
27
- * Request auth > Folder auth > Parent folder auth > Collection auth
28
- */
29
- effectiveAuth;
30
- // Execution control (requests only)
31
- condition;
32
- dependsOn;
33
- constructor(type, item, parent) {
34
- this.type = type;
35
- this.item = item;
36
- this.parent = parent;
37
- this.children = [];
38
- this.depth = parent !== null ? parent.depth + 1 : 0;
39
- this.dependsOn = [];
40
- this.inheritedScripts = {};
41
- // Set ID and name
42
- if (type === 'collection') {
43
- this.id = item.info.id;
44
- this.name = item.info.name;
45
- }
46
- else {
47
- this.id = item.id;
48
- this.name = item.name;
49
- }
50
- // Build path using PathType format
51
- if (type === 'collection') {
52
- this.path = 'collection:/';
53
- }
54
- else if (parent?.type === 'collection') {
55
- // Direct child of collection
56
- this.path = `${type}:/${this.name}`;
57
- }
58
- else if (parent !== null) {
59
- // Nested within folders
60
- const basePath = parent.path.replace(/^(folder|request):\//, '');
61
- this.path = `${type}:/${basePath}/${this.name}`;
62
- }
63
- else {
64
- // Fallback (shouldn't happen)
65
- this.path = 'collection:/';
66
- }
67
- // Extract condition and dependencies (for requests)
68
- if (type === 'request') {
69
- const req = item;
70
- this.condition = req.condition;
71
- this.dependsOn = req.dependsOn ?? [];
72
- }
73
- this.inheritScripts();
74
- this.inheritAuth();
75
- }
76
- /**
77
- * Accumulate scripts from parent chain
78
- * All scripts stack (collected from parents during tree construction)
79
- */
80
- inheritScripts() {
81
- if (this.parent === null)
82
- return;
83
- this.inheritedScripts = {
84
- collectionPre: this.parent.inheritedScripts.collectionPre,
85
- collectionPost: this.parent.inheritedScripts.collectionPost,
86
- folderPre: this.parent.inheritedScripts.folderPre !== undefined ? [...this.parent.inheritedScripts.folderPre] : undefined,
87
- folderPost: this.parent.inheritedScripts.folderPost !== undefined ? [...this.parent.inheritedScripts.folderPost] : undefined,
88
- preRequest: this.parent.inheritedScripts.preRequest !== undefined ? [...this.parent.inheritedScripts.preRequest] : undefined,
89
- postRequest: this.parent.inheritedScripts.postRequest !== undefined ? [...this.parent.inheritedScripts.postRequest] : undefined
90
- };
91
- const parentItem = this.parent.item;
92
- if (this.parent.type === 'collection') {
93
- const coll = parentItem;
94
- if (!isNullOrEmpty(coll.collectionPreScript)) {
95
- this.inheritedScripts.collectionPre = coll.collectionPreScript;
96
- }
97
- if (!isNullOrEmpty(coll.collectionPostScript)) {
98
- this.inheritedScripts.collectionPost = coll.collectionPostScript;
99
- }
100
- if (!isNullOrEmpty(coll.preRequestScript)) {
101
- this.inheritedScripts.preRequest = this.inheritedScripts.preRequest ?? [];
102
- this.inheritedScripts.preRequest.push(coll.preRequestScript);
103
- }
104
- if (!isNullOrEmpty(coll.postRequestScript)) {
105
- this.inheritedScripts.postRequest = this.inheritedScripts.postRequest ?? [];
106
- this.inheritedScripts.postRequest.unshift(coll.postRequestScript);
107
- }
108
- }
109
- if (this.parent.type === 'folder') {
110
- const folder = parentItem;
111
- if (!isNullOrEmpty(folder.folderPreScript)) {
112
- this.inheritedScripts.folderPre = this.inheritedScripts.folderPre ?? [];
113
- this.inheritedScripts.folderPre.push(folder.folderPreScript);
114
- }
115
- if (!isNullOrEmpty(folder.folderPostScript)) {
116
- this.inheritedScripts.folderPost = this.inheritedScripts.folderPost ?? [];
117
- this.inheritedScripts.folderPost.unshift(folder.folderPostScript);
118
- }
119
- if (!isNullOrEmpty(folder.preRequestScript)) {
120
- this.inheritedScripts.preRequest = this.inheritedScripts.preRequest ?? [];
121
- this.inheritedScripts.preRequest.push(folder.preRequestScript);
122
- }
123
- if (!isNullOrEmpty(folder.postRequestScript)) {
124
- this.inheritedScripts.postRequest = this.inheritedScripts.postRequest ?? [];
125
- this.inheritedScripts.postRequest.unshift(folder.postRequestScript);
126
- }
127
- }
128
- }
129
- /**
130
- * Cascade auth from parent chain
131
- * Child auth overrides parent auth
132
- */
133
- inheritAuth() {
134
- // Start with parent's effective auth
135
- if (this.parent?.effectiveAuth !== undefined) {
136
- this.effectiveAuth = this.parent.effectiveAuth;
137
- }
138
- // Override with this node's own auth if it has one
139
- if (this.type === 'collection') {
140
- const coll = this.item;
141
- if (isValidAuth(coll.auth)) {
142
- this.effectiveAuth = coll.auth;
143
- }
144
- }
145
- else {
146
- const folderOrRequest = this.item;
147
- if (isValidAuth(folderOrRequest.auth)) {
148
- this.effectiveAuth = folderOrRequest.auth;
149
- }
150
- }
151
- }
152
- addChild(child) {
153
- this.children.push(child);
154
- }
155
- }
156
- /**
157
- * Builds execution tree from collection JSON
158
- * Handles CLI --data override at construction time
159
- */
160
- export class TreeBuilder {
161
- cliData;
162
- logger;
163
- constructor(cliData, logger) {
164
- this.cliData = cliData;
165
- this.logger = logger instanceof Logger ? logger : new Logger('TreeBuilder', LogLevel.INFO);
166
- }
167
- build(collection) {
168
- this.logger.debug(`Building execution tree for collection: ${collection.info.name}`);
169
- if (this.cliData !== undefined && this.cliData.length > 0) {
170
- this.logger.debug(`Overriding collection testData with CLI data (${this.cliData.length} iterations)`);
171
- collection = { ...collection, testData: this.cliData };
172
- }
173
- const root = new ExecutionNode('collection', collection, null);
174
- this.buildChildren(root, collection.items);
175
- this.logger.debug(`Execution tree built: ${this.countNodes(root)} total nodes`);
176
- return root;
177
- }
178
- buildChildren(parent, items) {
179
- for (const item of items) {
180
- const node = new ExecutionNode(item.type, item, parent);
181
- parent.addChild(node);
182
- this.logger.trace(`Added ${item.type} node: ${node.path}`);
183
- if (item.type === 'folder') {
184
- this.buildChildren(node, item.items);
185
- }
186
- }
187
- }
188
- countNodes(node) {
189
- let count = 1;
190
- for (const child of node.children) {
191
- count += this.countNodes(child);
192
- }
193
- return count;
194
- }
195
- }
196
- /**
197
- * Dependency graph for request execution order
198
- * Flattens tree to request nodes only, topologically sorted by dependencies
199
- */
200
- export class DependencyGraph {
201
- nodes;
202
- edges;
203
- constructor(root) {
204
- this.nodes = new Map();
205
- this.edges = new Map();
206
- this.buildGraph(root);
207
- }
208
- buildGraph(node) {
209
- if (node.type === 'request') {
210
- this.nodes.set(node.id, node);
211
- this.edges.set(node.id, new Set(node.dependsOn));
212
- }
213
- for (const child of node.children) {
214
- this.buildGraph(child);
215
- }
216
- }
217
- /**
218
- * Topological sort: returns requests grouped by execution level
219
- * Requests in same level can execute in parallel
220
- */
221
- getExecutionLevels() {
222
- const levels = [];
223
- const remaining = new Set(this.nodes.keys());
224
- const completed = new Set();
225
- while (remaining.size > 0) {
226
- const level = [];
227
- for (const nodeId of remaining) {
228
- const deps = this.edges.get(nodeId);
229
- if (deps === undefined)
230
- continue;
231
- const allDepsCompleted = Array.from(deps).every(dep => completed.has(dep));
232
- if (allDepsCompleted) {
233
- level.push(nodeId);
234
- }
235
- }
236
- if (level.length === 0 && remaining.size > 0) {
237
- throw new Error('Circular dependency detected');
238
- }
239
- for (const nodeId of level) {
240
- remaining.delete(nodeId);
241
- completed.add(nodeId);
242
- }
243
- if (level.length > 0) {
244
- levels.push(level);
245
- }
246
- }
247
- return levels;
248
- }
249
- getNode(id) {
250
- return this.nodes.get(id);
251
- }
252
- canRunInParallel(idA, idB) {
253
- const depsA = this.edges.get(idA);
254
- const depsB = this.edges.get(idB);
255
- return (depsA?.has(idB) ?? false) === false && (depsB?.has(idA) ?? false) === false;
256
- }
257
- }
258
- //# sourceMappingURL=ExecutionTree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionTree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AAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,GAAW,EAAE,GAAW;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAElC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,CAAC;IACtF,CAAC;CACF"}
@@ -1,25 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- import { ILogger, LogLevel } from '@apiquest/types';
3
- /**
4
- * Logger implementation for Fracture
5
- *
6
- * Emits 'console' events for desktop integration and provides
7
- * standard logging methods (error, warn, info, debug, trace).
8
- *
9
- * Desktop ConsolePanel listens to these events to display logs.
10
- * CLI ConsoleReporter subscribes to these events to output to terminal.
11
- */
12
- export declare class Logger implements ILogger {
13
- private level;
14
- private component;
15
- private emitter?;
16
- constructor(component: string, level?: LogLevel, emitter?: EventEmitter);
17
- setLevel(level: LogLevel): void;
18
- error(message: string, ...args: unknown[]): void;
19
- warn(message: string, ...args: unknown[]): void;
20
- info(message: string, ...args: unknown[]): void;
21
- debug(message: string, ...args: unknown[]): void;
22
- trace(message: string, ...args: unknown[]): void;
23
- private log;
24
- }
25
- //# sourceMappingURL=Logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;GAQG;AACH,qBAAa,MAAO,YAAW,OAAO;IACpC,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAC,CAAe;gBAEnB,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,OAAO,CAAC,EAAE,YAAY;IAMtF,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI/C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,OAAO,CAAC,GAAG;CAyCZ"}