Skip to content

Commit 603e47a

Browse files
committed
Merge branch 'main' into mt-gateway-driver
2 parents 723eda0 + a2c2236 commit 603e47a

5 files changed

Lines changed: 81 additions & 24 deletions

File tree

‎.github/workflows/publish-docs.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 'Publish docs'
2+
on:
3+
push:
4+
branches: [main]
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
jobs:
12+
build_and_docs:
13+
name: 'Build and Docs'
14+
timeout-minutes: 5
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: latest
24+
- name: Setup Dependencies
25+
run: |
26+
corepack enable
27+
npm install
28+
- name: Build App and Typedoc
29+
run: |
30+
npm run build
31+
npm run typedoc
32+
- uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./docs
35+
- name: Deploy Typedoc to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

‎.github/workflows/release.yml‎

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,51 @@
11
name: 'Release'
2+
23
on:
3-
push:
4-
branches: [main]
4+
release:
5+
types: [created]
6+
workflow_dispatch:
57

68
permissions:
79
contents: read
8-
pages: write
910
id-token: write
1011

12+
concurrency:
13+
group: release
14+
cancel-in-progress: false
15+
1116
jobs:
12-
build_and_docs:
13-
name: 'Build and Docs'
14-
timeout-minutes: 5
17+
publish:
18+
name: 'Publish to npm'
19+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && !github.event.release.draft)
20+
timeout-minutes: 10
1521
runs-on: ubuntu-latest
16-
environment:
17-
name: github-pages
18-
url: ${{ steps.deployment.outputs.page_url }}
22+
1923
steps:
2024
- uses: actions/checkout@v4
25+
2126
- uses: actions/setup-node@v4
2227
with:
23-
node-version: latest
28+
node-version: 22.14.0
29+
registry-url: 'https://registry.npmjs.org'
30+
2431
- name: Setup Dependencies
2532
run: |
2633
corepack enable
2734
npm install
28-
- name: Build App and Typedoc
35+
36+
- name: Validate release tag
37+
if: github.event_name == 'release'
2938
run: |
30-
npm run build
31-
npm run typedoc
32-
- uses: actions/upload-pages-artifact@v3
33-
with:
34-
path: ./docs
35-
- name: Deploy Typedoc to GitHub Pages
36-
id: deployment
37-
uses: actions/deploy-pages@v4
39+
package_version=$(node -p "require('./package.json').version")
40+
expected_tag="v${package_version}"
41+
actual_tag="${{ github.event.release.tag_name }}"
42+
if [ "$actual_tag" != "$expected_tag" ]; then
43+
echo "Release tag $actual_tag does not match package version $expected_tag"
44+
exit 1
45+
fi
46+
47+
- name: Build package
48+
run: npm run build
49+
50+
- name: Publish package
51+
run: npm publish --access public

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlitecloud/drivers",
3-
"version": "1.0.872",
3+
"version": "1.0.877",
44
"description": "SQLiteCloud drivers for Typescript/Javascript in edge, web and node clients",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",
@@ -12,7 +12,7 @@
1212
"build": "rm -rf ./lib/ && tsc --project tsconfig.build.json && npx webpack",
1313
"publish": "npm run build && npm publish --access public",
1414
"prettier": "prettier --write 'src/**/*'",
15-
"typedoc": "rm -rf ./docs/ && typedoc --out docs && typedoc --plugin typedoc-plugin-markdown --out docs/markdown",
15+
"typedoc": "rm -rf ./docs/ && typedoc --tsconfig tsconfig.build.json --plugin typedoc-plugin-markdown --out docs/markdown",
1616
"npmgui": "npx npm-gui@latest",
1717
"prepare": "husky"
1818
},

‎src/drivers/connection-ws.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ import {
1515
SQLiteCloudError,
1616
SQLiteCloudWebsocketBlobTransferFormat
1717
} from './types'
18-
import { decodeBigIntMarkers, decodeWebsocketRowsetData, encodeBigIntMarkers, parseWebsocketBlobTransferFormat, parseWebsocketMaxAttachments } from './utilities'
18+
import {
19+
decodeBigIntMarkers,
20+
decodeWebsocketRowsetData,
21+
encodeBigIntMarkers,
22+
parseWebsocketBlobTransferFormat,
23+
parseWebsocketMaxAttachments
24+
} from './utilities'
1925

2026
const SocketIODecoderBase = SocketIODecoder as unknown as new (...args: any[]) => { opts?: { maxAttachments?: number } }
2127

0 commit comments

Comments
 (0)