Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9b4c0bc
enhance code-editor: add SQL completion, improve styling
Panthevm Mar 12, 2026
567b152
Fix resize panel
Panthevm Mar 16, 2026
d5ee59d
Fix typo-body-xs line-height clipping descenders
Panthevm Mar 16, 2026
d4808f8
Add HTTP method syntax highlighting to code editor
Panthevm Mar 16, 2026
49e0b89
Add FHIR resource autocomplete to CodeEditor
Panthevm Mar 16, 2026
9755717
Update code editor
Panthevm Mar 17, 2026
735e73c
Update code editor
Panthevm Mar 18, 2026
7070629
Update Codemirror autocomplete
Panthevm Mar 18, 2026
256781c
Fix code editor
Panthevm Mar 18, 2026
ebdcccd
Update CodeMirror autocomplete
Panthevm Mar 19, 2026
39cb047
Update CM
Panthevm Mar 19, 2026
c467bf6
Refactor FHIR autocomplete
Panthevm Mar 20, 2026
6135e8c
Fix boolean completions shown after completed value with comma
Panthevm Mar 23, 2026
4d342d7
Add drag & drop reorder support to TabsBrowserList
Panthevm Mar 23, 2026
9662b41
Fix HTTP header completion triggering on empty input
Panthevm Mar 23, 2026
87b5180
Skip JSON lint errors on empty document
Panthevm Mar 23, 2026
0c92818
new date picker
andreyorst Mar 23, 2026
c386cb2
Disable tab reorder in TabsBrowserList when only one tab
Panthevm Mar 23, 2026
d47ec72
Bump fhirpath LSP deps: fhirpath 0.1.4, fhirpath-lsp 0.0.7
Panthevm Mar 23, 2026
d1761f5
Bump react-components to alpha.20, aidbox-fhirpath-lsp to alpha.7
Panthevm Mar 23, 2026
b96764b
Fix lint errors and override fast-xml-parser to resolve CVE-2026-26278
Panthevm Mar 23, 2026
4390f6c
Fix code editor gutter background for horizontal scroll
Panthevm Mar 30, 2026
baeebad
Fix audit vulnerabilities: override picomatch, file-type, brace-expan…
Panthevm Mar 30, 2026
9eaf19d
Fix CodeMirror SQL & HTTP autocomplete
Panthevm Apr 2, 2026
84d7131
Update tokens
Panthevm Apr 3, 2026
9785ca4
Update SQL code editor autocomplete keywords
Panthevm Apr 6, 2026
58f4302
make OperationOutcomeView severity header sticky
Panthevm Apr 7, 2026
f65ec8a
Merge branch 'master' into development
andreyorst Apr 8, 2026
ba370dd
update lockfile
andreyorst Apr 8, 2026
e17a1d6
fix lint
andreyorst Apr 8, 2026
83b3e27
fix doc pipeline
andreyorst Apr 8, 2026
49263bc
Merge branch 'master' into development
andreyorst Apr 13, 2026
d890f7a
Merge branch 'master' into development
andreyorst Apr 13, 2026
8b7e333
bump pnpm to fix audit pipeline
andreyorst Apr 27, 2026
3271d88
chore(deps): bump pnpm/action-setup from 4 to 6
dependabot[bot] Apr 15, 2026
c912514
chore(deps): bump actions/upload-pages-artifact from 4 to 5
dependabot[bot] Apr 15, 2026
f369766
concat base path without dropping parts of it (#115)
andreyorst Apr 30, 2026
3e32977
bump deps
andreyorst May 1, 2026
1d383c8
update @atomic-ehr/codegen to 0.0.14 and regenerate FHIR types
ryukzak May 11, 2026
371c67d
Sidebar: align collapsible="none" styling with collapsible="icon"
Panthevm May 12, 2026
78417d3
fix(Combobox): focus search input via useEffect after popover opens
Panthevm May 13, 2026
f363762
TreeView: gate drag-and-drop behind canReorder
Panthevm May 14, 2026
6e35e4b
OperationOutcomeView: show diagnostics as third truncated column
Panthevm May 14, 2026
6c26b19
fhirpath-lsp: paginate StructureDefinition search with _count=1000
Panthevm May 19, 2026
c5803e3
Tabs: prevent trackpad horizontal wheel scroll from bouncing back
Panthevm May 22, 2026
659ccf3
TabsListDropdown: square trigger with left divider
Panthevm May 22, 2026
b37fb2c
Combobox: let viewport grow in Safari (h-auto override)
Panthevm Jun 9, 2026
7f17840
CodeEditor: reserve right padding + opaque gutter with fade shadow
Panthevm Jun 9, 2026
9701460
aidbox-client: explicit Authorization header takes precedence over se…
Panthevm Jun 16, 2026
2c61a84
code-editor: add placeholder prop
Panthevm Jun 16, 2026
e1608e4
aidbox-client: follow server redirect on unauthenticated requests
Panthevm Jun 17, 2026
2465245
code-editor: Tab/Shift-Tab indent instead of moving focus
Panthevm Jun 17, 2026
b731d76
chore(deps): bump actions/checkout from 6 to 7
dependabot[bot] Jun 24, 2026
47d2cd1
TableHead: support reverseIcon and contentStyle props
Panthevm Jun 24, 2026
2821810
chore(deps): bump actions/setup-node from 6 to 7
dependabot[bot] Jul 15, 2026
ea2828f
Merge branch 'master' into development
andreyorst Jul 22, 2026
6e75111
Fix brace-expansion override for minimatch compatibility
andreyorst Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/aidbox-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand All @@ -23,11 +23,11 @@ jobs:
audit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand All @@ -38,11 +38,11 @@ jobs:
typecheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ jobs:
build-sites:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Upload Pages artifact
if: success() && github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: site-out

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
if: github.repository == 'HealthSamurai/aidbox-ts-sdk' && github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6
- name: Install node
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: "pnpm"
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@
"workspaces": [
"packages/*"
],
"packageManager": "pnpm@10.21.0",
"packageManager": "pnpm@10.33.2",
"pnpm": {
"overrides": {
"fast-xml-parser": "^5.10.1",
"fast-xml-builder": ">=1.1.7",
"yaml": ">=2.8.3",
"picomatch": ">=4.0.4",
"file-type": ">=21.3.2",
"brace-expansion": ">=2.0.3 <3",
"brace-expansion@<1.1.12": "1.1.12",
"brace-expansion@>=2.0.0 <2.0.2": "2.0.2",
"brace-expansion@>=3.0.0 <3.0.1": "3.0.1",
"brace-expansion@>=4.0.0 <4.0.1": "4.0.1",
"defu": ">=6.1.5",
"vite": "^8.1.5",
"fast-xml-parser@<5.7.0": ">=5.7.0",
"postcss@<8.5.10": ">=8.5.10",
"esbuild@>=0.27.3 <0.28.1": "0.28.1",
"markdown-it@<=14.1.1": "14.3.0",
"piscina@<=4.9.2": "4.9.3",
"linkify-it@<=5.0.0": "5.0.2",
"@xhmikosr/decompress@<10.2.1": "10.2.1",
"ws@>=8.0.0 <8.21.0": "8.21.1",
"@babel/core@<=7.29.0": "7.29.7",
"brace-expansion": "^5.0.7"
"@babel/core@<=7.29.0": "7.29.7"
}
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/aidbox-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"directory": "packages/aidbox-client"
},
"devDependencies": {
"@atomic-ehr/codegen": "^0.0.8",
"@atomic-ehr/codegen": "latest",
"@types/node": "^25.4.0",
"tsx": "^4.21.0",
"typedoc": "^0.28.17",
Expand Down
49 changes: 25 additions & 24 deletions packages/aidbox-client/scripts/generate-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@ import { APIBuilder } from "@atomic-ehr/codegen";
console.log("📦 Generating FHIR R4 Core Types...");

const builder = new APIBuilder()
.verbose()
.throwException()
.fromPackage("hl7.fhir.r4.core", "4.0.1")
.typescript({ withDebugComment: false, generateProfile: false })
.outputTo("./src/fhir-types")
.treeShake({
"hl7.fhir.r4.core": {
"http://hl7.org/fhir/StructureDefinition/Patient": {
ignoreFields: [
"contact",
"communication",
"photo",
"telecom",
"address",
"link",
],
},
"http://hl7.org/fhir/StructureDefinition/Resource": {},
"http://hl7.org/fhir/StructureDefinition/Bundle": {},
"http://hl7.org/fhir/StructureDefinition/OperationOutcome": {},
"http://hl7.org/fhir/StructureDefinition/DomainResource": {
ignoreFields: ["extension", "modifierExtension"],
},
"http://hl7.org/fhir/StructureDefinition/BackboneElement": {
ignoreFields: ["modifierExtension"],
},
"http://hl7.org/fhir/StructureDefinition/Element": {
ignoreFields: ["extension"],
.typeSchema({
treeShake: {
"hl7.fhir.r4.core": {
"http://hl7.org/fhir/StructureDefinition/Patient": {
ignoreFields: [
"contact",
"communication",
"photo",
"telecom",
"address",
"link",
],
},
"http://hl7.org/fhir/StructureDefinition/Resource": {},
"http://hl7.org/fhir/StructureDefinition/Bundle": {},
"http://hl7.org/fhir/StructureDefinition/OperationOutcome": {},
"http://hl7.org/fhir/StructureDefinition/DomainResource": {
ignoreFields: ["extension", "modifierExtension"],
},
"http://hl7.org/fhir/StructureDefinition/BackboneElement": {
ignoreFields: ["modifierExtension"],
},
"http://hl7.org/fhir/StructureDefinition/Element": {
ignoreFields: ["extension"],
},
},
},
})
Expand Down
37 changes: 27 additions & 10 deletions packages/aidbox-client/src/auth-providers.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import type { AuthProvider } from "./types";
import { mergeHeaders, validateBaseUrl } from "./utils";

function hasAuthorizationHeader(headers: HeadersInit | undefined): boolean {
if (!headers) return false;
if (headers instanceof Headers) return headers.has("authorization");
if (Array.isArray(headers)) {
return headers.some(([key]) => key.toLowerCase() === "authorization");
}
return Object.keys(headers).some(
(key) => key.toLowerCase() === "authorization",
);
}

export class BrowserAuthProvider implements AuthProvider {
/** @ignore */
public baseUrl: string;

constructor(baseUrl: string) {
this.baseUrl = baseUrl;
this.baseUrl = baseUrl.replace(/\/+$/, "");
}

async #checkSession() {
const response = await fetch(new URL("/auth/userinfo", this.baseUrl), {
const response = await fetch(`${this.baseUrl}/auth/userinfo`, {
method: "GET",
headers: {
"content-type": "application/json",
Expand All @@ -36,7 +47,7 @@ export class BrowserAuthProvider implements AuthProvider {
* Sends a POST request to `baseurl/auth/logout`.
*/
public async revokeSession() {
await fetch(new URL("/auth/logout", this.baseUrl), {
await fetch(`${this.baseUrl}/auth/logout`, {
method: "POST",
headers: {
"content-type": "application/json",
Expand All @@ -59,16 +70,22 @@ export class BrowserAuthProvider implements AuthProvider {
validateBaseUrl(input, this.baseUrl);

const requestInit = init ?? {};
requestInit.credentials = "include";
const explicitAuth = hasAuthorizationHeader(requestInit.headers);
requestInit.credentials = explicitAuth ? "omit" : "include";

const response = await fetch(input, requestInit);

if (response.status === 401) {
await this.establishSession();
throw new Error("unauthorized");
} else {
return response;
if (!explicitAuth) {
if (response.status === 401) {
await this.establishSession();
throw new Error("unauthorized");
}
if (response.redirected) {
window.location.href = response.url;
throw new Error("unauthorized");
}
}
return response;
}
}

Expand All @@ -78,7 +95,7 @@ export class BasicAuthProvider implements AuthProvider {
#authHeader: string;

constructor(baseUrl: string, username: string, password: string) {
this.baseUrl = baseUrl;
this.baseUrl = baseUrl.replace(/\/+$/, "");
// Create Base64-encoded credentials for Basic Auth header (RFC 7617: UTF-8 encoded)
const credentials = `${username}:${password}`;
const utf8Bytes = new TextEncoder().encode(credentials);
Expand Down
6 changes: 3 additions & 3 deletions packages/aidbox-client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import type {
VReadOptions,
} from "./types";
import { ErrorResponse, RequestError } from "./types";
import { coerceBody } from "./utils";
import { coerceBody, joinUrl } from "./utils";

type InternalAidboxErrorResponse = {
error?: unknown;
Expand Down Expand Up @@ -91,7 +91,7 @@ export class AidboxClient<
public authProvider: AuthProvider;

constructor(baseUrl: string, authProvider: AuthProvider) {
this.baseUrl = baseUrl;
this.baseUrl = baseUrl.replace(/\/+$/, "");
this.authProvider = authProvider;
}

Expand All @@ -113,7 +113,7 @@ export class AidboxClient<

const { method, url, headers = {}, params = [], body } = requestParams;

const urlObj = new URL(url, baseUrl);
const urlObj = joinUrl(baseUrl, url);

params.forEach(([key, value]) => {
urlObj.searchParams.append(key, value);
Expand Down
Loading
Loading