webdriver-bidi-protocol 0.0.1 → 0.0.5

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.
@@ -0,0 +1,39 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ day: 'sunday'
8
+ time: '02:00'
9
+ timezone: Europe/Berlin
10
+ groups:
11
+ dependencies:
12
+ dependency-type: production
13
+ patterns:
14
+ - '*'
15
+ dev-dependencies:
16
+ dependency-type: development
17
+ patterns:
18
+ - '*'
19
+ - package-ecosystem: github-actions
20
+ directory: /
21
+ schedule:
22
+ interval: weekly
23
+ day: 'sunday'
24
+ time: '04:00'
25
+ timezone: Europe/Berlin
26
+ groups:
27
+ all:
28
+ patterns:
29
+ - '*'
30
+ - package-ecosystem: gitsubmodule
31
+ directory: /
32
+ commit-message:
33
+ # Prefix with 'fix' to generate patch releases.
34
+ prefix: fix
35
+ schedule:
36
+ interval: daily
37
+ open-pull-requests-limit: 1
38
+ labels:
39
+ - commit-updates
@@ -0,0 +1,45 @@
1
+ name: CI
2
+
3
+ # Declare default permissions as read only.
4
+ permissions: read-all
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ pull_request:
11
+ branches:
12
+ - '**'
13
+
14
+ concurrency:
15
+ group: ci-${{ github.head_ref || github.run_id }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ ci:
20
+ name: '[Required] Run tests'
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Check out repository
24
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25
+ with:
26
+ fetch-depth: 2
27
+ - name: Install cddlconv
28
+ run: cargo install cddlconv@0.1.5
29
+ - name: Install dependencies
30
+ run: npm ci
31
+ - name: Build and test
32
+ run: npm test
33
+ - id: check_changes
34
+ run: |
35
+ if [[ -n $(git status --porcelain) ]]; then
36
+ echo "changes=true" >> "$GITHUB_OUTPUT";
37
+ fi
38
+ - name: Commit and push changes
39
+ if: contains(github.event.pull_request.labels.*.name, 'commit-updates') && steps.check_changes.outputs.changes == 'true'
40
+ run: |
41
+ git config --global user.name 'browser-automation-bot'
42
+ git config --global user.email '133232582+browser-automation-bot@users.noreply.github.com'
43
+ git add . --all
44
+ git commit -m 'chore: commit updated files' --no-verify
45
+ git push
@@ -0,0 +1,29 @@
1
+ name: Publish
2
+
3
+ permissions: read-all
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ tags:
9
+ - "*v*"
10
+
11
+ jobs:
12
+ npm-publish:
13
+ name: Publish npm packages
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ steps:
18
+ - name: Check out repository
19
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
20
+ with:
21
+ fetch-depth: 2
22
+ - name: Set npm registry
23
+ run: npm config set registry 'https://wombat-dressing-room.appspot.com/'
24
+ - name: Publish packages
25
+ env:
26
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_RELEASE}}
27
+ run: |
28
+ npm config set '//wombat-dressing-room.appspot.com/:_authToken' $NODE_AUTH_TOKEN
29
+ npm publish
@@ -0,0 +1,21 @@
1
+ on:
2
+ push:
3
+ branches:
4
+ - main
5
+
6
+ permissions:
7
+ contents: write
8
+ pull-requests: write
9
+
10
+ name: release-please
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: googleapis/release-please-action@v4
17
+ with:
18
+ token: ${{ secrets.BROWSER_AUTOMATION_BOT_TOKEN }}
19
+ target-branch: main
20
+ config-file: release-please-config.json
21
+ manifest-file: .release-please-manifest.json
package/.gitmodules ADDED
@@ -0,0 +1,6 @@
1
+ [submodule "specs/webdriver-bidi"]
2
+ path = specs/webdriver-bidi
3
+ url = https://github.com/w3c/webdriver-bidi.git
4
+ [submodule "specs/permissions"]
5
+ path = specs/permissions
6
+ url = https://github.com/w3c/permissions.git
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @type {import('prettier').Config}
3
+ */
4
+ module.exports = require("gts/.prettierrc.json");
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.0.5"
3
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## [0.0.5](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.4...webdriver-bidi-protocol-v0.0.5) (2024-06-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * another repository fix ([72c215c](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/72c215cbcf76c97317deff925d1ff73732ed5bab))
9
+
10
+ ## [0.0.4](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.3...webdriver-bidi-protocol-v0.0.4) (2024-06-28)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * update repository ([28cf911](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/28cf911e59ad5b177df47d04fc012d8c9cfe7fde))
16
+
17
+ ## [0.0.3](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.2...webdriver-bidi-protocol-v0.0.3) (2024-06-28)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * add repository ([#19](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/19)) ([91def9d](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/91def9dd0baeab3476e7154676e40d5a709da2c3))
23
+
24
+ ## [0.0.2](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/compare/webdriver-bidi-protocol-v0.0.1...webdriver-bidi-protocol-v0.0.2) (2024-06-28)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * bump specs/webdriver-bidi from `05a283e` to `62b8dfe` ([#16](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/16)) ([51dac71](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/51dac71ca4ea2e4e85eee7ba82a6a8ac7ff584a4))
30
+ * document usage ([#7](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/issues/7)) ([d98a6ee](https://github.com/GoogleChromeLabs/webdriver-bidi-protocol/commit/d98a6ee23cbaa943440e2b40831a0c56aa0d6c18))
package/LICENSE CHANGED
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright [yyyy] [name of copyright owner]
190
+ Copyright 2024 Google Inc.
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,4 +1,34 @@
1
1
  # webdriver-bidi-protocol
2
2
 
3
- This repository contains TypeScript types conforming to the WebDriver Bidi
4
- Protocol specification.
3
+ This repository contains TypeScript types conforming to the [WebDriver
4
+ BiDi](https://w3c.github.io/webdriver-bidi/) specification.
5
+
6
+ ## Installation
7
+
8
+ ```
9
+ npm install webdriver-bidi-protocol
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ In your TypeScript client implementation, you can now import WebDriver
15
+ BiDi types:
16
+
17
+ ```ts
18
+ import {Commands} from 'webdriver-bidi-protocol';
19
+
20
+ async function sendCommand<T extends keyof Commands>(
21
+ method: T,
22
+ params: Commands[T]['params']
23
+ ): {result: Commands[T]['returnType']} {
24
+ // Implementation for sending the data using WebSockets.
25
+ }
26
+
27
+ // Now TypeScript validates that the params match the spec for 'browsingContext.print'.
28
+ await sendCommand('browsingContext.print', {context: 'xxx'});
29
+ ```
30
+
31
+ ## Versioning
32
+
33
+ This package patch version will be incremented whenever there are
34
+ specification updates.