Skip to content

Commit ab296c3

Browse files
add backend
1 parent 6f22ab6 commit ab296c3

File tree

18 files changed

+721
-47
lines changed

18 files changed

+721
-47
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"eslint": "^8.52.0",
1919
"eslint-plugin-import": "^2.29.0",
2020
"eslint-plugin-unicorn": "^48.0.1",
21+
"npm-run-all": "^4.1.5",
2122
"postcss": "^8.4.31",
2223
"postcss-lit": "^1.1.0",
2324
"tailwindcss": "^3.3.3",

packages/app/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"name": "@devtools/app",
2+
"name": "@wdio/devtools-app",
33
"version": "0.0.0",
44
"description": "Browser devtools extension for debugging WebdriverIO tests.",
55
"type": "module",
6+
"exports": "./src/index.ts",
67
"scripts": {
78
"dev": "vite",
89
"build": "tsc && vite build",
@@ -13,7 +14,7 @@
1314
"@codemirror/lang-javascript": "^6.2.1",
1415
"@codemirror/theme-one-dark": "^6.1.2",
1516
"@codemirror/view": "^6.22.0",
16-
"@devtools/hook": "workspace:^",
17+
"@wdio/devtools-hook": "workspace:^",
1718
"@iconify-json/mdi": "^1.1.54",
1819
"@lit/context": "^1.0.1",
1920
"codemirror": "^6.0.1",

packages/app/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css, html, nothing } from 'lit'
22
import { provide } from '@lit/context'
33
import { customElement, query, property } from 'lit/decorators.js'
4-
import { type TraceLog } from '@devtools/hook/types'
4+
import { type TraceLog } from '@wdio/devtools-hook/types'
55

66
import { Element } from '@core/element'
77
import { context } from './context.js'

packages/app/src/components/onboarding/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Element } from '@core/element'
22
import { html, css } from 'lit'
33
import { customElement, property } from 'lit/decorators.js'
4-
import type { TraceLog } from '@devtools/hook/types'
4+
import type { TraceLog } from '@wdio/devtools-hook/types'
55

66
const CONFIG_CODE_EXAMPLE = `export const config = {
77
// ...

packages/app/src/components/workbench/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Element } from '@core/element'
22
import { html, css, nothing } from 'lit'
33
import { customElement } from 'lit/decorators.js'
44
import { consume } from '@lit/context'
5-
import type { CommandLog } from '@devtools/hook/types'
5+
import type { CommandLog } from '@wdio/devtools-hook/types'
66

77
import { context, type TraceLog } from '../../context.js'
88

packages/app/src/components/workbench/metadata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export class DevtoolsMetadata extends Element {
2525
`]
2626

2727
render() {
28-
const { id, url } = this.data.metadata
28+
const { url } = this.data.metadata
2929
return html`
3030
<wdio-devtools-list
3131
label="Metadata"
32-
list="${JSON.stringify({ id, url })}"></wdio-devtools-list>
32+
list="${JSON.stringify({ url })}"></wdio-devtools-list>
3333
<wdio-devtools-list
3434
label="Capabilities"
3535
list="${JSON.stringify(this.data.metadata.capabilities)}"></wdio-devtools-list>

packages/app/src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createContext } from '@lit/context'
2-
import { type TraceLog } from '@devtools/hook/types'
2+
import { type TraceLog } from '@wdio/devtools-hook/types'
33

44
const contextKey = Symbol('contextKey')
55
export const context = createContext<TraceLog>(contextKey)

packages/backend/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# WebdriverIO DevTools Backend
2+
3+

packages/backend/package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@wdio/devtools-backend",
3+
"version": "0.0.0",
4+
"description": "Backend service to spin up WebdriverIO Devtools",
5+
"author": "Christian Bromann <[email protected]>",
6+
"license": "MIT",
7+
"type": "module",
8+
"exports": {
9+
".": "./dist/index.js"
10+
},
11+
"types": "./dist/index.d.ts",
12+
"typeScriptVersion": "^5.0.0",
13+
"scripts": {
14+
"dev": "run-p dev:*",
15+
"dev:ts": "tsc --watch",
16+
"dev:app": "nodemon --watch ./dist ./dist/index.js",
17+
"build": "tsc -p ./tsconfig.json",
18+
"test": "eslint ."
19+
},
20+
"dependencies": {
21+
"@fastify/static": "^6.12.0",
22+
"@wdio/devtools-app": "workspace:^",
23+
"fastify": "^4.24.3",
24+
"get-port": "^7.0.0",
25+
"import-meta-resolve": "^4.0.0"
26+
},
27+
"devDependencies": {
28+
"nodemon": "^3.0.1"
29+
}
30+
}

packages/backend/src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const DEFAULT_PORT = 3000

0 commit comments

Comments
 (0)