@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,265 +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, filterSet) {
204
- this.nodes = new Map();
205
- this.edges = new Map();
206
- this.buildGraph(root, filterSet);
207
- }
208
- buildGraph(node, filterSet) {
209
- if (node.type === 'request') {
210
- // Include request if no filter or if in filter set
211
- if (filterSet === null || filterSet === undefined || filterSet.has(node.id)) {
212
- this.nodes.set(node.id, node);
213
- // Filter dependencies to only include those in the graph
214
- const filteredDeps = filterSet === null || filterSet === undefined
215
- ? node.dependsOn
216
- : node.dependsOn.filter(depId => filterSet.has(depId));
217
- this.edges.set(node.id, new Set(filteredDeps));
218
- }
219
- }
220
- for (const child of node.children) {
221
- this.buildGraph(child, filterSet);
222
- }
223
- }
224
- /**
225
- * Topological sort: returns requests grouped by execution level
226
- * Requests in same level can execute in parallel
227
- */
228
- getExecutionLevels() {
229
- const levels = [];
230
- const remaining = new Set(this.nodes.keys());
231
- const completed = new Set();
232
- while (remaining.size > 0) {
233
- const level = [];
234
- for (const nodeId of remaining) {
235
- const deps = this.edges.get(nodeId);
236
- if (deps === undefined)
237
- continue;
238
- const allDepsCompleted = Array.from(deps).every(dep => completed.has(dep));
239
- if (allDepsCompleted) {
240
- level.push(nodeId);
241
- }
242
- }
243
- if (level.length === 0 && remaining.size > 0) {
244
- throw new Error('Circular dependency detected');
245
- }
246
- for (const nodeId of level) {
247
- remaining.delete(nodeId);
248
- completed.add(nodeId);
249
- }
250
- if (level.length > 0) {
251
- levels.push(level);
252
- }
253
- }
254
- return levels;
255
- }
256
- getNode(id) {
257
- return this.nodes.get(id);
258
- }
259
- canRunInParallel(idA, idB) {
260
- const depsA = this.edges.get(idA);
261
- const depsB = this.edges.get(idB);
262
- return (depsA?.has(idB) ?? false) === false && (depsB?.has(idA) ?? false) === false;
263
- }
264
- }
265
- //# sourceMappingURL=ExecutionTree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionTree.js","sourceRoot":"","sources":["../src/ExecutionTree.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,qEAAqE;AAGrE,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AC,CAAC;YAClD,CAAC;YAED,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;gBAC3B,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACzB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC;YAED,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,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,17 +0,0 @@
1
- import type { Collection } from '@apiquest/types';
2
- export interface PluginRequirements {
3
- protocols: Set<string>;
4
- authTypes: Set<string>;
5
- valueProviders: Set<string>;
6
- }
7
- export declare class CollectionAnalyzer {
8
- /**
9
- * Analyze a collection to determine which plugins are needed
10
- * Per schema: protocol is collection-level, auth can be at any level, variables can have providers
11
- */
12
- analyzeRequirements(collection: Collection): PluginRequirements;
13
- private scanItems;
14
- private scanAuth;
15
- private scanVariables;
16
- }
17
- //# sourceMappingURL=CollectionAnalyzer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/CollectionAnalyzer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAA2C,MAAM,iBAAiB,CAAC;AAG3F,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,qBAAa,kBAAkB;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,kBAAkB;IA4B/D,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,aAAa;CActB"}
@@ -1,70 +0,0 @@
1
- // Collection Analyzer - Scans collection to determine required plugins
2
- // Extracted to improve code organization and enable selective plugin loading
3
- import { isNullOrEmpty, hasItems, isValidAuth, isValidAuthType } from './utils.js';
4
- export class CollectionAnalyzer {
5
- /**
6
- * Analyze a collection to determine which plugins are needed
7
- * Per schema: protocol is collection-level, auth can be at any level, variables can have providers
8
- */
9
- analyzeRequirements(collection) {
10
- const requirements = {
11
- protocols: new Set(),
12
- authTypes: new Set(),
13
- valueProviders: new Set()
14
- };
15
- // Protocol is at collection level (schema line 16-18)
16
- if (!isNullOrEmpty(collection.protocol)) {
17
- requirements.protocols.add(collection.protocol);
18
- }
19
- // Scan collection-level auth
20
- if (isValidAuth(collection.auth)) {
21
- this.scanAuth(collection.auth, requirements);
22
- }
23
- // Scan all items for folder/request-level auth
24
- if (hasItems(collection.items)) {
25
- this.scanItems(collection.items, requirements);
26
- }
27
- // Scan variables for provider field (schema line 123-126)
28
- this.scanVariables(collection, requirements);
29
- return requirements;
30
- }
31
- scanItems(items, requirements) {
32
- for (const item of items) {
33
- if (item.type === 'folder' && hasItems(item.items)) {
34
- // Scan folder-level auth
35
- if (isValidAuth(item.auth)) {
36
- this.scanAuth(item.auth, requirements);
37
- }
38
- // Recursively scan folder items
39
- this.scanItems(item.items, requirements);
40
- }
41
- else if (item.type === 'request') {
42
- const request = item;
43
- // Scan request-level auth
44
- if (isValidAuth(request.auth)) {
45
- this.scanAuth(request.auth, requirements);
46
- }
47
- }
48
- }
49
- }
50
- scanAuth(auth, requirements) {
51
- // Skip 'none' and 'inherit' - they're not plugin types
52
- if (isValidAuthType(auth.type)) {
53
- requirements.authTypes.add(auth.type);
54
- }
55
- }
56
- scanVariables(collection, requirements) {
57
- // Scan collection variables for provider field (variable objects, not just strings)
58
- const variables = collection.variables ?? {};
59
- for (const value of Object.values(variables)) {
60
- // Variables can be strings OR variable objects with provider field
61
- if (typeof value === 'object' && value !== null) {
62
- const varObj = value;
63
- if (varObj.provider !== null && varObj.provider !== undefined && varObj.provider !== '') {
64
- requirements.valueProviders.add(varObj.provider);
65
- }
66
- }
67
- }
68
- }
69
- }
70
- //# sourceMappingURL=CollectionAnalyzer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionAnalyzer.js","sourceRoot":"","sources":["../../../src/CollectionAnalyzer.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,6EAA6E;AAG7E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAQnF,MAAM,OAAO,kBAAkB;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,UAAsB;QACxC,MAAM,YAAY,GAAuB;YACvC,SAAS,EAAE,IAAI,GAAG,EAAE;YACpB,SAAS,EAAE,IAAI,GAAG,EAAE;YACpB,cAAc,EAAE,IAAI,GAAG,EAAE;SAC1B,CAAC;QAEF,sDAAsD;QACtD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClD,CAAC;QAED,6BAA6B;QAC7B,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,E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AC/B,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,UAAsB,EAAE,YAAgC;QAC5E,oFAAoF;QACpF,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,EAAE,CAAC;QAE7C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7C,mEAAmE;YACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAChD,MAAM,MAAM,GAAG,KAAK,CAAC;gBACrB,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;oBACxF,YAAY,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1,39 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- import type { Collection, RunOptions, RunResult, CollectionRunnerOptions, IProtocolPlugin, IAuthPlugin } from '@apiquest/types';
3
- export declare class CollectionRunner extends EventEmitter {
4
- private variableResolver;
5
- private pluginManager;
6
- private pluginResolver;
7
- private pluginLoader;
8
- private collectionAnalyzer;
9
- private collectionValidator;
10
- private testCounter;
11
- private scriptEngine;
12
- private scriptQueue;
13
- private pluginResolutionPromise;
14
- private resolvedPlugins;
15
- private logger;
16
- constructor(options?: CollectionRunnerOptions);
17
- /**
18
- * Queue script execution to ensure sequential execution (thread-safe)
19
- */
20
- private queueScript;
21
- registerPlugin(plugin: IProtocolPlugin): void;
22
- registerAuthPlugin(plugin: IAuthPlugin): void;
23
- private emitConsoleOutput;
24
- /**
25
- * Subscribe to ALL events emitted by the runner (including custom plugin events)
26
- * Overrides emit to intercept all event emissions
27
- */
28
- onAll(handler: (eventType: string, data: unknown) => void): () => void;
29
- /**
30
- * Create event envelope for all events (except console)
31
- */
32
- private createEventEnvelope;
33
- run(collection: Collection, options?: RunOptions): Promise<RunResult>;
34
- private executeTree;
35
- private executeRequest;
36
- private resolveRequest;
37
- private mergeOptions;
38
- }
39
- //# sourceMappingURL=CollectionRunner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionRunner.d.ts","sourceRoot":"","sources":["../../../src/CollectionRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,SAAS,EAQT,uBAAuB,EAWvB,eAAe,EACf,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAiBzB,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,mBAAmB,CAAsB;IACjD,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,uBAAuB,CAA4B;IAC3D,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,CAAC,EAAE,uBAAuB;IA8B7C;;OAEG;YACW,WAAW;IAMzB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAI7C,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAI7C,OAAO,CAAC,iBAAiB;IAmBzB;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;IAwB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