Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,5 @@ vitest.config.*.timestamp*
.github/instructions/nx.instructions.md

certificates

*.tsbuildinfo
1 change: 0 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ yarn nx affected:test # Test affected projects
- **State Management**: Frontend uses jotai for global state
- **Styling**: Emotion CSS-in-JS with Salesforce Lightning Design System
- **Real-time**: Socket.io for platform events and real-time updates
- **Job Queue**: Bull/pg-boss for background job processing

## Coding standards

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app/services/desktop-asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function getLatestDesktopVersion({ arch, platform }: PlatformArch):

if (winRelease?.files.length) {
const version = winRelease.version;
const { sha512, url: filename } = winRelease?.files[0];
const { sha512, url: filename } = winRelease.files[0];
versionCache.set('windows-x64', {
data: { version, filename, sha512, link: getDownloadUrl(filename) },
expiry: Date.now() + CACHE_DURATION_MS,
Expand Down
19 changes: 15 additions & 4 deletions apps/cron-tasks/src/geo-ip-db-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,32 @@ async function downloadFile(url: string, savePath: string): Promise<Buffer> {
}

const buffer = await streamToBuffer(response.body!);
fs.writeFileSync(savePath, buffer);
fs.writeFileSync(savePath, buffer as unknown as NodeJS.ArrayBufferView);
return buffer;
}

async function streamToBuffer(stream: ReadableStream): Promise<Buffer> {
const chunks: Buffer[] = [];
const chunks: Uint8Array[] = [];
const reader = stream.getReader();

while (true) {
const { done, value } = await reader.read();
if (done) break;
chunks.push(Buffer.from(value));
chunks.push(value);
}

return Buffer.concat(chunks);
// Calculate total length
const totalLength = chunks.reduce((acc, chunk) => acc + chunk.length, 0);

// Create a single buffer and copy all chunks into it
const result = Buffer.allocUnsafe(totalLength);
let offset = 0;
for (const chunk of chunks) {
result.set(chunk, offset);
offset += chunk.length;
}

return result;
}

const tempTablesNeedToBeCreated = {
Expand Down
18 changes: 9 additions & 9 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.9.1",
"@docusaurus/plugin-ideal-image": "^3.9.1",
"@docusaurus/preset-classic": "^3.9.1",
"@docusaurus/theme-search-algolia": "^3.9.1",
"@mdx-js/react": "^3.1.0",
"@docusaurus/core": "^3.9.2",
"@docusaurus/plugin-ideal-image": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/theme-search-algolia": "^3.9.2",
"@mdx-js/react": "^3.1.1",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.4.0",
"prism-react-renderer": "^2.4.1",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.9.1",
"@docusaurus/tsconfig": "^3.9.1",
"@docusaurus/types": "^3.9.1",
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/tsconfig": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"typescript": "^5.3.3"
},
"browserslist": {
Expand Down
Loading