creevey 0.9.0-beta.6 → 0.9.0-beta.8
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.
@@ -145,9 +145,11 @@ async function waitForStorybook(browser) {
|
|
145
145
|
return callback(false);
|
146
146
|
}, Events.SET_STORIES);
|
147
147
|
} else {
|
148
|
-
wait = await browser.executeAsyncScript(function (callback) {
|
149
|
-
|
150
|
-
|
148
|
+
wait = await browser.executeAsyncScript(function (SET_GLOBALS, callback) {
|
149
|
+
if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
|
150
|
+
if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_GLOBALS) == undefined) return callback(true);
|
151
|
+
return callback(false);
|
152
|
+
}, Events.SET_GLOBALS);
|
151
153
|
}
|
152
154
|
|
153
155
|
if (!wait) clearTimeout(initiateTimeout);
|
@@ -419,10 +421,12 @@ async function resolveCreeveyHost(browser, port) {
|
|
419
421
|
const addresses = getAddresses();
|
420
422
|
creeveyServerHost = await browser.executeAsyncScript(function (hosts, port, callback) {
|
421
423
|
void Promise.all(hosts.map(function (host) {
|
422
|
-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
423
|
-
|
424
|
+
return Promise.race([// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
425
|
+
fetch('http://' + host + ':' + port + '/ping').then(function (response) {
|
424
426
|
return response.text();
|
425
|
-
})
|
427
|
+
}), new Promise((_resolve, reject) => {
|
428
|
+
setTimeout(reject, 5000);
|
429
|
+
})]).then(function (pong) {
|
426
430
|
return pong == 'pong' ? host : null;
|
427
431
|
}).catch(function () {
|
428
432
|
return null;
|
@@ -37,12 +37,8 @@ async function register(config) {
|
|
37
37
|
},
|
38
38
|
modules: 'commonjs'
|
39
39
|
}]],
|
40
|
-
plugins: [['@babel/plugin-transform-runtime'], ['babel-plugin-tsconfig-paths', {
|
40
|
+
plugins: [['@babel/plugin-transform-runtime'], ...(tsConfigPath ? [['babel-plugin-tsconfig-paths', {
|
41
41
|
tsconfig: tsConfigPath
|
42
|
-
}]]
|
43
|
-
}));
|
44
|
-
(await Promise.resolve().then(() => _interopRequireWildcard(require('ts-node')))).register({
|
45
|
-
project: tsConfigPath,
|
46
|
-
transpileOnly: true
|
47
|
-
});
|
42
|
+
}]] : [])]
|
43
|
+
})); // (await import('ts-node')).register({ project: tsConfigPath, transpileOnly: true });
|
48
44
|
}
|
@@ -117,9 +117,11 @@ async function waitForStorybook(browser) {
|
|
117
117
|
return callback(false);
|
118
118
|
}, Events.SET_STORIES);
|
119
119
|
} else {
|
120
|
-
wait = await browser.executeAsyncScript(function (callback) {
|
121
|
-
|
122
|
-
|
120
|
+
wait = await browser.executeAsyncScript(function (SET_GLOBALS, callback) {
|
121
|
+
if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
|
122
|
+
if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_GLOBALS) == undefined) return callback(true);
|
123
|
+
return callback(false);
|
124
|
+
}, Events.SET_GLOBALS);
|
123
125
|
}
|
124
126
|
|
125
127
|
if (!wait) clearTimeout(initiateTimeout);
|
@@ -391,10 +393,12 @@ async function resolveCreeveyHost(browser, port) {
|
|
391
393
|
const addresses = getAddresses();
|
392
394
|
creeveyServerHost = await browser.executeAsyncScript(function (hosts, port, callback) {
|
393
395
|
void Promise.all(hosts.map(function (host) {
|
394
|
-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
395
|
-
|
396
|
+
return Promise.race([// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
397
|
+
fetch('http://' + host + ':' + port + '/ping').then(function (response) {
|
396
398
|
return response.text();
|
397
|
-
})
|
399
|
+
}), new Promise((_resolve, reject) => {
|
400
|
+
setTimeout(reject, 5000);
|
401
|
+
})]).then(function (pong) {
|
398
402
|
return pong == 'pong' ? host : null;
|
399
403
|
}).catch(function () {
|
400
404
|
return null;
|
@@ -24,12 +24,8 @@ export default async function register(config) {
|
|
24
24
|
},
|
25
25
|
modules: 'commonjs'
|
26
26
|
}]],
|
27
|
-
plugins: [['@babel/plugin-transform-runtime'], ['babel-plugin-tsconfig-paths', {
|
27
|
+
plugins: [['@babel/plugin-transform-runtime'], ...(tsConfigPath ? [['babel-plugin-tsconfig-paths', {
|
28
28
|
tsconfig: tsConfigPath
|
29
|
-
}]]
|
30
|
-
}));
|
31
|
-
(await import('ts-node')).register({
|
32
|
-
project: tsConfigPath,
|
33
|
-
transpileOnly: true
|
34
|
-
});
|
29
|
+
}]] : [])]
|
30
|
+
})); // (await import('ts-node')).register({ project: tsConfigPath, transpileOnly: true });
|
35
31
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
/// <reference types="webpack-env" />
|
2
|
+
/// <reference types="node" />
|
1
3
|
/// <reference types="node" />
|
2
4
|
import { Worker } from 'cluster';
|
3
5
|
import { WorkerMessage, StoriesMessage, TestMessage, WebpackMessage, DockerMessage, WorkerHandler, StoriesHandler, TestHandler, WebpackHandler, DockerHandler, ShutdownHandler } from '../types';
|
package/package.json
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
"addon",
|
14
14
|
"test"
|
15
15
|
],
|
16
|
-
"version": "0.9.0-beta.
|
16
|
+
"version": "0.9.0-beta.8",
|
17
17
|
"bin": {
|
18
18
|
"creevey": "./lib/cjs/cli.js"
|
19
19
|
},
|
@@ -28,7 +28,8 @@
|
|
28
28
|
"default": "./lib/cjs/client/addon/index.js"
|
29
29
|
},
|
30
30
|
"./preset": "./preset/index.js",
|
31
|
-
"./preset/ie11": "./preset/ie11.js"
|
31
|
+
"./preset/ie11": "./preset/ie11.js",
|
32
|
+
"./lib/esm/client/addon/decorator.js": "./lib/esm/client/addon/decorator.js"
|
32
33
|
},
|
33
34
|
"main": "lib/cjs/index.js",
|
34
35
|
"module": "lib/esm/index.js",
|
@@ -135,7 +136,6 @@
|
|
135
136
|
"schema-utils": "^4.0.0",
|
136
137
|
"selenium-webdriver": "^4.3.1",
|
137
138
|
"shelljs": "^0.8.5",
|
138
|
-
"ts-node": "^10.9.1",
|
139
139
|
"tsconfig-paths": "^4.0.0",
|
140
140
|
"webpack-node-externals": "^3.0.0",
|
141
141
|
"whatwg-fetch": "^3.6.2",
|