@odla-ai/chapter 0.40.2 → 0.41.0
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 +19 -5
- package/dist/{chunk-E5OXQ3DC.js → chunk-JLLRZO7B.js} +229 -178
- package/dist/chunk-JLLRZO7B.js.map +1 -0
- package/dist/{chunk-4K2Q5JBC.js → chunk-O22RRPBT.js} +232 -84
- package/dist/chunk-O22RRPBT.js.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +6 -2
- package/dist/ui/admin/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +4 -2
- package/dist/ui/member/index.d.ts +20 -1
- package/dist/ui/member/index.js +3 -1
- package/dist/worker/index.cjs +26 -12
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.js +26 -12
- package/dist/worker/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-4K2Q5JBC.js.map +0 -1
- package/dist/chunk-E5OXQ3DC.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2649,8 +2649,8 @@ function validateBuilderLibraryDocument(value, options = {}) {
|
|
|
2649
2649
|
if (sourceType === "chapter" && (resource.scope.kind !== "chapter" || resource.scope.chapterId !== sourceAppId)) {
|
|
2650
2650
|
errors.push(`document.resources.${resource.id}: Chapter sources may author only their own chapter scope`);
|
|
2651
2651
|
}
|
|
2652
|
-
if (sourceType === "built_not_found" && resource.scope.kind === "chapter") {
|
|
2653
|
-
errors.push(`document.resources.${resource.id}: Built Not Found
|
|
2652
|
+
if (sourceType === "built_not_found" && resource.scope.kind === "chapter" && !(options.allowedChapterIds ?? []).includes(resource.scope.chapterId)) {
|
|
2653
|
+
errors.push(`document.resources.${resource.id}: Built Not Found may target only configured Chapters`);
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
2656
|
if (errors.length) return { ok: false, errors };
|
|
@@ -2682,7 +2682,7 @@ function projectBuilderLibraryDelivery(document, target) {
|
|
|
2682
2682
|
return {
|
|
2683
2683
|
...document,
|
|
2684
2684
|
target,
|
|
2685
|
-
resources: document.source.type === "built_not_found" ? document.resources.filter((resource) => resource.scope.kind === "global") : document.resources
|
|
2685
|
+
resources: document.source.type === "built_not_found" ? document.resources.filter((resource) => resource.scope.kind === "global" || resource.scope.kind === "chapter" && resource.scope.chapterId === target.appId) : document.resources
|
|
2686
2686
|
};
|
|
2687
2687
|
}
|
|
2688
2688
|
function promoteBuilderLibraryResource(input) {
|