Skip to content

Commit

Permalink
Merge branch 'main' of github.com:OnedocLabs/onedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Titou325 committed Jan 31, 2024
2 parents ca1929e + 1e47e89 commit c2608e2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
20 changes: 18 additions & 2 deletions packages/client-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/client-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onedoc/client",
"version": "0.1.15",
"version": "0.1.17",
"description": "Onedoc client for JavaScript",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -19,6 +19,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.11.13",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
Expand All @@ -35,6 +36,5 @@
"esm"
],
"dts": true
},
"dependencies": {}
}
}
14 changes: 8 additions & 6 deletions packages/client-js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ export interface PathString {
path: string;
content: string;
}
// export interface PathBuffer{
// path: string;
// content: Buffer;
// }
export interface PathBuffer{
path: string;
content: Buffer;
}

export interface ExternalLink {
href: string;
Expand All @@ -20,8 +20,7 @@ export interface DocumentInput {
keywords?: string[];
date?: string;
};
assets?: PathString[];
//| PathBuffer
assets?: PathString[] | PathBuffer[];
//| ExternalLink
}

Expand Down Expand Up @@ -143,8 +142,11 @@ export class Onedoc {
});

if (asset?.content) {

await uploadToSignedUrl(e.signedUrl, e.path, e.token, asset.content);

} else if (e.path == "/index.html") {

let htmlBuilder = new HtmlBuilder("Onedoc");

const styleSheets = document.assets
Expand Down

0 comments on commit c2608e2

Please sign in to comment.