@autometa/playwright-loader 1.0.0-rc.0

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.
package/dist/index.cjs ADDED
@@ -0,0 +1,636 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs');
4
+ var url = require('url');
5
+ var path = require('path');
6
+ var module$1 = require('module');
7
+ var jiti = require('jiti');
8
+ var fg = require('fast-glob');
9
+
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
+
12
+ var jiti__default = /*#__PURE__*/_interopDefault(jiti);
13
+ var fg__default = /*#__PURE__*/_interopDefault(fg);
14
+
15
+ // src/loader.ts
16
+ var STEP_FALLBACK_GLOB = "**/*.{ts,tsx,js,jsx,mjs,cjs,mts,cts}";
17
+ function resolvePackage(packageName, fromDir) {
18
+ try {
19
+ const require2 = module$1.createRequire(path.resolve(fromDir, "package.json"));
20
+ const resolved = require2.resolve(packageName);
21
+ if (resolved.endsWith(".js") || resolved.endsWith("/index.js")) {
22
+ const mjs = resolved.replace(/\.js$/, ".mjs");
23
+ if (fs.existsSync(mjs)) {
24
+ return mjs;
25
+ }
26
+ const indexMjs = resolved.replace(/index\.js$/, "index.mjs");
27
+ if (indexMjs !== mjs && fs.existsSync(indexMjs)) {
28
+ return indexMjs;
29
+ }
30
+ }
31
+ return resolved;
32
+ } catch {
33
+ return packageName;
34
+ }
35
+ }
36
+ function generateBridgeCode(featurePath, featureContent, runtimeProjectRoot) {
37
+ const projectRoot = runtimeProjectRoot ?? findProjectRoot(path.dirname(featurePath));
38
+ const { configPath, stepRoots, events } = loadConfigSync(projectRoot);
39
+ const configDir = configPath ? path.dirname(configPath) : projectRoot;
40
+ const stepPatterns = buildStepPatterns(stepRoots, {
41
+ configDir,
42
+ projectRoot
43
+ });
44
+ const eventPatterns = buildStepPatterns(events, {
45
+ configDir,
46
+ projectRoot
47
+ });
48
+ const eventImports = generateEventImports(eventPatterns);
49
+ const stepImports = generateStepImports(stepPatterns);
50
+ const playwrightPath = resolvePackage("@playwright/test", projectRoot);
51
+ const executorPath = resolvePackage("@autometa/playwright-executor", projectRoot);
52
+ const runnerPath = resolvePackage("@autometa/runner", projectRoot);
53
+ const gherkinPath = resolvePackage("@autometa/gherkin", projectRoot);
54
+ const debugInfo = JSON.stringify({
55
+ projectRoot,
56
+ configPath,
57
+ stepRoots,
58
+ stepPatterns
59
+ }, null, 2);
60
+ return `
61
+ import { test } from ${JSON.stringify(playwrightPath)};
62
+ import { execute } from ${JSON.stringify(executorPath)};
63
+ import { coordinateRunnerFeature, CucumberRunner } from ${JSON.stringify(runnerPath)};
64
+ import { parseGherkin } from ${JSON.stringify(gherkinPath)};
65
+
66
+ const debugFlagValue = typeof process !== 'undefined'
67
+ ? (process.env.AUTOMETA_BRIDGE_DEBUG ?? process.env.AUTOMETA_DEBUG ?? '')
68
+ : '';
69
+ const debugEnabled = (() => {
70
+ if (!debugFlagValue) {
71
+ return false;
72
+ }
73
+ const normalized = String(debugFlagValue).trim().toLowerCase();
74
+ return normalized === '1' || normalized === 'true' || normalized === 'yes' || normalized === 'on';
75
+ })();
76
+ const debugLog = (...args) => {
77
+ if (!debugEnabled) {
78
+ return;
79
+ }
80
+ console.log(...args);
81
+ };
82
+
83
+ // Debug: Step discovery configuration
84
+ debugLog("[Autometa Bridge] Step discovery info:", ${JSON.stringify(debugInfo)});
85
+
86
+ // Dynamic imports for event listener modules (side effects)
87
+ ${eventImports}
88
+
89
+ // Dynamic imports for step definition modules
90
+ ${stepImports}
91
+
92
+ function collectCandidateModules(imported) {
93
+ if (!imported || typeof imported !== 'object') {
94
+ return [];
95
+ }
96
+
97
+ const modules = new Set();
98
+ modules.add(imported);
99
+
100
+ const exportedModules = imported.modules;
101
+ if (Array.isArray(exportedModules)) {
102
+ for (const entry of exportedModules) {
103
+ if (entry && typeof entry === 'object') {
104
+ modules.add(entry);
105
+ }
106
+ }
107
+ }
108
+
109
+ const defaultExport = imported.default;
110
+ if (Array.isArray(defaultExport)) {
111
+ for (const entry of defaultExport) {
112
+ if (entry && typeof entry === 'object') {
113
+ modules.add(entry);
114
+ }
115
+ }
116
+ } else if (defaultExport && typeof defaultExport === 'object') {
117
+ modules.add(defaultExport);
118
+ }
119
+
120
+ return Array.from(modules);
121
+ }
122
+
123
+ function isStepsEnvironment(candidate) {
124
+ return Boolean(
125
+ candidate &&
126
+ typeof candidate === 'object' &&
127
+ typeof candidate.coordinateFeature === 'function' &&
128
+ typeof candidate.getPlan === 'function' &&
129
+ typeof candidate.Given === 'function' &&
130
+ typeof candidate.When === 'function' &&
131
+ typeof candidate.Then === 'function'
132
+ );
133
+ }
134
+
135
+ function extractStepsEnvironment(candidate) {
136
+ if (!candidate || typeof candidate !== 'object') {
137
+ return undefined;
138
+ }
139
+
140
+ if (isStepsEnvironment(candidate)) {
141
+ return candidate;
142
+ }
143
+
144
+ const stepsEnv = candidate.stepsEnvironment;
145
+ if (isStepsEnvironment(stepsEnv)) {
146
+ return stepsEnv;
147
+ }
148
+
149
+ const defaultExport = candidate.default;
150
+ if (isStepsEnvironment(defaultExport)) {
151
+ return defaultExport;
152
+ }
153
+
154
+ return undefined;
155
+ }
156
+
157
+ function resolveStepsEnvironment(modules) {
158
+ for (const moduleExports of Object.values(modules)) {
159
+ for (const candidate of collectCandidateModules(moduleExports)) {
160
+ const environment = extractStepsEnvironment(candidate);
161
+ if (environment) {
162
+ return environment;
163
+ }
164
+ }
165
+ }
166
+ return undefined;
167
+ }
168
+
169
+ function isScenario(element) {
170
+ return Boolean(
171
+ element &&
172
+ typeof element === 'object' &&
173
+ 'steps' in element &&
174
+ !('exampleGroups' in element) &&
175
+ !('elements' in element)
176
+ );
177
+ }
178
+
179
+ function isScenarioOutline(element) {
180
+ return Boolean(
181
+ element &&
182
+ typeof element === 'object' &&
183
+ 'steps' in element &&
184
+ 'exampleGroups' in element
185
+ );
186
+ }
187
+
188
+ function isRule(element) {
189
+ return Boolean(
190
+ element &&
191
+ typeof element === 'object' &&
192
+ 'elements' in element &&
193
+ Array.isArray(element.elements)
194
+ );
195
+ }
196
+
197
+ function createFeatureScopePlan(feature, basePlan) {
198
+ const allSteps = Array.from(basePlan.stepsById.values());
199
+ const featureChildren = [];
200
+ const scopesById = new Map(basePlan.scopesById);
201
+
202
+ for (const element of feature.elements ?? []) {
203
+ if (isScenario(element) || isScenarioOutline(element)) {
204
+ const scenarioScope = {
205
+ id: element.id ?? element.name,
206
+ kind: isScenarioOutline(element) ? 'scenarioOutline' : 'scenario',
207
+ name: element.name,
208
+ mode: 'default',
209
+ tags: element.tags ?? [],
210
+ steps: allSteps,
211
+ hooks: [],
212
+ children: [],
213
+ pending: false,
214
+ };
215
+ featureChildren.push(scenarioScope);
216
+ scopesById.set(scenarioScope.id, scenarioScope);
217
+ continue;
218
+ }
219
+
220
+ if (isRule(element)) {
221
+ const ruleChildren = [];
222
+ for (const ruleElement of element.elements ?? []) {
223
+ if (isScenario(ruleElement) || isScenarioOutline(ruleElement)) {
224
+ const scenarioScope = {
225
+ id: ruleElement.id ?? ruleElement.name,
226
+ kind: isScenarioOutline(ruleElement) ? 'scenarioOutline' : 'scenario',
227
+ name: ruleElement.name,
228
+ mode: 'default',
229
+ tags: ruleElement.tags ?? [],
230
+ steps: allSteps,
231
+ hooks: [],
232
+ children: [],
233
+ pending: false,
234
+ };
235
+ ruleChildren.push(scenarioScope);
236
+ scopesById.set(scenarioScope.id, scenarioScope);
237
+ }
238
+ }
239
+
240
+ const ruleScope = {
241
+ id: element.id ?? element.name,
242
+ kind: 'rule',
243
+ name: element.name,
244
+ mode: 'default',
245
+ tags: element.tags ?? [],
246
+ steps: allSteps,
247
+ hooks: [],
248
+ children: ruleChildren,
249
+ pending: false,
250
+ };
251
+ featureChildren.push(ruleScope);
252
+ scopesById.set(ruleScope.id, ruleScope);
253
+ }
254
+ }
255
+
256
+ const featureScope = {
257
+ id: feature.uri ?? feature.name,
258
+ kind: 'feature',
259
+ name: feature.name,
260
+ mode: 'default',
261
+ tags: feature.tags ?? [],
262
+ steps: allSteps,
263
+ hooks: [],
264
+ children: featureChildren,
265
+ pending: false,
266
+ };
267
+
268
+ const existingRoot = basePlan.root;
269
+ const updatedRoot = {
270
+ ...existingRoot,
271
+ children: [...existingRoot.children, featureScope],
272
+ };
273
+
274
+ scopesById.set(featureScope.id, featureScope);
275
+ scopesById.set(updatedRoot.id, updatedRoot);
276
+
277
+ const scopePlan = {
278
+ root: updatedRoot,
279
+ stepsById: basePlan.stepsById,
280
+ hooksById: basePlan.hooksById,
281
+ scopesById,
282
+ };
283
+
284
+ if (basePlan.worldFactory) {
285
+ scopePlan.worldFactory = basePlan.worldFactory;
286
+ }
287
+
288
+ if (basePlan.parameterRegistry) {
289
+ scopePlan.parameterRegistry = basePlan.parameterRegistry;
290
+ }
291
+
292
+ return scopePlan;
293
+ }
294
+
295
+ const gherkin = ${JSON.stringify(featureContent)};
296
+ const feature = parseGherkin(gherkin);
297
+ await loadEventModules();
298
+ const stepModules = await loadStepModules();
299
+ const steps = resolveStepsEnvironment(stepModules);
300
+
301
+ if (!steps) {
302
+ throw new Error(
303
+ 'Autometa could not find an exported steps environment for the configured step roots. ' +
304
+ 'Export your runner environment as "stepsEnvironment" or default.'
305
+ );
306
+ }
307
+
308
+ // Debug: Check the steps environment
309
+ debugLog("[Autometa Bridge] Steps environment found:", {
310
+ hasGiven: typeof steps.Given === 'function',
311
+ hasWhen: typeof steps.When === 'function',
312
+ hasThen: typeof steps.Then === 'function',
313
+ hasGetPlan: typeof steps.getPlan === 'function',
314
+ });
315
+
316
+ CucumberRunner.setSteps(steps);
317
+
318
+ const runtimeConfig = steps.getConfig?.() ?? {
319
+ test: {},
320
+ shim: {},
321
+ globals: {}
322
+ };
323
+
324
+ // Debug: Check the plan
325
+ const basePlan = steps.getPlan();
326
+ const paramRegistry = basePlan.parameterRegistry;
327
+ const actualRegistry = paramRegistry?.registry ?? paramRegistry;
328
+ const paramTypeNames = actualRegistry?.parameterTypes
329
+ ? Array.from(actualRegistry.parameterTypes).map(pt => pt.name)
330
+ : [];
331
+ debugLog("[Autometa Bridge] Base plan:", {
332
+ stepsCount: basePlan.stepsById?.size ?? 0,
333
+ hooksCount: basePlan.hooksById?.size ?? 0,
334
+ hasParameterRegistry: Boolean(paramRegistry),
335
+ parameterTypes: paramTypeNames,
336
+ hasHttpMethod: actualRegistry?.lookupByTypeName?.('httpMethod') !== undefined,
337
+ stepIds: Array.from(basePlan.stepsById?.keys() ?? []).slice(0, 5),
338
+ });
339
+
340
+ // Debug: Check step module contents
341
+ debugLog("[Autometa Bridge] Step modules keys:", Object.keys(stepModules));
342
+ const firstModKey = Object.keys(stepModules)[0];
343
+ if (firstModKey) {
344
+ const firstMod = stepModules[firstModKey];
345
+ debugLog("[Autometa Bridge] First module exports:", Object.keys(firstMod ?? {}));
346
+ }
347
+
348
+ test.describe(feature.name, () => {
349
+ const scopedPlan = createFeatureScopePlan(feature, basePlan);
350
+
351
+ // Debug: Check the scoped plan
352
+ const scopedRegistry = scopedPlan.parameterRegistry?.registry ?? scopedPlan.parameterRegistry;
353
+ debugLog("[Autometa Bridge] Scoped plan:", {
354
+ hasParameterRegistry: Boolean(scopedPlan.parameterRegistry),
355
+ hasHttpMethod: scopedRegistry?.lookupByTypeName?.('httpMethod') !== undefined,
356
+ rootChildren: scopedPlan.root?.children?.length ?? 0,
357
+ stepsCount: scopedPlan.stepsById?.size ?? 0,
358
+ });
359
+
360
+ // Debug: Feature name matching
361
+ debugLog("[Autometa Bridge] Feature matching:", {
362
+ gherkinName: feature.name,
363
+ featureScopeNames: scopedPlan.root?.children?.filter(c => c.kind === 'feature').map(c => c.name) ?? [],
364
+ });
365
+
366
+ const { plan, adapter } = coordinateRunnerFeature({
367
+ feature,
368
+ environment: steps,
369
+ config: runtimeConfig,
370
+ plan: scopedPlan
371
+ });
372
+
373
+ // Debug: Check what adapter sees
374
+ const adapterRegistry = adapter.getParameterRegistry?.();
375
+ const actualAdapterReg = adapterRegistry?.registry ?? adapterRegistry;
376
+ debugLog("[Autometa Bridge] Adapter:", {
377
+ hasParameterRegistry: Boolean(adapterRegistry),
378
+ hasHttpMethod: actualAdapterReg?.lookupByTypeName?.('httpMethod') !== undefined,
379
+ });
380
+
381
+ execute({ plan, adapter, config: runtimeConfig });
382
+ });
383
+ `;
384
+ }
385
+ function findProjectRoot(startDir) {
386
+ let dir = startDir;
387
+ while (dir !== "/") {
388
+ if (fs.existsSync(path.resolve(dir, "package.json"))) {
389
+ return dir;
390
+ }
391
+ const parent = path.dirname(dir);
392
+ if (parent === dir)
393
+ break;
394
+ dir = parent;
395
+ }
396
+ return startDir;
397
+ }
398
+ function loadConfigSync(root) {
399
+ const candidates = [
400
+ "autometa.config.ts",
401
+ "autometa.config.js",
402
+ "autometa.config.mts",
403
+ "autometa.config.mjs",
404
+ "autometa.config.cts",
405
+ "autometa.config.cjs"
406
+ ];
407
+ const _jiti = jiti__default.default(root, { interopDefault: true });
408
+ for (const candidate of candidates) {
409
+ const configPath = path.resolve(root, candidate);
410
+ if (!fs.existsSync(configPath)) {
411
+ continue;
412
+ }
413
+ const mod = _jiti(configPath);
414
+ const config = mod && typeof mod === "object" && "default" in mod ? mod.default ?? mod : mod;
415
+ if (!isConfig(config)) {
416
+ throw new Error(
417
+ `Failed to load Autometa config from "${configPath}". Ensure the module exports a Config instance (e.g. export default defineConfig({...})).`
418
+ );
419
+ }
420
+ const resolved = config.resolve();
421
+ const stepRoots = resolved.config?.roots?.steps ?? [];
422
+ const events = resolved.config?.events ?? [];
423
+ return {
424
+ configPath,
425
+ stepRoots: Array.isArray(stepRoots) && stepRoots.length > 0 ? stepRoots : findDefaultStepRoots(root),
426
+ events: Array.isArray(events) ? events : []
427
+ };
428
+ }
429
+ return { configPath: void 0, stepRoots: findDefaultStepRoots(root), events: [] };
430
+ }
431
+ function isConfig(config) {
432
+ return typeof config === "object" && config !== null && "resolve" in config && typeof config.resolve === "function" && "current" in config && typeof config.current === "function";
433
+ }
434
+ function findDefaultStepRoots(root) {
435
+ const candidates = [
436
+ "src/steps",
437
+ "src/step-definitions",
438
+ "steps",
439
+ "step-definitions",
440
+ "src"
441
+ ];
442
+ const found = [];
443
+ for (const candidate of candidates) {
444
+ const path$1 = path.resolve(root, candidate);
445
+ if (fs.existsSync(path$1)) {
446
+ found.push(candidate);
447
+ break;
448
+ }
449
+ }
450
+ const stepDefFile = path.resolve(root, "src/step-definitions.ts");
451
+ if (fs.existsSync(stepDefFile)) {
452
+ found.push("src/step-definitions.ts");
453
+ }
454
+ return found.length > 0 ? found : ["src"];
455
+ }
456
+ function buildStepPatterns(entries, options) {
457
+ if (!entries || entries.length === 0) {
458
+ return [];
459
+ }
460
+ const patterns = /* @__PURE__ */ new Set();
461
+ for (const entry of entries) {
462
+ const normalized = entry.trim();
463
+ if (!normalized) {
464
+ continue;
465
+ }
466
+ for (const candidate of toPatterns(normalized, STEP_FALLBACK_GLOB)) {
467
+ const absolute = path.isAbsolute(candidate) ? normalizeSlashes(candidate) : normalizeSlashes(path.resolve(options.configDir, candidate));
468
+ const files = resolveGlobToFiles(absolute, options.projectRoot);
469
+ for (const file of files) {
470
+ patterns.add(file);
471
+ }
472
+ }
473
+ }
474
+ return Array.from(patterns);
475
+ }
476
+ function resolveGlobToFiles(pattern, projectRoot) {
477
+ const isSpecificFile = hasFileExtension(pattern) && !hasGlobMagic(pattern);
478
+ if (isSpecificFile) {
479
+ return fs.existsSync(pattern) ? [pattern] : [];
480
+ }
481
+ const matches = fg__default.default.sync(pattern, {
482
+ cwd: projectRoot,
483
+ absolute: true,
484
+ onlyFiles: true,
485
+ unique: true,
486
+ followSymbolicLinks: true,
487
+ ignore: [
488
+ "**/node_modules/**",
489
+ "**/*.test.*",
490
+ "**/*.spec.*"
491
+ ]
492
+ });
493
+ return matches.sort((a, b) => a.localeCompare(b));
494
+ }
495
+ function toPatterns(entry, fallbackGlob) {
496
+ if (hasGlobMagic(entry) || hasFileExtension(entry)) {
497
+ return [entry];
498
+ }
499
+ return [appendGlob(entry, fallbackGlob)];
500
+ }
501
+ function hasGlobMagic(input) {
502
+ return /[*?{}()[\]!,@+]/u.test(input);
503
+ }
504
+ function hasFileExtension(input) {
505
+ const normalized = normalizeSlashes(input);
506
+ const trimmed = normalized === "/" ? normalized : normalized.replace(/\/+$/u, "");
507
+ if (!trimmed || trimmed === "." || trimmed === "..") {
508
+ return false;
509
+ }
510
+ return Boolean(path.extname(trimmed));
511
+ }
512
+ function appendGlob(entry, glob) {
513
+ const normalized = normalizeSlashes(entry);
514
+ const trimmed = normalized === "/" ? normalized : normalized.replace(/\/+$/u, "");
515
+ if (!trimmed || trimmed === ".") {
516
+ return glob;
517
+ }
518
+ if (trimmed === "/") {
519
+ return `/${glob}`;
520
+ }
521
+ return `${trimmed}/${glob}`;
522
+ }
523
+ function normalizeSlashes(pathname) {
524
+ return pathname.replace(/\\/gu, "/");
525
+ }
526
+ function generateStepImports(stepPatterns, _projectRoot) {
527
+ if (stepPatterns.length === 0) {
528
+ return `
529
+ async function loadStepModules() {
530
+ return {};
531
+ }
532
+ `;
533
+ }
534
+ const sortedPatterns = [...stepPatterns].sort((a, b) => {
535
+ const aName = a.toLowerCase();
536
+ const bName = b.toLowerCase();
537
+ const aIsMain = aName.includes("step-definitions.ts") || aName.includes("step-definitions.js");
538
+ const bIsMain = bName.includes("step-definitions.ts") || bName.includes("step-definitions.js");
539
+ if (aIsMain && !bIsMain)
540
+ return -1;
541
+ if (!aIsMain && bIsMain)
542
+ return 1;
543
+ const aIsIndex = aName.endsWith("/index.ts") || aName.endsWith("/index.js");
544
+ const bIsIndex = bName.endsWith("/index.ts") || bName.endsWith("/index.js");
545
+ if (aIsIndex && !bIsIndex)
546
+ return -1;
547
+ if (!aIsIndex && bIsIndex)
548
+ return 1;
549
+ return a.localeCompare(b);
550
+ });
551
+ const imports = sortedPatterns.map((file, index) => {
552
+ const importPath = normalizeSlashes(file);
553
+ return ` const mod${index} = await import(${JSON.stringify(importPath)});`;
554
+ }).join("\n");
555
+ const moduleMap = sortedPatterns.map((file, index) => {
556
+ const key = normalizeSlashes(file);
557
+ return ` ${JSON.stringify(key)}: mod${index},`;
558
+ }).join("\n");
559
+ return `
560
+ async function loadStepModules() {
561
+ ${imports}
562
+ return {
563
+ ${moduleMap}
564
+ };
565
+ }
566
+ `;
567
+ }
568
+ function generateEventImports(eventPatterns) {
569
+ if (eventPatterns.length === 0) {
570
+ return `
571
+ async function loadEventModules() {
572
+ return;
573
+ }
574
+ `;
575
+ }
576
+ const imports = eventPatterns.map((file) => {
577
+ const importPath = normalizeSlashes(file);
578
+ return ` await import(${JSON.stringify(importPath)});`;
579
+ }).join("\n");
580
+ return `
581
+ async function loadEventModules() {
582
+ ${imports}
583
+ }
584
+ `;
585
+ }
586
+
587
+ // src/loader.ts
588
+ async function resolve2(specifier, context, nextResolve) {
589
+ if (specifier.endsWith(".feature")) {
590
+ let resolvedPath;
591
+ if (specifier.startsWith("file://")) {
592
+ resolvedPath = url.fileURLToPath(specifier);
593
+ } else if (specifier.startsWith("/")) {
594
+ resolvedPath = specifier;
595
+ } else if (specifier.startsWith(".")) {
596
+ if (context.parentURL) {
597
+ const parentPath = url.fileURLToPath(context.parentURL);
598
+ const parentDir = path.dirname(parentPath);
599
+ resolvedPath = path.resolve(parentDir, specifier);
600
+ } else {
601
+ resolvedPath = path.resolve(process.cwd(), specifier);
602
+ }
603
+ } else {
604
+ resolvedPath = path.resolve(process.cwd(), specifier);
605
+ }
606
+ if (!fs.existsSync(resolvedPath)) {
607
+ throw new Error(`Cannot find .feature file: ${resolvedPath}`);
608
+ }
609
+ return {
610
+ url: url.pathToFileURL(resolvedPath).href,
611
+ format: "autometa-feature",
612
+ shortCircuit: true
613
+ };
614
+ }
615
+ return nextResolve(specifier, context);
616
+ }
617
+ async function load(url$1, context, nextLoad) {
618
+ if (context.format === "autometa-feature") {
619
+ const filePath = url.fileURLToPath(url$1);
620
+ const featureContent = fs.readFileSync(filePath, "utf-8");
621
+ const projectRoot = process.cwd();
622
+ const bridgeCode = generateBridgeCode(filePath, featureContent, projectRoot);
623
+ return {
624
+ format: "module",
625
+ shortCircuit: true,
626
+ source: bridgeCode
627
+ };
628
+ }
629
+ return nextLoad(url$1, context);
630
+ }
631
+
632
+ exports.generateBridgeCode = generateBridgeCode;
633
+ exports.load = load;
634
+ exports.resolve = resolve2;
635
+ //# sourceMappingURL=out.js.map
636
+ //# sourceMappingURL=index.cjs.map