@lvce-editor/test-with-playwright-worker 1.6.0 → 1.7.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/test-with-playwright-worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@lvce-editor/verror": "^1.
|
|
16
|
+
"@lvce-editor/verror": "^1.5.0",
|
|
17
17
|
"@lvce-editor/assert": "^1.3.0",
|
|
18
18
|
"@playwright/test": "^1.48.2",
|
|
19
19
|
"get-port": "^7.1.0",
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import { join } from 'path'
|
|
2
|
+
|
|
1
3
|
export const getServerPath = async () => {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
+
const toTry = [
|
|
5
|
+
'@lvce-editor/server',
|
|
6
|
+
join(process.cwd(), '..', 'server', 'node_modules', '@lvce-editor', 'server', 'index.js'),
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
for (const path of toTry) {
|
|
10
|
+
try {
|
|
11
|
+
const { serverPath } = await import(path)
|
|
12
|
+
return serverPath
|
|
13
|
+
} catch (error) {
|
|
14
|
+
// ignore
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
throw new Error(`[test-with-playwright] server path not found`)
|
|
4
18
|
}
|