@character-foundry/character-foundry 0.1.7 → 0.1.8-dev.1765911858
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/README.md +81 -32
- package/dist/app-framework.cjs +1 -1
- package/dist/app-framework.cjs.map +1 -1
- package/dist/app-framework.js +1 -1
- package/dist/app-framework.js.map +1 -1
- package/dist/charx.cjs.map +1 -1
- package/dist/charx.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/exporter.cjs +3 -3
- package/dist/exporter.cjs.map +1 -1
- package/dist/exporter.js +3 -3
- package/dist/exporter.js.map +1 -1
- package/dist/federation.cjs +6 -6
- package/dist/federation.cjs.map +1 -1
- package/dist/federation.js +6 -6
- package/dist/federation.js.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/loader.cjs +4 -4
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.js +4 -4
- package/dist/loader.js.map +1 -1
- package/dist/lorebook.cjs +5 -5
- package/dist/lorebook.cjs.map +1 -1
- package/dist/lorebook.js +5 -5
- package/dist/lorebook.js.map +1 -1
- package/dist/media.cjs.map +1 -1
- package/dist/media.js.map +1 -1
- package/dist/normalizer.cjs.map +1 -1
- package/dist/normalizer.js.map +1 -1
- package/dist/png.cjs +1 -1
- package/dist/png.cjs.map +1 -1
- package/dist/png.js +1 -1
- package/dist/png.js.map +1 -1
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/tokenizers.cjs.map +1 -1
- package/dist/tokenizers.js.map +1 -1
- package/dist/voxta.cjs +1 -1
- package/dist/voxta.cjs.map +1 -1
- package/dist/voxta.js +1 -1
- package/dist/voxta.js.map +1 -1
- package/package.json +6 -6
package/dist/federation.cjs
CHANGED
|
@@ -527,7 +527,7 @@ var SyncEngine = class {
|
|
|
527
527
|
throw new Error(`Card not found: ${sourceId}`);
|
|
528
528
|
}
|
|
529
529
|
const federatedId = generateCardId(this.baseUrl, `${sourcePlatform}-${sourceId}`);
|
|
530
|
-
|
|
530
|
+
const syncState = await this.stateStore.get(federatedId);
|
|
531
531
|
if (syncState?.platformIds[targetPlatform]) {
|
|
532
532
|
const existingCard = await targetAdapter.getCard(syncState.platformIds[targetPlatform]);
|
|
533
533
|
if (existingCard) {
|
|
@@ -689,7 +689,7 @@ var SyncEngine = class {
|
|
|
689
689
|
};
|
|
690
690
|
try {
|
|
691
691
|
let sourceCard = null;
|
|
692
|
-
let
|
|
692
|
+
let _sourcePlatform = null;
|
|
693
693
|
if (resolution === "merge" && mergedCard) {
|
|
694
694
|
sourceCard = mergedCard;
|
|
695
695
|
} else if (resolution === "local") {
|
|
@@ -698,7 +698,7 @@ var SyncEngine = class {
|
|
|
698
698
|
const adapter = this.platforms.get(platform);
|
|
699
699
|
if (adapter) {
|
|
700
700
|
sourceCard = await adapter.getCard(id);
|
|
701
|
-
|
|
701
|
+
_sourcePlatform = platform;
|
|
702
702
|
break;
|
|
703
703
|
}
|
|
704
704
|
}
|
|
@@ -709,7 +709,7 @@ var SyncEngine = class {
|
|
|
709
709
|
const remoteId = syncState.platformIds[syncState.conflict.remotePlatform];
|
|
710
710
|
if (remoteId) {
|
|
711
711
|
sourceCard = await adapter.getCard(remoteId);
|
|
712
|
-
|
|
712
|
+
_sourcePlatform = syncState.conflict.remotePlatform;
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
}
|
|
@@ -772,7 +772,7 @@ var SyncEngine = class {
|
|
|
772
772
|
if (!targetAdapter) {
|
|
773
773
|
throw new Error(`Platform not registered: ${targetPlatform}`);
|
|
774
774
|
}
|
|
775
|
-
|
|
775
|
+
const sourceState = await this.stateStore.get(sourceFederatedId);
|
|
776
776
|
const sourceLocalId = sourceState?.platformIds[sourcePlatform];
|
|
777
777
|
if (!sourceLocalId) {
|
|
778
778
|
throw new Error(`Cannot find source card: ${sourceFederatedId}`);
|
|
@@ -1052,7 +1052,7 @@ var FileSyncStateStore = class {
|
|
|
1052
1052
|
for (const state of data) {
|
|
1053
1053
|
this.states.set(state.federatedId, state);
|
|
1054
1054
|
}
|
|
1055
|
-
} catch
|
|
1055
|
+
} catch {
|
|
1056
1056
|
this.states.clear();
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|