creevey 0.9.0-beta.2 → 0.9.0-non-webpack.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/AUTHORS +15 -15
- package/CHANGELOG.md +1275 -1275
- package/LICENSE +21 -21
- package/README.md +7 -0
- package/addon/README.md +3 -0
- package/addon/package.json +4 -0
- package/docs/config.md +212 -212
- package/docs/grid.md +10 -10
- package/docs/tests.md +63 -63
- package/jest.config.js +6 -0
- package/lib/cjs/client/addon/Manager.js +11 -5
- package/lib/cjs/client/addon/components/Addon.js +1 -1
- package/lib/cjs/client/addon/components/Icons.js +2 -2
- package/lib/cjs/client/addon/components/Tools.js +1 -1
- package/lib/cjs/client/addon/index.js +31 -0
- package/lib/cjs/client/addon/preset.js +3 -3
- package/lib/cjs/client/addon/register.js +7 -3
- package/lib/cjs/client/addon/withCreevey.js +57 -30
- package/lib/cjs/client/shared/components/ImagesView/BlendView.js +1 -1
- package/lib/cjs/client/shared/components/ImagesView/ImagesView.js +1 -1
- package/lib/cjs/client/shared/components/ImagesView/SideBySideView.js +1 -1
- package/lib/cjs/client/shared/components/ImagesView/SlideView.js +1 -1
- package/lib/cjs/client/shared/components/ImagesView/SwapView.js +1 -1
- package/lib/cjs/client/shared/components/ImagesView/index.js +4 -4
- package/lib/cjs/client/shared/components/PageHeader/PageHeader.js +1 -1
- package/lib/cjs/client/shared/components/ResultsPage.js +2 -2
- package/lib/cjs/client/shared/creeveyClientApi.js +6 -2
- package/lib/cjs/client/shared/helpers.js +22 -22
- package/lib/cjs/client/shared/viewMode.js +1 -1
- package/lib/cjs/client/web/142.js +2 -0
- package/lib/cjs/client/web/142.js.LICENSE.txt +12 -0
- package/lib/cjs/client/web/32.js +1 -0
- package/lib/cjs/client/web/551.js +1 -0
- package/lib/cjs/client/web/566.js +2 -0
- package/lib/cjs/client/web/566.js.LICENSE.txt +31 -0
- package/lib/cjs/client/web/691.js +2 -0
- package/lib/cjs/client/web/691.js.LICENSE.txt +8 -0
- package/lib/cjs/client/web/725.js +1 -0
- package/lib/cjs/client/web/index.html +19 -19
- package/lib/cjs/client/web/main.js +2 -38
- package/lib/cjs/client/web/main.js.LICENSE.txt +49 -0
- package/lib/cjs/creevey.js +3 -5
- package/lib/cjs/index.js +4 -4
- package/lib/cjs/server/config.js +1 -1
- package/lib/cjs/server/docker.js +3 -7
- package/lib/cjs/server/index.js +1 -1
- package/lib/cjs/server/loaders/babel/creevey-plugin.js +1 -3
- package/lib/cjs/server/loaders/babel/helpers.js +13 -23
- package/lib/cjs/server/loaders/babel/register.js +1 -3
- package/lib/cjs/server/loaders/webpack/compile.js +31 -24
- package/lib/cjs/server/loaders/webpack/creevey-loader.js +10 -5
- package/lib/cjs/server/loaders/webpack/dummy-hmr.js +2 -7
- package/lib/cjs/server/loaders/webpack/mdx-loader.js +1 -1
- package/lib/cjs/server/loaders/webpack/start.js +1 -1
- package/lib/cjs/server/logger.js +2 -1
- package/lib/cjs/server/master/index.js +2 -2
- package/lib/cjs/server/master/pool.js +9 -18
- package/lib/cjs/server/master/runner.js +53 -66
- package/lib/cjs/server/master/server.js +2 -2
- package/lib/cjs/server/messages.js +8 -10
- package/lib/cjs/server/selenium/browser.js +23 -31
- package/lib/cjs/server/selenium/selenoid.js +5 -7
- package/lib/cjs/server/stories.js +9 -20
- package/lib/cjs/server/storybook/entry.js +5 -3
- package/lib/cjs/server/storybook/helpers.js +15 -21
- package/lib/cjs/server/storybook/providers/browser.js +5 -9
- package/lib/cjs/server/storybook/providers/nodejs.js +4 -4
- package/lib/cjs/server/update.js +1 -5
- package/lib/cjs/server/utils.js +13 -15
- package/lib/cjs/server/worker/reporter.js +8 -20
- package/lib/cjs/server/worker/worker.js +6 -16
- package/lib/cjs/shared/index.js +89 -0
- package/lib/cjs/shared/serializeRegExp.js +41 -0
- package/lib/cjs/types.js +6 -6
- package/lib/esm/client/addon/Manager.js +11 -5
- package/lib/esm/client/addon/components/Icons.js +1 -1
- package/lib/esm/client/addon/index.js +2 -0
- package/lib/esm/client/addon/preset.js +1 -1
- package/lib/esm/client/addon/register.js +6 -2
- package/lib/esm/client/addon/withCreevey.js +55 -30
- package/lib/esm/client/shared/creeveyClientApi.js +6 -2
- package/lib/esm/client/shared/helpers.js +6 -6
- package/lib/esm/creevey.js +3 -5
- package/lib/esm/index.js +1 -3
- package/lib/esm/server/docker.js +2 -2
- package/lib/esm/server/index.js +1 -1
- package/lib/esm/server/loaders/babel/creevey-plugin.js +1 -3
- package/lib/esm/server/loaders/babel/helpers.js +12 -22
- package/lib/esm/server/loaders/babel/register.js +1 -3
- package/lib/esm/server/loaders/webpack/compile.js +31 -24
- package/lib/esm/server/loaders/webpack/creevey-loader.js +9 -4
- package/lib/esm/server/loaders/webpack/dummy-hmr.js +2 -6
- package/lib/esm/server/loaders/webpack/start.js +1 -1
- package/lib/esm/server/master/index.js +2 -2
- package/lib/esm/server/master/pool.js +7 -18
- package/lib/esm/server/master/runner.js +53 -66
- package/lib/esm/server/master/server.js +2 -2
- package/lib/esm/server/messages.js +3 -5
- package/lib/esm/server/selenium/browser.js +20 -28
- package/lib/esm/server/selenium/selenoid.js +4 -6
- package/lib/esm/server/stories.js +9 -20
- package/lib/esm/server/storybook/entry.js +4 -2
- package/lib/esm/server/storybook/helpers.js +7 -15
- package/lib/esm/server/storybook/providers/browser.js +4 -5
- package/lib/esm/server/storybook/providers/nodejs.js +3 -3
- package/lib/esm/server/update.js +1 -5
- package/lib/esm/server/utils.js +5 -9
- package/lib/esm/server/worker/reporter.js +8 -20
- package/lib/esm/server/worker/worker.js +6 -16
- package/lib/esm/shared/index.js +66 -0
- package/lib/esm/shared/serializeRegExp.js +23 -0
- package/lib/types/cli.d.ts +1 -1
- package/lib/types/client/addon/Manager.d.ts +37 -37
- package/lib/types/client/addon/components/Addon.d.ts +8 -8
- package/lib/types/client/addon/components/Icons.d.ts +7 -7
- package/lib/types/client/addon/components/Panel.d.ts +9 -9
- package/lib/types/client/addon/components/TestSelect.d.ts +8 -9
- package/lib/types/client/addon/components/Tools.d.ts +6 -6
- package/lib/types/client/addon/decorator.d.ts +1 -1
- package/lib/types/client/addon/index.d.ts +2 -0
- package/lib/types/client/addon/preset.d.ts +23 -24
- package/lib/types/client/addon/readyForCapture.d.ts +6 -6
- package/lib/types/client/addon/register.d.ts +3 -3
- package/lib/types/client/addon/utils.d.ts +2 -2
- package/lib/types/client/addon/withCreevey.d.ts +24 -24
- package/lib/types/client/shared/components/ImagesView/BlendView.d.ts +3 -3
- package/lib/types/client/shared/components/ImagesView/ImagesView.d.ts +24 -25
- package/lib/types/client/shared/components/ImagesView/SideBySideView.d.ts +3 -3
- package/lib/types/client/shared/components/ImagesView/SlideView.d.ts +3 -3
- package/lib/types/client/shared/components/ImagesView/SwapView.d.ts +3 -3
- package/lib/types/client/shared/components/ImagesView/index.d.ts +5 -5
- package/lib/types/client/shared/components/PageFooter/PageFooter.d.ts +8 -9
- package/lib/types/client/shared/components/PageFooter/Paging.d.ts +7 -8
- package/lib/types/client/shared/components/PageHeader/ImagePreview.d.ts +12 -12
- package/lib/types/client/shared/components/PageHeader/PageHeader.d.ts +16 -17
- package/lib/types/client/shared/components/ResultsPage.d.ts +18 -18
- package/lib/types/client/shared/creeveyClientApi.d.ts +9 -9
- package/lib/types/client/shared/helpers.d.ts +46 -46
- package/lib/types/client/shared/viewMode.d.ts +4 -4
- package/lib/types/client/web/CreeveyApp.d.ts +11 -12
- package/lib/types/client/web/CreeveyContext.d.ts +11 -11
- package/lib/types/client/web/CreeveyLoader.d.ts +2 -3
- package/lib/types/client/web/CreeveyView/SideBar/Checkbox.d.ts +19 -19
- package/lib/types/client/web/CreeveyView/SideBar/Search.d.ts +6 -6
- package/lib/types/client/web/CreeveyView/SideBar/SideBar.d.ts +14 -14
- package/lib/types/client/web/CreeveyView/SideBar/SideBarHeader.d.ts +12 -13
- package/lib/types/client/web/CreeveyView/SideBar/SuiteLink.d.ts +33 -33
- package/lib/types/client/web/CreeveyView/SideBar/TestLink.d.ts +7 -8
- package/lib/types/client/web/CreeveyView/SideBar/TestStatusIcon.d.ts +10 -10
- package/lib/types/client/web/CreeveyView/SideBar/TestsStatus.d.ts +9 -9
- package/lib/types/client/web/CreeveyView/SideBar/Toggle.d.ts +6 -6
- package/lib/types/client/web/CreeveyView/SideBar/index.d.ts +1 -1
- package/lib/types/client/web/KeyboardEventsContext.d.ts +13 -13
- package/lib/types/client/web/index.d.ts +4 -4
- package/lib/types/creevey.d.ts +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/server/config.d.ts +4 -4
- package/lib/types/server/docker.d.ts +7 -7
- package/lib/types/server/extract.d.ts +2 -2
- package/lib/types/server/index.d.ts +2 -2
- package/lib/types/server/loaders/babel/creevey-plugin.d.ts +1 -1
- package/lib/types/server/loaders/babel/helpers.d.ts +19 -19
- package/lib/types/server/loaders/babel/register.d.ts +5 -5
- package/lib/types/server/loaders/hooks/mdx.d.ts +1 -1
- package/lib/types/server/loaders/hooks/svelte.d.ts +1 -1
- package/lib/types/server/loaders/webpack/compile.d.ts +2 -2
- package/lib/types/server/loaders/webpack/creevey-loader.d.ts +4 -2
- package/lib/types/server/loaders/webpack/dummy-hmr.d.ts +10 -10
- package/lib/types/server/loaders/webpack/mdx-loader.d.ts +6 -6
- package/lib/types/server/loaders/webpack/start.d.ts +1 -1
- package/lib/types/server/logger.d.ts +10 -6
- package/lib/types/server/master/api.d.ts +7 -7
- package/lib/types/server/master/index.d.ts +3 -3
- package/lib/types/server/master/master.d.ts +7 -7
- package/lib/types/server/master/pool.d.ts +31 -31
- package/lib/types/server/master/runner.d.ts +26 -26
- package/lib/types/server/master/server.d.ts +2 -2
- package/lib/types/server/messages.d.ts +27 -27
- package/lib/types/server/selenium/browser.d.ts +17 -17
- package/lib/types/server/selenium/index.d.ts +2 -2
- package/lib/types/server/selenium/selenoid.d.ts +3 -3
- package/lib/types/server/stories.d.ts +8 -8
- package/lib/types/server/storybook/entry.d.ts +18 -18
- package/lib/types/server/storybook/helpers.d.ts +24 -24
- package/lib/types/server/storybook/providers/browser.d.ts +4 -4
- package/lib/types/server/storybook/providers/hybrid.d.ts +4 -4
- package/lib/types/server/storybook/providers/nodejs.d.ts +9 -9
- package/lib/types/server/testsFiles/parser.d.ts +12 -12
- package/lib/types/server/testsFiles/register.d.ts +2 -2
- package/lib/types/server/update.d.ts +2 -2
- package/lib/types/server/utils.d.ts +20 -20
- package/lib/types/server/worker/chai-image.d.ts +6 -6
- package/lib/types/server/worker/helpers.d.ts +8 -8
- package/lib/types/server/worker/index.d.ts +1 -1
- package/lib/types/server/worker/reporter.d.ts +8 -8
- package/lib/types/server/worker/worker.d.ts +4 -4
- package/lib/types/{shared.d.ts → shared/index.d.ts} +7 -16
- package/lib/types/shared/serializeRegExp.d.ts +9 -0
- package/lib/types/types.d.ts +490 -489
- package/package.json +115 -102
- package/preset.js +9 -9
- package/types/babel__register.d.ts +1 -1
- package/types/chai.d.ts +12 -12
- package/types/event-source-polyfill.d.ts +6 -6
- package/types/mdx.d.ts +3 -2
- package/types/mocha.d.ts +20 -20
- package/types/png.d.ts +4 -4
- package/lib/cjs/client/web/1.js +0 -13
- package/lib/cjs/client/web/2.js +0 -1
- package/lib/cjs/shared.js +0 -124
- package/lib/esm/shared.js +0 -93
- package/storybook-static/stories.json +0 -21
@@ -5,28 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.loadStories = loadStories;
|
7
7
|
|
8
|
-
var _cluster =
|
8
|
+
var _cluster = _interopRequireDefault(require("cluster"));
|
9
9
|
|
10
10
|
var _selenium = require("../../selenium");
|
11
11
|
|
12
12
|
var _messages = require("../../messages");
|
13
13
|
|
14
|
-
var _shared = require("../../../shared");
|
15
|
-
|
16
14
|
var _types = require("../../../types");
|
17
15
|
|
18
16
|
var _logger = require("../../logger");
|
19
17
|
|
20
|
-
function
|
21
|
-
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
19
|
|
24
20
|
async function loadStories(_config, {
|
25
21
|
port
|
26
22
|
}, storiesListener) {
|
27
|
-
if (_cluster.
|
23
|
+
if (_cluster.default.isPrimary) {
|
28
24
|
return new Promise(resolve => {
|
29
|
-
const worker = Object.values(_cluster.default.workers).filter(_types.isDefined).find(worker => worker.isConnected());
|
25
|
+
const worker = Object.values(_cluster.default.workers ?? {}).filter(_types.isDefined).find(worker => worker.isConnected());
|
30
26
|
|
31
27
|
if (worker) {
|
32
28
|
const unsubscribe = (0, _messages.subscribeOnWorker)(worker, 'stories', message => {
|
@@ -61,7 +57,7 @@ async function loadStories(_config, {
|
|
61
57
|
});
|
62
58
|
if (message.type == 'update') storiesListener(new Map(message.payload));
|
63
59
|
});
|
64
|
-
const stories =
|
60
|
+
const stories = await (0, _selenium.loadStoriesFromBrowser)(port);
|
65
61
|
const storiesWithOldTests = [];
|
66
62
|
Object.values(stories).forEach(story => {
|
67
63
|
var _parameters, _parameters$creevey;
|
@@ -3,12 +3,12 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.loadStories = loadStories;
|
7
6
|
exports.extractStoriesData = extractStoriesData;
|
7
|
+
exports.loadStories = loadStories;
|
8
8
|
|
9
9
|
var _path = _interopRequireDefault(require("path"));
|
10
10
|
|
11
|
-
var _cluster = require("cluster");
|
11
|
+
var _cluster = _interopRequireDefault(require("cluster"));
|
12
12
|
|
13
13
|
var _chokidar = _interopRequireDefault(require("chokidar"));
|
14
14
|
|
@@ -46,7 +46,7 @@ async function initStorybookEnvironment() {
|
|
46
46
|
logger
|
47
47
|
} = await (0, _helpers.importStorybookClientLogger)(); // NOTE: Disable duplication warnings for >=6.2 storybook
|
48
48
|
|
49
|
-
if (_cluster.isWorker) logger.warn = _types.noop; // NOTE: disable logger for 5.x storybook
|
49
|
+
if (_cluster.default.isWorker) logger.warn = _types.noop; // NOTE: disable logger for 5.x storybook
|
50
50
|
|
51
51
|
logger.debug = _types.noop;
|
52
52
|
return Promise.resolve().then(() => _interopRequireWildcard(require('../entry')));
|
@@ -175,7 +175,7 @@ async function loadStoriesDirectly(config, {
|
|
175
175
|
try {
|
176
176
|
configure(contexts.map(ctx => ctx()), module, false);
|
177
177
|
} catch (error) {
|
178
|
-
if (_cluster.
|
178
|
+
if (_cluster.default.isPrimary) _logger.logger.error(error);
|
179
179
|
}
|
180
180
|
}
|
181
181
|
|
package/lib/cjs/server/update.js
CHANGED
@@ -31,11 +31,7 @@ function tryToLoadTestsData(filename) {
|
|
31
31
|
const actualRegex = /^(.*)-actual-(\d+)\.png$/i;
|
32
32
|
|
33
33
|
function approve(dirents, srcPath, dstPath, testPaths, isMatch) {
|
34
|
-
dirents.filter(dirent => dirent.isFile()).map(dirent => actualRegex.exec(dirent.name)).filter(_types.isDefined).filter(([fileName, imageName]) => !testPaths || testPaths.find(([token]) => token == imageName) && isMatch(_path.default.join(srcPath, fileName))).reduce((images, [, imageName, retry]) => {
|
35
|
-
var _images$get;
|
36
|
-
|
37
|
-
return Number(retry) > ((_images$get = images.get(imageName)) !== null && _images$get !== void 0 ? _images$get : -1) ? images.set(imageName, Number(retry)) : images;
|
38
|
-
}, new Map()).forEach((retry, imageName) => {
|
34
|
+
dirents.filter(dirent => dirent.isFile()).map(dirent => actualRegex.exec(dirent.name)).filter(_types.isDefined).filter(([fileName, imageName]) => !testPaths || testPaths.find(([token]) => token == imageName) && isMatch(_path.default.join(srcPath, fileName))).reduce((images, [, imageName, retry]) => Number(retry) > (images.get(imageName) ?? -1) ? images.set(imageName, Number(retry)) : images, new Map()).forEach((retry, imageName) => {
|
39
35
|
(0, _fs.mkdirSync)(dstPath, {
|
40
36
|
recursive: true
|
41
37
|
});
|
package/lib/cjs/server/utils.js
CHANGED
@@ -3,15 +3,17 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
exports.shutdownWorkers = shutdownWorkers;
|
8
|
-
exports.shutdown = shutdown;
|
6
|
+
exports.extensions = exports.downloadBinary = exports.LOCALHOST_REGEXP = void 0;
|
9
7
|
exports.getCreeveyCache = getCreeveyCache;
|
8
|
+
exports.isShuttingDown = exports.isInsideDocker = void 0;
|
9
|
+
exports.readDirRecursive = readDirRecursive;
|
10
|
+
exports.removeProps = removeProps;
|
10
11
|
exports.runSequence = runSequence;
|
12
|
+
exports.shouldSkip = shouldSkip;
|
13
|
+
exports.shutdown = shutdown;
|
14
|
+
exports.shutdownWorkers = shutdownWorkers;
|
15
|
+
exports.skipOptionKeys = void 0;
|
11
16
|
exports.testsToImages = testsToImages;
|
12
|
-
exports.removeProps = removeProps;
|
13
|
-
exports.readDirRecursive = readDirRecursive;
|
14
|
-
exports.downloadBinary = exports.isInsideDocker = exports.skipOptionKeys = exports.extensions = exports.LOCALHOST_REGEXP = exports.isShuttingDown = void 0;
|
15
17
|
|
16
18
|
var _fs = require("fs");
|
17
19
|
|
@@ -92,7 +94,7 @@ function shouldSkip(browser, meta, skipOptions, test) {
|
|
92
94
|
|
93
95
|
async function shutdownWorkers() {
|
94
96
|
isShuttingDown.current = true;
|
95
|
-
await Promise.all(Object.values(_cluster.default.workers).filter(_types.isDefined).filter(worker => worker.isConnected()).map(worker => new Promise(resolve => {
|
97
|
+
await Promise.all(Object.values(_cluster.default.workers ?? {}).filter(_types.isDefined).filter(worker => worker.isConnected()).map(worker => new Promise(resolve => {
|
96
98
|
const timeout = setTimeout(() => worker.kill(), 10000);
|
97
99
|
worker.on('exit', () => {
|
98
100
|
clearTimeout(timeout);
|
@@ -128,9 +130,9 @@ function testsToImages(tests) {
|
|
128
130
|
storyPath,
|
129
131
|
results
|
130
132
|
}) => {
|
131
|
-
var _results$slice
|
133
|
+
var _results$slice$;
|
132
134
|
|
133
|
-
return Object.keys((
|
135
|
+
return Object.keys((results === null || results === void 0 ? void 0 : (_results$slice$ = results.slice(-1)[0]) === null || _results$slice$ === void 0 ? void 0 : _results$slice$.images) ?? {}).map(image => `${[...storyPath, testName, browser, browser == image ? undefined : image].filter(_types.isDefined).join('/')}.png`);
|
134
136
|
})));
|
135
137
|
} // https://tuhrig.de/how-to-know-you-are-inside-a-docker-container/
|
136
138
|
|
@@ -139,19 +141,15 @@ const isInsideDocker = (0, _fs.existsSync)('/proc/1/cgroup') && /docker/.test((0
|
|
139
141
|
exports.isInsideDocker = isInsideDocker;
|
140
142
|
|
141
143
|
const downloadBinary = (downloadUrl, destination) => new Promise((resolve, reject) => (0, _https.get)(downloadUrl, response => {
|
142
|
-
var _response$statusCode2;
|
143
|
-
|
144
144
|
if (response.statusCode == 302) {
|
145
|
-
var _response$statusCode;
|
146
|
-
|
147
145
|
const {
|
148
146
|
location
|
149
147
|
} = response.headers;
|
150
|
-
if (!location) return reject(new Error(`Couldn't download selenoid. Status code: ${
|
148
|
+
if (!location) return reject(new Error(`Couldn't download selenoid. Status code: ${response.statusCode ?? 'UNKNOWN'}`));
|
151
149
|
return resolve(downloadBinary(location, destination));
|
152
150
|
}
|
153
151
|
|
154
|
-
if (response.statusCode != 200) return reject(new Error(`Couldn't download selenoid. Status code: ${
|
152
|
+
if (response.statusCode != 200) return reject(new Error(`Couldn't download selenoid. Status code: ${response.statusCode ?? 'UNKNOWN'}`));
|
155
153
|
const fileStream = (0, _fs.createWriteStream)(destination);
|
156
154
|
response.pipe(fileStream);
|
157
155
|
fileStream.on('finish', () => {
|
@@ -17,8 +17,6 @@ var _logger = require("../logger");
|
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
20
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
21
|
-
|
22
20
|
const testLevels = {
|
23
21
|
INFO: _chalk.default.green('PASS'),
|
24
22
|
WARN: _chalk.default.yellow('START'),
|
@@ -43,11 +41,7 @@ class CreeveyReporter extends _mocha.reporters.Base {
|
|
43
41
|
|
44
42
|
runner.on('test', test => testLogger.warn(_chalk.default.cyan(test.titlePath().join('/'))));
|
45
43
|
runner.on('pass', test => testLogger.info(_chalk.default.cyan(test.titlePath().join('/'))));
|
46
|
-
runner.on('fail', (test, error) => testLogger.error(_chalk.default.cyan(test.titlePath().join('/')), '\n ', getErrors(error, (error, imageName) => `${_chalk.default.bold(imageName
|
47
|
-
var _error$stack;
|
48
|
-
|
49
|
-
return `${(_error$stack = error.stack) !== null && _error$stack !== void 0 ? _error$stack : error.message}`;
|
50
|
-
}).join('\n ')));
|
44
|
+
runner.on('fail', (test, error) => testLogger.error(_chalk.default.cyan(test.titlePath().join('/')), '\n ', getErrors(error, (error, imageName) => `${_chalk.default.bold(imageName ?? topLevelSuite)}:${error}`, error => `${error.stack ?? error.message}`).join('\n ')));
|
51
45
|
}
|
52
46
|
|
53
47
|
}
|
@@ -57,20 +51,11 @@ exports.CreeveyReporter = CreeveyReporter;
|
|
57
51
|
class TeamcityReporter extends _mocha.reporters.Base {
|
58
52
|
constructor(runner, options) {
|
59
53
|
super(runner);
|
60
|
-
|
61
|
-
_defineProperty(this, "escape", str => {
|
62
|
-
if (!str) return '';
|
63
|
-
return str.toString() // eslint-disable-next-line no-control-regex
|
64
|
-
.replace(/\x1B.*?m/g, '').replace(/\|/g, '||').replace(/\n/g, '|n').replace(/\r/g, '|r').replace(/\[/g, '|[').replace(/\]/g, '|]').replace(/\u0085/g, '|x').replace(/\u2028/g, '|l').replace(/\u2029/g, '|p').replace(/'/g, "|'");
|
65
|
-
});
|
66
|
-
|
67
54
|
const topLevelSuite = this.escape(options.reporterOptions.topLevelSuite);
|
68
55
|
const reporterOptions = options.reporterOptions;
|
69
56
|
runner.on('suite', suite => suite.root ? console.log(`##teamcity[testSuiteStarted name='${topLevelSuite}' flowId='${process.pid}']`) : console.log(`##teamcity[testSuiteStarted name='${this.escape(suite.title)}' flowId='${process.pid}']`));
|
70
57
|
runner.on('test', test => console.log(`##teamcity[testStarted name='${this.escape(test.title)}' flowId='${process.pid}']`));
|
71
58
|
runner.on('fail', (test, error) => {
|
72
|
-
var _error$stack2;
|
73
|
-
|
74
59
|
Object.entries(reporterOptions.images).forEach(([name, image]) => {
|
75
60
|
if (!image) return;
|
76
61
|
const filePath = test.titlePath().concat(name == topLevelSuite ? [] : [topLevelSuite]).map(this.escape).join('/'); // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
@@ -86,7 +71,7 @@ class TeamcityReporter extends _mocha.reporters.Base {
|
|
86
71
|
}); // Output failed test as passed due TC don't support retry mechanic
|
87
72
|
// https://teamcity-support.jetbrains.com/hc/en-us/community/posts/207216829-Count-test-as-successful-if-at-least-one-try-is-successful?page=1#community_comment_207394125
|
88
73
|
|
89
|
-
reporterOptions.willRetry ? console.log(`##teamcity[testFinished name='${this.escape(test.title)}' flowId='${process.pid}']`) : console.log(`##teamcity[testFailed name='${this.escape(test.title)}' message='${this.escape(error.message)}' details='${this.escape(
|
74
|
+
reporterOptions.willRetry ? console.log(`##teamcity[testFinished name='${this.escape(test.title)}' flowId='${process.pid}']`) : console.log(`##teamcity[testFailed name='${this.escape(test.title)}' message='${this.escape(error.message)}' details='${this.escape(error.stack ?? '')}' flowId='${process.pid}']`);
|
90
75
|
});
|
91
76
|
runner.on('pending', test => console.log(`##teamcity[testIgnored name='${this.escape(test.title)}' message='${this.escape(typeof test.skipReason == 'boolean' ? test.title : test.skipReason)}' flowId='${process.pid}']`));
|
92
77
|
runner.on('test end', test => console.log(`##teamcity[testFinished name='${this.escape(test.title)}' flowId='${process.pid}']`));
|
@@ -94,6 +79,11 @@ class TeamcityReporter extends _mocha.reporters.Base {
|
|
94
79
|
runner.on('end', () => console.log(`##teamcity[testSuiteFinished name='${topLevelSuite}' flowId='${process.pid}']`));
|
95
80
|
}
|
96
81
|
|
82
|
+
escape = str => {
|
83
|
+
if (!str) return '';
|
84
|
+
return str.toString() // eslint-disable-next-line no-control-regex
|
85
|
+
.replace(/\x1B.*?m/g, '').replace(/\|/g, '||').replace(/\n/g, '|n').replace(/\r/g, '|r').replace(/\[/g, '|[').replace(/\]/g, '|]').replace(/\u0085/g, '|x').replace(/\u2028/g, '|l').replace(/\u2029/g, '|p').replace(/'/g, "|'");
|
86
|
+
};
|
97
87
|
}
|
98
88
|
|
99
89
|
exports.TeamcityReporter = TeamcityReporter;
|
@@ -110,9 +100,7 @@ function getErrors(error, imageErrorToString, errorToString) {
|
|
110
100
|
} else {
|
111
101
|
const imageErrors = error.images;
|
112
102
|
Object.keys(imageErrors).forEach(imageName => {
|
113
|
-
|
114
|
-
|
115
|
-
errors.push(imageErrorToString((_imageErrors$imageNam = imageErrors[imageName]) !== null && _imageErrors$imageNam !== void 0 ? _imageErrors$imageNam : '', imageName));
|
103
|
+
errors.push(imageErrorToString(imageErrors[imageName] ?? '', imageName));
|
116
104
|
});
|
117
105
|
}
|
118
106
|
|
@@ -57,9 +57,7 @@ async function getLastImageNumber(imageDir, imageName) {
|
|
57
57
|
const actualImagesRegexp = new RegExp(`${imageName}-actual-(\\d+)\\.png`);
|
58
58
|
|
59
59
|
try {
|
60
|
-
|
61
|
-
|
62
|
-
return (_await$readdirAsync$m = (await readdirAsync(imageDir)).map(filename => filename.replace(actualImagesRegexp, '$1')).map(Number).filter(x => !isNaN(x)).sort((a, b) => b - a)[0]) !== null && _await$readdirAsync$m !== void 0 ? _await$readdirAsync$m : 0;
|
60
|
+
return (await readdirAsync(imageDir)).map(filename => filename.replace(actualImagesRegexp, '$1')).map(Number).filter(x => !isNaN(x)).sort((a, b) => b - a)[0] ?? 0;
|
63
61
|
} catch (_error) {
|
64
62
|
return 0;
|
65
63
|
}
|
@@ -77,8 +75,6 @@ async function worker(config, options) {
|
|
77
75
|
|
78
76
|
function runHandler(failures) {
|
79
77
|
if (failures > 0 && (error || Object.values(images).some(image => (image === null || image === void 0 ? void 0 : image.error) != null))) {
|
80
|
-
var _error2;
|
81
|
-
|
82
78
|
const isTimeout = hasTimeout(error) || Object.values(images).some(image => hasTimeout(image === null || image === void 0 ? void 0 : image.error));
|
83
79
|
const payload = {
|
84
80
|
status: 'failed',
|
@@ -88,7 +84,7 @@ async function worker(config, options) {
|
|
88
84
|
isTimeout ? (0, _messages.emitWorkerMessage)({
|
89
85
|
type: 'error',
|
90
86
|
payload: {
|
91
|
-
error:
|
87
|
+
error: error ?? 'Unknown error'
|
92
88
|
}
|
93
89
|
}) : (0, _messages.emitTestMessage)({
|
94
90
|
type: 'end',
|
@@ -119,20 +115,18 @@ async function worker(config, options) {
|
|
119
115
|
}
|
120
116
|
|
121
117
|
async function getExpected(assertImageName) {
|
122
|
-
var _images$imageName;
|
123
|
-
|
124
118
|
// context => [kind, story, test, browser]
|
125
119
|
// rootSuite -> kindSuite -> storyTest -> [browsers.png]
|
126
120
|
// rootSuite -> kindSuite -> storySuite -> test -> [browsers.png]
|
127
121
|
const testPath = [...testScope];
|
128
|
-
const imageName = assertImageName
|
122
|
+
const imageName = assertImageName ?? testPath.pop();
|
129
123
|
const imagesMeta = [];
|
130
124
|
|
131
125
|
const reportImageDir = _path.default.join(config.reportDir, ...testPath);
|
132
126
|
|
133
127
|
const imageNumber = (await getLastImageNumber(reportImageDir, imageName)) + 1;
|
134
128
|
const actualImageName = `${imageName}-actual-${imageNumber}.png`;
|
135
|
-
const image = images[imageName] =
|
129
|
+
const image = images[imageName] = images[imageName] ?? {
|
136
130
|
actual: actualImageName
|
137
131
|
};
|
138
132
|
|
@@ -195,9 +189,7 @@ async function worker(config, options) {
|
|
195
189
|
|
196
190
|
}
|
197
191
|
};
|
198
|
-
const mocha = new _mocha.default(mochaOptions);
|
199
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
200
|
-
|
192
|
+
const mocha = new _mocha.default(mochaOptions);
|
201
193
|
mocha.cleanReferencesAfterRun(false);
|
202
194
|
|
203
195
|
_chai.default.use((0, _chaiImage.default)(getExpected, config.diffOptions));
|
@@ -250,9 +242,7 @@ async function worker(config, options) {
|
|
250
242
|
if (!(reason instanceof Error)) {
|
251
243
|
error = reason;
|
252
244
|
} else if (!(0, _types.isImageError)(reason)) {
|
253
|
-
|
254
|
-
|
255
|
-
error = (_reason$stack = reason.stack) !== null && _reason$stack !== void 0 ? _reason$stack : reason.message;
|
245
|
+
error = reason.stack ?? reason.message;
|
256
246
|
} else if (typeof reason.images == 'string') {
|
257
247
|
const image = images[testScope.slice(-1)[0]];
|
258
248
|
if (image) image.error = reason.images;
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.serializeRawStories = exports.deserializeStory = exports.deserializeRawStories = exports.denormalizeStoryParameters = exports.combineParameters = void 0;
|
7
|
+
|
8
|
+
var _lodash = require("lodash");
|
9
|
+
|
10
|
+
var _serializeRegExp = require("./serializeRegExp");
|
11
|
+
|
12
|
+
// NOTE: Copy-paste from storybook/api
|
13
|
+
const combineParameters = (...parameterSets) => // eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
14
|
+
(0, _lodash.mergeWith)({}, ...parameterSets, (_, srcValue) => {
|
15
|
+
// Treat arrays as scalars:
|
16
|
+
if (Array.isArray(srcValue)) return srcValue;
|
17
|
+
return undefined;
|
18
|
+
}); // NOTE: Copy-paste from storybook/api
|
19
|
+
|
20
|
+
|
21
|
+
exports.combineParameters = combineParameters;
|
22
|
+
|
23
|
+
const denormalizeStoryParameters = ({
|
24
|
+
globalParameters,
|
25
|
+
kindParameters,
|
26
|
+
stories
|
27
|
+
}) => {
|
28
|
+
return (0, _lodash.mapValues)(stories, storyData => ({ ...storyData,
|
29
|
+
parameters: combineParameters(globalParameters, kindParameters[storyData.kind] ?? {}, storyData.parameters)
|
30
|
+
}));
|
31
|
+
};
|
32
|
+
|
33
|
+
exports.denormalizeStoryParameters = denormalizeStoryParameters;
|
34
|
+
|
35
|
+
const serializeRawStories = stories => {
|
36
|
+
return (0, _lodash.mapValues)(stories, storyData => {
|
37
|
+
const creevey = storyData.parameters.creevey;
|
38
|
+
|
39
|
+
if (creevey !== null && creevey !== void 0 && creevey.skip) {
|
40
|
+
return { ...storyData,
|
41
|
+
parameters: { ...storyData.parameters,
|
42
|
+
creevey: { ...creevey,
|
43
|
+
skip: (0, _lodash.cloneDeepWith)(creevey.skip, value => {
|
44
|
+
if ((0, _serializeRegExp.isRegExp)(value)) {
|
45
|
+
return (0, _serializeRegExp.serializeRegExp)(value);
|
46
|
+
}
|
47
|
+
|
48
|
+
return undefined;
|
49
|
+
})
|
50
|
+
}
|
51
|
+
}
|
52
|
+
};
|
53
|
+
}
|
54
|
+
|
55
|
+
return storyData;
|
56
|
+
});
|
57
|
+
};
|
58
|
+
|
59
|
+
exports.serializeRawStories = serializeRawStories;
|
60
|
+
|
61
|
+
const deserializeRawStories = stories => {
|
62
|
+
return (0, _lodash.mapValues)(stories, deserializeStory);
|
63
|
+
};
|
64
|
+
|
65
|
+
exports.deserializeRawStories = deserializeRawStories;
|
66
|
+
|
67
|
+
const deserializeStory = story => {
|
68
|
+
const creevey = story.parameters.creevey;
|
69
|
+
|
70
|
+
if (creevey !== null && creevey !== void 0 && creevey.skip) {
|
71
|
+
return { ...story,
|
72
|
+
parameters: { ...story.parameters,
|
73
|
+
creevey: { ...creevey,
|
74
|
+
skip: (0, _lodash.cloneDeepWith)(creevey.skip, value => {
|
75
|
+
if ((0, _serializeRegExp.isSerializedRegExp)(value)) {
|
76
|
+
return (0, _serializeRegExp.deserializeRegExp)(value);
|
77
|
+
}
|
78
|
+
|
79
|
+
return undefined;
|
80
|
+
})
|
81
|
+
}
|
82
|
+
}
|
83
|
+
};
|
84
|
+
}
|
85
|
+
|
86
|
+
return story;
|
87
|
+
};
|
88
|
+
|
89
|
+
exports.deserializeStory = deserializeStory;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.serializeRegExp = exports.isSerializedRegExp = exports.isRegExp = exports.deserializeRegExp = void 0;
|
7
|
+
|
8
|
+
const isRegExp = exp => {
|
9
|
+
return exp instanceof RegExp;
|
10
|
+
};
|
11
|
+
|
12
|
+
exports.isRegExp = isRegExp;
|
13
|
+
|
14
|
+
const isSerializedRegExp = exp => {
|
15
|
+
return typeof exp === 'object' && exp !== null && Reflect.get(exp, '__regexp') === true;
|
16
|
+
};
|
17
|
+
|
18
|
+
exports.isSerializedRegExp = isSerializedRegExp;
|
19
|
+
|
20
|
+
const serializeRegExp = exp => {
|
21
|
+
const {
|
22
|
+
source,
|
23
|
+
flags
|
24
|
+
} = exp;
|
25
|
+
return {
|
26
|
+
__regexp: true,
|
27
|
+
source,
|
28
|
+
flags
|
29
|
+
};
|
30
|
+
};
|
31
|
+
|
32
|
+
exports.serializeRegExp = serializeRegExp;
|
33
|
+
|
34
|
+
const deserializeRegExp = ({
|
35
|
+
source,
|
36
|
+
flags
|
37
|
+
}) => {
|
38
|
+
return new RegExp(source, flags);
|
39
|
+
};
|
40
|
+
|
41
|
+
exports.deserializeRegExp = deserializeRegExp;
|
package/lib/cjs/types.js
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.noop = noop;
|
7
6
|
exports.isDefined = isDefined;
|
8
|
-
exports.
|
9
|
-
exports.isObject = isObject;
|
10
|
-
exports.isString = isString;
|
7
|
+
exports.isDockerMessage = isDockerMessage;
|
11
8
|
exports.isFunction = isFunction;
|
12
9
|
exports.isImageError = isImageError;
|
10
|
+
exports.isObject = isObject;
|
13
11
|
exports.isProcessMessage = isProcessMessage;
|
14
|
-
exports.isWorkerMessage = isWorkerMessage;
|
15
12
|
exports.isStoriesMessage = isStoriesMessage;
|
13
|
+
exports.isString = isString;
|
14
|
+
exports.isTest = isTest;
|
16
15
|
exports.isTestMessage = isTestMessage;
|
17
16
|
exports.isWebpackMessage = isWebpackMessage;
|
18
|
-
exports.
|
17
|
+
exports.isWorkerMessage = isWorkerMessage;
|
18
|
+
exports.noop = noop;
|
19
19
|
|
20
20
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
21
21
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
+
|
1
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
4
|
|
3
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -18,6 +20,8 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
18
20
|
|
19
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
20
22
|
|
23
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
24
|
+
|
21
25
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
22
26
|
|
23
27
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -26,7 +30,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
26
30
|
|
27
31
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
28
32
|
|
29
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
33
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
30
34
|
|
31
35
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
32
36
|
|
@@ -57,14 +61,16 @@ export var CreeveyManager = /*#__PURE__*/function () {
|
|
57
61
|
|
58
62
|
_defineProperty(this, "creeveyApi", null);
|
59
63
|
|
64
|
+
_defineProperty(this, "storybookApi", void 0);
|
65
|
+
|
60
66
|
_defineProperty(this, "stories", {});
|
61
67
|
|
62
68
|
_defineProperty(this, "updateStatusListeners", []);
|
63
69
|
|
64
70
|
_defineProperty(this, "changeTestListeners", []);
|
65
71
|
|
66
|
-
_defineProperty(this, "initAll", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
67
|
-
return
|
72
|
+
_defineProperty(this, "initAll", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
73
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
68
74
|
while (1) {
|
69
75
|
switch (_context.prev = _context.next) {
|
70
76
|
case 0:
|
@@ -336,11 +342,11 @@ export var CreeveyManager = /*#__PURE__*/function () {
|
|
336
342
|
}, {
|
337
343
|
key: "addStatusesToSideBar",
|
338
344
|
value: function () {
|
339
|
-
var _addStatusesToSideBar = _asyncToGenerator( /*#__PURE__*/
|
345
|
+
var _addStatusesToSideBar = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
340
346
|
var _this4 = this;
|
341
347
|
|
342
348
|
var stories;
|
343
|
-
return
|
349
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
344
350
|
while (1) {
|
345
351
|
switch (_context2.prev = _context2.next) {
|
346
352
|
case 0:
|
@@ -22,6 +22,6 @@ export var ForwardIcon = function ForwardIcon(_ref2) {
|
|
22
22
|
viewBox: "0 0 512 512"
|
23
23
|
}, /*#__PURE__*/React.createElement("path", {
|
24
24
|
fill: "currentColor",
|
25
|
-
d: "M460.9,246.8l-209-164.2c-7.8-6.1-19.2-0.6-19.2,9.2v328.4c0,9.8,11.4,15.3,19.2,9.2l209-164.2c5.1-4,6-11.4,2-16.5 C462.4,248,461.7,247.3,460.9,246.8L460.9,246.8z M228.2,246.8L19.2,82.5C11.4,76.4,0,82,0,91.8v328.4c0,9.8,11.4,15.3,19.2,9.2 l209-164.2c3-2.3,4.5-5.8,4.5-9.2C232.7,252.6,231.2,249.1,228.2,246.8z M507.3,64h-37.2c-2.5,0-4.7,2-4.7,4.4v375.3 c0,2.4,2.1,4.4,4.7,4.4h37.2c2.5,0,4.7-2,4.7-4.4V68.4C512,66,509.9,64,507.3,64z"
|
25
|
+
d: "M460.9,246.8l-209-164.2c-7.8-6.1-19.2-0.6-19.2,9.2v328.4c0,9.8,11.4,15.3,19.2,9.2l209-164.2c5.1-4,6-11.4,2-16.5\r C462.4,248,461.7,247.3,460.9,246.8L460.9,246.8z M228.2,246.8L19.2,82.5C11.4,76.4,0,82,0,91.8v328.4c0,9.8,11.4,15.3,19.2,9.2\r l209-164.2c3-2.3,4.5-5.8,4.5-9.2C232.7,252.6,231.2,249.1,228.2,246.8z M507.3,64h-37.2c-2.5,0-4.7,2-4.7,4.4v375.3\r c0,2.4,2.1,4.4,4.7,4.4h37.2c2.5,0,4.7-2,4.7-4.4V68.4C512,66,509.9,64,507.3,64z"
|
26
26
|
}));
|
27
27
|
};
|
@@ -22,7 +22,7 @@ export function managerEntries() {
|
|
22
22
|
var entry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
23
23
|
return [].concat(_toConsumableArray(entry), [require.resolve('./register')]);
|
24
24
|
}
|
25
|
-
export function
|
25
|
+
export function _managerWebpack(config, options) {
|
26
26
|
var _options$presets$appl, _options$presets;
|
27
27
|
|
28
28
|
// TODO How to execute with non-webpack bundlers
|
@@ -1,3 +1,7 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
+
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
4
|
+
|
1
5
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
2
6
|
|
3
7
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -16,9 +20,9 @@ export function registerCreeveyPanels(_x) {
|
|
16
20
|
}
|
17
21
|
|
18
22
|
function _registerCreeveyPanels() {
|
19
|
-
_registerCreeveyPanels = _asyncToGenerator( /*#__PURE__*/
|
23
|
+
_registerCreeveyPanels = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(storybookApi) {
|
20
24
|
var manager, browsers;
|
21
|
-
return
|
25
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
22
26
|
while (1) {
|
23
27
|
switch (_context.prev = _context.next) {
|
24
28
|
case 0:
|