@arcote.tech/arc-host 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/index.ts +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ArcContextAny } from "@arcote.tech/arc";
|
|
2
|
-
export declare function hostLiveModel<C extends ArcContextAny>(
|
|
2
|
+
export declare function hostLiveModel<C extends ArcContextAny>(contextPromise: Promise<C>, options: {
|
|
3
3
|
db: string;
|
|
4
4
|
version: number;
|
|
5
5
|
}): void;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,EACnD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,EACnD,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,EAC1B,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,QAMzC"}
|
package/dist/index.js
CHANGED
|
@@ -6721,9 +6721,11 @@ var sqliteAdapterFactory = (dbName) => {
|
|
|
6721
6721
|
};
|
|
6722
6722
|
|
|
6723
6723
|
// index.ts
|
|
6724
|
-
function hostLiveModel(
|
|
6724
|
+
function hostLiveModel(contextPromise, options) {
|
|
6725
6725
|
const dbAdapterFactory = sqliteAdapterFactory(options.db);
|
|
6726
|
-
|
|
6726
|
+
contextPromise.then((context3) => {
|
|
6727
|
+
rtcHostFactory(context3, dbAdapterFactory(context3))();
|
|
6728
|
+
});
|
|
6727
6729
|
}
|
|
6728
6730
|
export {
|
|
6729
6731
|
hostLiveModel
|
package/index.ts
CHANGED
|
@@ -3,9 +3,11 @@ import { rtcHostFactory } from "./host";
|
|
|
3
3
|
import { sqliteAdapterFactory } from "./sqliteAdapter";
|
|
4
4
|
|
|
5
5
|
export function hostLiveModel<C extends ArcContextAny>(
|
|
6
|
-
|
|
6
|
+
contextPromise: Promise<C>,
|
|
7
7
|
options: { db: string; version: number },
|
|
8
8
|
) {
|
|
9
9
|
const dbAdapterFactory = sqliteAdapterFactory(options.db);
|
|
10
|
-
|
|
10
|
+
contextPromise.then((context) => {
|
|
11
|
+
rtcHostFactory(context, dbAdapterFactory(context))();
|
|
12
|
+
});
|
|
11
13
|
}
|