@autometa/executor 1.0.0-rc.1 → 1.0.0-rc.3
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 +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/runtime/step-data.d.ts +35 -21
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -357,31 +357,41 @@ function resolveCoerceOverride(shape, coerceOverride) {
|
|
|
357
357
|
}
|
|
358
358
|
return activeConfig[shape];
|
|
359
359
|
}
|
|
360
|
+
function resolveTableOptions(optionsOrProvider) {
|
|
361
|
+
if (!optionsOrProvider) {
|
|
362
|
+
return void 0;
|
|
363
|
+
}
|
|
364
|
+
if (typeof optionsOrProvider === "function") {
|
|
365
|
+
return new optionsOrProvider();
|
|
366
|
+
}
|
|
367
|
+
return optionsOrProvider;
|
|
368
|
+
}
|
|
360
369
|
function getTable(world, shape, options) {
|
|
361
370
|
const table = getRawTable(world);
|
|
362
371
|
if (!table) {
|
|
363
372
|
return void 0;
|
|
364
373
|
}
|
|
365
|
-
const
|
|
374
|
+
const resolvedOptions = resolveTableOptions(options);
|
|
375
|
+
const coerce = resolveCoerceOverride(shape, resolvedOptions?.coerce);
|
|
366
376
|
switch (shape) {
|
|
367
377
|
case "headerless":
|
|
368
378
|
return gherkin.createTable(table, "headerless", {
|
|
369
|
-
...
|
|
379
|
+
...resolvedOptions,
|
|
370
380
|
coerce
|
|
371
381
|
});
|
|
372
382
|
case "horizontal":
|
|
373
383
|
return gherkin.createTable(table, "horizontal", {
|
|
374
|
-
...
|
|
384
|
+
...resolvedOptions,
|
|
375
385
|
coerce
|
|
376
386
|
});
|
|
377
387
|
case "vertical":
|
|
378
388
|
return gherkin.createTable(table, "vertical", {
|
|
379
|
-
...
|
|
389
|
+
...resolvedOptions,
|
|
380
390
|
coerce
|
|
381
391
|
});
|
|
382
392
|
case "matrix":
|
|
383
393
|
return gherkin.createTable(table, "matrix", {
|
|
384
|
-
...
|
|
394
|
+
...resolvedOptions,
|
|
385
395
|
coerce
|
|
386
396
|
});
|
|
387
397
|
default:
|