@acot/acot-runner-storybook
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.0.12](https://github.com/acot-a11y/acot/compare/v0.0.11...v0.0.12) (2021-04-18) | ||
### Features | ||
- **acot-runner-storybook:** add `timeout` options ([41b06f9](https://github.com/acot-a11y/acot/commit/41b06f98d7f920acc6a67a1912d32a856b357c48)) | ||
## [0.0.11](https://github.com/acot-a11y/acot/compare/v0.0.10...v0.0.11) (2021-04-12) | ||
@@ -8,0 +14,0 @@ |
@@ -26,2 +26,3 @@ import type { ConfigEntry } from '@acot/types'; | ||
exclude?: string[]; | ||
timeout?: number; | ||
}; | ||
@@ -28,0 +29,0 @@ export declare class StorybookRunner extends AcotRunner<Options> { |
@@ -16,2 +16,3 @@ "use strict"; | ||
const debug = require('debug')('acot:runner:storybook'); | ||
const DEFAULT_TIMEOUT = 60 * 1000; | ||
const isMergeableObject = (v) => Array.isArray(v) || is_plain_object_1.isPlainObject(v); | ||
@@ -45,2 +46,6 @@ const filterStories = (stories, include, exclude) => { | ||
}, | ||
timeout: { | ||
type: 'number', | ||
minimum: 0, | ||
}, | ||
}, | ||
@@ -52,6 +57,7 @@ required: [], | ||
async collect() { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
// get stories | ||
const browser = await puppeteer_core_1.default.launch(this.config.launchOptions); | ||
const page = await browser.newPage(); | ||
page.setDefaultTimeout((_a = this.options.timeout) !== null && _a !== void 0 ? _a : DEFAULT_TIMEOUT); | ||
let stories = []; | ||
@@ -76,3 +82,3 @@ try { | ||
debug('raw stories: %O', raw); | ||
stories = filterStories(raw, (_a = this.options.include) !== null && _a !== void 0 ? _a : [], (_b = this.options.exclude) !== null && _b !== void 0 ? _b : []); | ||
stories = filterStories(raw, (_b = this.options.include) !== null && _b !== void 0 ? _b : [], (_c = this.options.exclude) !== null && _c !== void 0 ? _c : []); | ||
debug('filtered stories: %O', stories); | ||
@@ -79,0 +85,0 @@ } |
{ | ||
"name": "@acot/acot-runner-storybook", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "An acot custom runner for Storybook.", | ||
@@ -31,6 +31,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@acot/acot-runner": "0.0.11", | ||
"@acot/config": "0.0.11", | ||
"@acot/runner": "0.0.11", | ||
"@acot/schema-validator": "0.0.11", | ||
"@acot/acot-runner": "0.0.12", | ||
"@acot/config": "0.0.12", | ||
"@acot/runner": "0.0.12", | ||
"@acot/schema-validator": "0.0.12", | ||
"debug": "^4.3.1", | ||
@@ -43,3 +43,3 @@ "deepmerge": "^4.2.2", | ||
"devDependencies": { | ||
"@acot/types": "0.0.11", | ||
"@acot/types": "0.0.12", | ||
"@types/micromatch": "4.0.1" | ||
@@ -50,3 +50,3 @@ }, | ||
}, | ||
"gitHead": "f837929ac56505e646f51c1cdbdd7dd7b80a84dc" | ||
"gitHead": "eedbde034ad1495dd489be01ae11404365ecfce6" | ||
} |
@@ -82,2 +82,21 @@ # @acot/acot-runner-storybook | ||
### `timeout` | ||
**Type:** `number` | ||
**Default:** `60000` | ||
**Required:** `false` | ||
Maximum time in milliseconds to wait for the browser instance to collect stories. | ||
```json | ||
{ | ||
"runner": { | ||
"uses": "@acot/storybook", | ||
"with": { | ||
"timeout": 120000 | ||
} | ||
} | ||
} | ||
``` | ||
## Storybook compatibility | ||
@@ -84,0 +103,0 @@ |
17014
153
113
+ Added@acot/acot-runner@0.0.12(transitive)
+ Added@acot/config@0.0.12(transitive)
+ Added@acot/connection@0.0.12(transitive)
+ Added@acot/core@0.0.12(transitive)
+ Added@acot/factory@0.0.12(transitive)
+ Added@acot/find-chrome@0.0.12(transitive)
+ Added@acot/html-pickup@0.0.12(transitive)
+ Added@acot/logger@0.0.12(transitive)
+ Added@acot/module-loader@0.0.12(transitive)
+ Added@acot/reporter@0.0.12(transitive)
+ Added@acot/runner@0.0.12(transitive)
+ Added@acot/schema-validator@0.0.12(transitive)
+ Added@acot/types@0.0.12(transitive)
+ Added@acot/utils@0.0.12(transitive)
- Removed@acot/acot-runner@0.0.11(transitive)
- Removed@acot/config@0.0.11(transitive)
- Removed@acot/connection@0.0.11(transitive)
- Removed@acot/core@0.0.11(transitive)
- Removed@acot/factory@0.0.11(transitive)
- Removed@acot/find-chrome@0.0.11(transitive)
- Removed@acot/html-pickup@0.0.11(transitive)
- Removed@acot/logger@0.0.11(transitive)
- Removed@acot/module-loader@0.0.11(transitive)
- Removed@acot/reporter@0.0.11(transitive)
- Removed@acot/runner@0.0.11(transitive)
- Removed@acot/schema-validator@0.0.11(transitive)
- Removed@acot/types@0.0.11(transitive)
- Removed@acot/utils@0.0.11(transitive)
Updated@acot/acot-runner@0.0.12
Updated@acot/config@0.0.12
Updated@acot/runner@0.0.12