| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-05-11 14:51:06 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-05-11 14:51:06 UTC |
| parent | f3a40865902cc1650cfb56df6b2adce89cb6eea1 |
| Makefile | +3 | -0 |
| borogove/persistence/MediaStoreFS.hx | +1 | -0 |
| nodejs.hxml | +1 | -0 |
| npm/index.ts | +3 | -3 |
| npm/package.json | +2 | -1 |
| npm/persistence-browser.ts | +10 | -0 |
| npm/persistence.ts | +2 | -0 |
diff --git a/Makefile b/Makefile index b3901e4..6bc1ae0 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ npm/borogove.js: sed -i '/\$$hx_exports.*|| {};/d' npm/borogove.js sed -i 's/^$$hx_exports[^=]*=\(.*\);$$/export {\1 };/g' npm/borogove.js sed -i 's/"\[Symbol.asyncIterator\]"() {/[Symbol.asyncIterator]() {/g' npm/borogove.js + echo "export { FractionalIndexing_between, FractionalIndexing_BASE_95_DIGITS }" >> npm/borogove.js cd npm && npx cjstoesm borogove.js echo "export class borogove_Presence {}" >> npm/borogove.d.ts @@ -55,8 +56,10 @@ npm: npm/borogove-browser.js npm/borogove.js borogove/persistence/IDB.js borogov cp borogove/persistence/IDB.js npm cp borogove/persistence/MediaStoreCache.js npm cp borogove/persistence/sqlite-worker1.mjs npm + $(RM) =f npm/calls.js npm/persistence.js npm/persistence-browser.js npm/borogove-enums.js -cd npm && npx tsc --esModuleInterop --lib esnext,dom --target esnext --preserveConstEnums --allowJs --checkJs -d index.ts > /dev/null cd npm && npx tsc --esModuleInterop --lib esnext,dom --target esnext --preserveConstEnums --allowJs --checkJs -d index.ts + cd npm && npx tsc --esModuleInterop --lib esnext,dom --target esnext --preserveConstEnums --allowJs --checkJs -d persistence-browser.ts playwright/.cache/borogove.js: npm esbuild npm/index.js --bundle --format=esm "--alias:node:dns=@xmpp/resolve" "--footer:js=export { borogove_JID as JID, borogove_Stanza as Stanza, borogove_ReactionUpdate as ReactionUpdate }" --outfile=$@ diff --git a/borogove/persistence/MediaStoreFS.hx b/borogove/persistence/MediaStoreFS.hx index 509aa43..0660c35 100644 --- a/borogove/persistence/MediaStoreFS.hx +++ b/borogove/persistence/MediaStoreFS.hx @@ -14,6 +14,7 @@ import thenshim.Promise; @:build(HaxeSwiftBridge.expose()) @HaxeCBridge.name("borogove_persistence_media_store_fs") #end +@:expose class MediaStoreFS implements MediaStore { private final blobpath: String; private var kv: Null<KeyValueStore> = null; diff --git a/nodejs.hxml b/nodejs.hxml index 058d4bc..df0df9f 100644 --- a/nodejs.hxml +++ b/nodejs.hxml @@ -15,6 +15,7 @@ borogove.Register borogove.Push borogove.Version borogove.persistence.Sqlite +borogove.persistence.MediaStoreFS borogove.Html --macro borogove.Util.DummyRequireMacro.init() diff --git a/npm/index.ts b/npm/index.ts index c344da5..418776c 100644 --- a/npm/index.ts +++ b/npm/index.ts @@ -6,7 +6,7 @@ export { borogove_ReactionUpdateKind as ReactionUpdateKind, borogove_UiState as UiState, borogove_UserState as UserState, -} from "./borogove-enums"; +} from "./borogove-enums.js"; export { borogove_AvailableChat as AvailableChat, borogove_AvailableChatIterator as AvailableChatIterator, @@ -46,10 +46,10 @@ export type { borogove_Persistence as Persistence, } from "./borogove.js"; -import * as persistence from "./persistence"; +import * as persistence from "./persistence.js"; export { persistence }; -import * as calls from "./calls"; +import * as calls from "./calls.js"; export { calls }; import { borogove_Version } from "./borogove.js"; diff --git a/npm/package.json b/npm/package.json index 78a2b7a..afbe661 100644 --- a/npm/package.json +++ b/npm/package.json @@ -11,7 +11,8 @@ "*.ts" ], "browser": { - "./borogove.js": "./borogove-browser.js" + "./borogove.js": "./borogove-browser.js", + "./persistence.js": "./persistence-browser.js" }, "exports": { ".": "./index.js", diff --git a/npm/persistence-browser.ts b/npm/persistence-browser.ts new file mode 100644 index 0000000..abb67fe --- /dev/null +++ b/npm/persistence-browser.ts @@ -0,0 +1,10 @@ +export { default as IDB } from "./IDB.js"; +export { default as MediaStoreCache } from "./MediaStoreCache.js"; + +export { + borogove_persistence_Dummy as Dummy, +} from "./borogove.js"; +export type { + borogove_persistence_KeyValueStore as KeyValueStore, + borogove_persistence_MediaStore as MediaStore, +} from "./borogove.js"; diff --git a/npm/persistence.ts b/npm/persistence.ts index abb67fe..5822300 100644 --- a/npm/persistence.ts +++ b/npm/persistence.ts @@ -3,6 +3,8 @@ export { default as MediaStoreCache } from "./MediaStoreCache.js"; export { borogove_persistence_Dummy as Dummy, + borogove_persistence_Sqlite as Sqlite, + borogove_persistence_MediaStoreFS as MediaStoreFS, } from "./borogove.js"; export type { borogove_persistence_KeyValueStore as KeyValueStore,