Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/agents/dependency-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ higher-numbered lines exist there.
**TypeScript is held at 5.9.3 in the libraries.** 7.x is the Go rewrite
(`microsoft/typescript-go`), not an incremental release. `Boilerplate.Client.Core` is the canary and
is already on 7.0.2 — if a bump is wanted, move one library project, build it, and only then the
rest. Do not move all sixteen at once.
rest. Do not move all twenty at once.

**Vitest is held at `^3`** in `src/Bmotion/Tests/bit-bmotion-js` and `src/Bswup/Tests/bit-bswup-js`.
**Vitest is held at `^3`** in `src/Bmotion/Tests/bit-bmotion-js`, `src/Bswup/Tests/bit-bswup-js` and `src/Bsqlite/Tests/bit-bsqlite-js`.

**`devops-actions/variable-substitution` is held at v1.2** (`ae7b1f36…`). v2.0.0 committed 31
symlinks into its vendored `node_modules`; the runner cannot stage them and every job dies before
Expand Down
4 changes: 2 additions & 2 deletions .github/agents/test-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ does not serve silently gets the newest one it does.
`feat(release): v-X.Y.Z` commit on `develop` has its tag: an untagged release is answered by the previous one,
without a word.
2. **What it does serve.** `mcp -McpVersion X.Y.Z` for each. The library tools (`Search*`, `Get*` and `Inspect*` of BlazorUI,
Brouter, Butil, Bswup, Bmotion and - from the first release that ships them - Bink, Balette, BlazeDb, Bonboarding, Blex and Bmage) and the source tools (`FindBitPlatformSymbols`, `GetBitPlatformSymbolSource`,
Brouter, Butil, Bswup, Bmotion and - from the first release that ships them - Bink, Balette, BlazeDb, Bonboarding, Blex, Bmage and Bsqlite) and the source tools (`FindBitPlatformSymbols`, `GetBitPlatformSymbolSource`,
`SearchBitPlatformCode`) must all be there. Only the five shared ones (`AskGitHubRepository`,
`SendBitPlatformFeedback`, `microsoft_docs_*`) means no release is served at all, and the README's
*PlatformWebsite's MCP* section says why that happens. The server version it reports is the website's own build,
Expand All @@ -388,7 +388,7 @@ does not serve silently gets the newest one it does.
4. **The answers are good.** Put one real task to each library's `Search` tool, worded the way a developer would
describe it - BlazorUI "a dropdown the user can also type into", Butil "copy text to the clipboard", Bmotion "fade
a list item in", Brouter "a route parameter that must be a number", Bswup "show the download progress of the app's
update", Bink "a signature pad that exports a PNG", Balette "a command that asks for a name before it runs", BlazeDb "a todo list that survives a page reload", Bonboarding "a step that waits for a panel that loads later", Blex "a counter whose value survives a page reload", Bmage "shrink an uploaded photo under 200 KB without its location" - follow up with the `Get` tool it points to, and ask `SearchBitPlatformCode` about the Boilerplate. An
update", Bink "a signature pad that exports a PNG", Balette "a command that asks for a name before it runs", BlazeDb "a todo list that survives a page reload", Bonboarding "a step that waits for a panel that loads later", Blex "a counter whose value survives a page reload", Bmage "shrink an uploaded photo under 200 KB without its location", Bsqlite "keep the database when OPFS is not available" - follow up with the `Get` tool it points to, and ask `SearchBitPlatformCode` about the Boilerplate. An
answer must be on topic, specific and true to the version asked for; one that answers wrongly is a failure too.

Like an E2E failure, an MCP problem is fixed in `src/Websites/Platform` or in the library's own MCP server, and goes
Expand Down
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
## Rules

