@vue-skuilder/db 0.1.13-4 → 0.1.13-6
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/core/index.js +6 -5
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +6 -5
- package/dist/core/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.mts +4 -0
- package/dist/impl/couch/index.d.ts +4 -0
- package/dist/impl/couch/index.js +115 -16
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +115 -16
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.js +61 -8
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +61 -8
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.js +121 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/core/types/types-legacy.ts +1 -1
- package/src/impl/common/BaseUserDB.ts +74 -42
- package/src/impl/common/index.ts +1 -1
- package/src/impl/couch/CouchDBSyncStrategy.ts +72 -9
- package/src/impl/couch/PouchDataLayerProvider.ts +5 -18
- package/src/impl/couch/auth.ts +5 -9
- package/src/impl/static/NoOpSyncStrategy.ts +3 -5
package/dist/core/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var init_types_legacy = __esm({
|
|
|
107
107
|
"src/core/types/types-legacy.ts"() {
|
|
108
108
|
"use strict";
|
|
109
109
|
init_logger();
|
|
110
|
-
GuestUsername = "
|
|
110
|
+
GuestUsername = "sk-guest-";
|
|
111
111
|
log = (message) => {
|
|
112
112
|
logger.log(message);
|
|
113
113
|
};
|
|
@@ -1659,7 +1659,6 @@ var init_auth = __esm({
|
|
|
1659
1659
|
"src/impl/couch/auth.ts"() {
|
|
1660
1660
|
"use strict";
|
|
1661
1661
|
init_factory();
|
|
1662
|
-
init_types_legacy();
|
|
1663
1662
|
init_logger();
|
|
1664
1663
|
import_cross_fetch = __toESM(require("cross-fetch"));
|
|
1665
1664
|
}
|
|
@@ -1919,7 +1918,7 @@ Currently logged-in as ${this._username}.`
|
|
|
1919
1918
|
log3(`Account created successfully, updating username to ${username}`);
|
|
1920
1919
|
this._username = username;
|
|
1921
1920
|
try {
|
|
1922
|
-
localStorage.removeItem("
|
|
1921
|
+
localStorage.removeItem("sk-guest-uuid");
|
|
1923
1922
|
} catch (e) {
|
|
1924
1923
|
logger.warn("localStorage not available (Node.js environment):", e);
|
|
1925
1924
|
}
|
|
@@ -1946,7 +1945,7 @@ Currently logged-in as ${this._username}.`
|
|
|
1946
1945
|
log3(`Logged in as ${username}`);
|
|
1947
1946
|
this._username = username;
|
|
1948
1947
|
try {
|
|
1949
|
-
localStorage.removeItem("
|
|
1948
|
+
localStorage.removeItem("sk-guest-uuid");
|
|
1950
1949
|
} catch (e) {
|
|
1951
1950
|
logger.warn("localStorage not available (Node.js environment):", e);
|
|
1952
1951
|
}
|
|
@@ -2457,7 +2456,9 @@ Currently logged-in as ${this._username}.`
|
|
|
2457
2456
|
const putResult = await this.writeDB.put(initCardHistory);
|
|
2458
2457
|
return { ...initCardHistory, _rev: putResult.rev };
|
|
2459
2458
|
} catch (creationError) {
|
|
2460
|
-
throw new Error(
|
|
2459
|
+
throw new Error(
|
|
2460
|
+
`Failed to create CardHistory for ${cardHistoryID}. Reason: ${creationError}`
|
|
2461
|
+
);
|
|
2461
2462
|
}
|
|
2462
2463
|
} else {
|
|
2463
2464
|
throw new Error(`putCardRecord failed because of:
|