**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Bmotion`, `bit Bink`, `bit Balette`, `bit BlazeDb`, `bit Bonboarding`, `bit Blex`, `bit Bmage`, `bit Brouter`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
you **MUST** use the `bitplatform` MCP server's tools - start with the matching `Search<Library>` tool (e.g. `SearchBitBlazorUI`, `SearchBswup`, `SearchButil`, `SearchBmotion`, `SearchBink`, `SearchBalette`, `SearchBlazeDb`, `SearchBonboarding`, `SearchBlex`, `SearchBmage`, `SearchBrouter`) and follow the calls it names - to find the correct implementation and usage patterns before writing or changing any code.
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Bmotion`, `bit Bink`, `bit Balette`, `bit BlazeDb`, `bit Bonboarding`, `bit Blex`, `bit Bmage`, `bit Bsqlite`, `bit Brouter`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
you **MUST** use the `bitplatform` MCP server's tools - start with the matching `Search<Library>` tool (e.g. `SearchBitBlazorUI`, `SearchBswup`, `SearchButil`, `SearchBmotion`, `SearchBink`, `SearchBalette`, `SearchBlazeDb`, `SearchBonboarding`, `SearchBlex`, `SearchBmage`, `SearchBsqlite`, `SearchBrouter`) and follow the calls it names - to find the correct implementation and usage patterns before writing or changing any code.

**End of RULE 1**

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/all.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ jobs:
uses: ./.github/workflows/bmage.demo.cd.yml
secrets: inherit

bsqlite_demo:
name: bsqlite demo
if: inputs.server
uses: ./.github/workflows/bsqlite.demo.cd.yml
secrets: inherit

bink_demo:
name: bink demo
if: inputs.server
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/all.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ on:
description: Bmage solution
type: boolean
default: true
bsqlite:
description: Bsqlite solution
type: boolean
default: true
bink:
description: Bink solution
type: boolean
Expand Down Expand Up @@ -606,6 +610,31 @@ jobs:
dotnet build src/Bmage/Bit.Bmage.Editor/Bit.Bmage.Editor.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bmage/Bit.Bmage.Editor/Bit.Bmage.Editor.csproj --output ./packages --configuration Release

- name: Build and pack Bsqlite
run: |
dotnet build src/Bsqlite/Bit.Bsqlite/Bit.Bsqlite.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bsqlite/Bit.Bsqlite/Bit.Bsqlite.csproj --output ./packages --configuration Release

- name: Build and pack Bsqlite.Storage.Opfs
run: |
dotnet build src/Bsqlite/Bit.Bsqlite.Storage.Opfs/Bit.Bsqlite.Storage.Opfs.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.Opfs/Bit.Bsqlite.Storage.Opfs.csproj --output ./packages --configuration Release

- name: Build and pack Bsqlite.Storage.IndexedDb
run: |
dotnet build src/Bsqlite/Bit.Bsqlite.Storage.IndexedDb/Bit.Bsqlite.Storage.IndexedDb.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.IndexedDb/Bit.Bsqlite.Storage.IndexedDb.csproj --output ./packages --configuration Release

- name: Build and pack Bsqlite.Storage.CacheStorage
run: |
dotnet build src/Bsqlite/Bit.Bsqlite.Storage.CacheStorage/Bit.Bsqlite.Storage.CacheStorage.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.CacheStorage/Bit.Bsqlite.Storage.CacheStorage.csproj --output ./packages --configuration Release

- name: Build and pack Bsqlite.Testing
run: |
dotnet build src/Bsqlite/Bit.Bsqlite.Testing/Bit.Bsqlite.Testing.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/Bsqlite/Bit.Bsqlite.Testing/Bit.Bsqlite.Testing.csproj --output ./packages --configuration Release

- name: Build and pack Bink
run: |
dotnet build src/Bink/Bit.Bink/Bit.Bink.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
Expand Down Expand Up @@ -729,6 +758,11 @@ jobs:
if: ${{ inputs.bmage }}
uses: ./.github/workflows/bit.ci.Bmage.yml

bsqlite:
name: bsqlite
if: ${{ inputs.bsqlite }}
uses: ./.github/workflows/bit.ci.Bsqlite.yml

bink:
name: bink
if: ${{ inputs.bink }}
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/bit.ci.Bsqlite.e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: bit platform CI - Bsqlite E2E

# The worker, the engine builds and every VFS in Chromium, plus every page of the demo website. It takes far longer
# than the build-and-unit pipeline (bit.ci.Bsqlite.yml), so it runs only when started by hand. See
# src/Bsqlite/Tests/Bit.Bsqlite.Tests.E2E/README.md for what the browser suite proves and how to run it locally.

on:
workflow_dispatch:

env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true

permissions:
contents: read

jobs:

# The worker, the engine builds and every VFS in Chromium, driven through the library's own modules, plus every
# page of the demo website, against the Release build that ships.
e2e:
name: Bsqlite E2E (Chromium)
runs-on: ubuntu-24.04
timeout-minutes: 60

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- name: Setup .NET 9.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 9.0.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x

# Node runs the TypeScript build, and the restore of the storage packages runs it to rewrite the imports of
# the wa-sqlite VFSes they vendor - so it has to be there before the first restore.
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

# Building the E2E suite builds the libraries too (it serves their compiled modules), but not the demo.
- name: Build the demo and the E2E suite
run: |
dotnet build src/Bsqlite/Demo/Server/Bit.Bsqlite.Demo.Server.csproj -c Release
dotnet build src/Bsqlite/Tests/Bit.Bsqlite.Tests.E2E/Bit.Bsqlite.Tests.E2E.csproj -c Release

- name: Install Playwright Chromium
run: pwsh src/Bsqlite/Tests/Bit.Bsqlite.Tests.E2E/bin/Release/net10.0/playwright.ps1 install --with-deps chromium

- name: Run E2E tests
# Run from inside src so src/global.json's Microsoft.Testing.Platform runner setting applies.
run: >
cd src/Bsqlite/Tests/Bit.Bsqlite.Tests.E2E &&
dotnet test -c Release --no-build
--report-trx --report-trx-filename bsqlite-e2e.trx

- name: Upload test results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: bsqlite-e2e
path: '**/bsqlite-e2e.trx'
if-no-files-found: ignore
76 changes: 76 additions & 0 deletions .github/workflows/bit.ci.Bsqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: bit platform CI - Bsqlite

# Build, ADO.NET/EF Core/storage tests, MCP server tests and the JavaScript that needs no browser. The browser suite
# lives in bit.ci.Bsqlite.e2e.yml and runs on demand only.

on:
workflow_dispatch:
workflow_call:
pull_request:
paths:
- 'src/Bsqlite/**'

env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true

permissions:
contents: read

jobs:

# Its `if:` skips the job on Release/Prerelease/Version PRs.
build-Bsqlite:
if: startsWith(github.event.pull_request.title, 'Prerelease') != true && startsWith(github.event.pull_request.title, 'Release') != true && startsWith(github.event.pull_request.title, 'Version') != true
name: build Bit.Bsqlite
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- name: Setup .NET 9.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 9.0.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x

# Node runs the TypeScript build, and the restore of the storage packages runs it to rewrite the imports of
# the wa-sqlite VFSes they vendor - so it has to be there before the first restore.
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

- name: dotnet workload restore
run: cd src/Bsqlite && dotnet workload restore

# The restore also fetches the pinned wa-sqlite engine and VFSes and the build verifies their checksums (see
# src/Bsqlite/Bit.Bsqlite/engine/wa-sqlite.lock.props); none of it is committed.
- name: dotnet build
run: dotnet build src/Bsqlite/Bit.Bsqlite.slnx

- name: dotnet test (ADO.NET, EF Core and storage tests, net8.0/net9.0/net10.0)
# Run from inside src so src/global.json's "test" runner setting applies
# (from the repo root the SDK falls back to the unsupported VSTest path).
run: cd src/Bsqlite/Tests/Bit.Bsqlite.Tests && dotnet test --no-build

- name: dotnet test (MCP server)
run: cd src/Bsqlite/Tests/Bit.Bsqlite.Tests.Mcp && dotnet test --no-build

- name: JS tests (decimal arithmetic, change-notification filter, function-table patch)
# The wasm-table tests read the engine builds the restore above vendored into Bit.Bsqlite/wwwroot/engine.
run: |
cd src/Bsqlite/Tests/bit-bsqlite-js
npm ci || npm install
npm test
75 changes: 75 additions & 0 deletions .github/workflows/bsqlite.demo.cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bsqlite Demo CD

on:
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:

build_blazor_wasm:
name: build blazor wasm
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

- name: Install wasm
run: cd src && dotnet workload install wasm-tools

- name: Publish
run: dotnet publish src/Bsqlite/Demo/Server/Bit.Bsqlite.Demo.Server.csproj -c Release -o server -p:Version="${{ vars.APP_VERSION}}" -p:InvariantGlobalization=true

# Server-owned; C:\inetpub keeps its own copies.
- name: Strip server-owned files from bundle
run: rm -fv server/appsettings*.json server/AppCertificate.* server/AppleAuthKey.p8 server/*.pfx

- name: Upload artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: BsqliteDemo
path: server
include-hidden-files: true

deploy_server:
name: deploy
needs: build_blazor_wasm
runs-on: [self-hosted, Windows, X64, bitplatform-iis]
environment:
name: production
url: 'https://bsqlite.bitplatform.dev'

steps:

- name: Checkout deploy action
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 1
sparse-checkout: .github/actions

- name: Deploy
uses: ./.github/actions/deploy-to-server
with:
artifact-name: BsqliteDemo
app-pool: Bsqlite
site-path: C:\inetpub\BsqliteDemo
sentinel-file: Bit.Bsqlite.Demo.Server.dll
health-check-url: 'https://bsqlite.bitplatform.dev/'
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cloudflare-token: ${{ secrets.CLOUDFLARE_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'src/BlazeDb/**'
- 'src/Blex/**'
- 'src/Bmage/**'
- 'src/Bsqlite/**'
- 'src/Bmotion/**'
- 'src/Bonboarding/**'
- 'src/Brouter/**'
Expand Down Expand Up @@ -172,6 +173,31 @@ jobs:
- name: dotnet pack Bmage.Editor
run: dotnet pack src/Bmage/Bit.Bmage.Editor/Bit.Bmage.Editor.csproj --output . --configuration Release

- name: dotnet build Bsqlite
run: dotnet build src/Bsqlite/Bit.Bsqlite/Bit.Bsqlite.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bsqlite
run: dotnet pack src/Bsqlite/Bit.Bsqlite/Bit.Bsqlite.csproj --output . --configuration Release

- name: dotnet build Bsqlite.Storage.Opfs
run: dotnet build src/Bsqlite/Bit.Bsqlite.Storage.Opfs/Bit.Bsqlite.Storage.Opfs.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bsqlite.Storage.Opfs
run: dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.Opfs/Bit.Bsqlite.Storage.Opfs.csproj --output . --configuration Release

- name: dotnet build Bsqlite.Storage.IndexedDb
run: dotnet build src/Bsqlite/Bit.Bsqlite.Storage.IndexedDb/Bit.Bsqlite.Storage.IndexedDb.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bsqlite.Storage.IndexedDb
run: dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.IndexedDb/Bit.Bsqlite.Storage.IndexedDb.csproj --output . --configuration Release

- name: dotnet build Bsqlite.Storage.CacheStorage
run: dotnet build src/Bsqlite/Bit.Bsqlite.Storage.CacheStorage/Bit.Bsqlite.Storage.CacheStorage.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bsqlite.Storage.CacheStorage
run: dotnet pack src/Bsqlite/Bit.Bsqlite.Storage.CacheStorage/Bit.Bsqlite.Storage.CacheStorage.csproj --output . --configuration Release

- name: dotnet build Bsqlite.Testing
run: dotnet build src/Bsqlite/Bit.Bsqlite.Testing/Bit.Bsqlite.Testing.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bsqlite.Testing
run: dotnet pack src/Bsqlite/Bit.Bsqlite.Testing/Bit.Bsqlite.Testing.csproj --output . --configuration Release

- name: dotnet build Bink
run: dotnet build src/Bink/Bit.Bink/Bit.Bink.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bink
Expand Down
Loading
Loading