feat: content engine

This commit is contained in:
2026-02-21 19:08:06 +01:00
parent 3f1c37813a
commit a50b8d6393
32 changed files with 2816 additions and 189 deletions

View File

@@ -67,18 +67,10 @@ for PKG in "${EXTENSION_PACKAGES[@]}"; do
rm -rf "${FINAL_TARGET:?}"/*
# Copy build artifacts
if [ "$LINK_MODE" = true ]; then
if [ -f "$PKG_PATH/dist/index.js" ]; then
ln -sf "$PKG_PATH/dist/index.js" "$FINAL_TARGET/index.js"
elif [ -f "$PKG_PATH/index.js" ]; then
ln -sf "$PKG_PATH/index.js" "$FINAL_TARGET/index.js"
fi
else
if [ -f "$PKG_PATH/dist/index.js" ]; then
cp "$PKG_PATH/dist/index.js" "$FINAL_TARGET/index.js"
elif [ -f "$PKG_PATH/index.js" ]; then
cp "$PKG_PATH/index.js" "$FINAL_TARGET/index.js"
fi
if [ -f "$PKG_PATH/dist/index.js" ]; then
cp "$PKG_PATH/dist/index.js" "$FINAL_TARGET/index.js"
elif [ -f "$PKG_PATH/index.js" ]; then
cp "$PKG_PATH/index.js" "$FINAL_TARGET/index.js"
fi
if [ -f "$PKG_PATH/package.json" ]; then
@@ -106,7 +98,8 @@ for PKG in "${EXTENSION_PACKAGES[@]}"; do
if [ -d "$PKG_PATH/dist" ]; then
if [ "$LINK_MODE" = true ]; then
ln -sf "$PKG_PATH/dist" "$FINAL_TARGET/dist"
REL_PATH=$(python3 -c "import os; print(os.path.relpath('$PKG_PATH/dist', '$FINAL_TARGET'))")
ln -sf "$REL_PATH" "$FINAL_TARGET/dist"
else
cp -r "$PKG_PATH/dist" "$FINAL_TARGET/"
fi
@@ -120,7 +113,7 @@ for PKG in "${EXTENSION_PACKAGES[@]}"; do
done
# Cleanup: remove anything from extensions root that isn't in our whitelist
WHITELIST=("${EXTENSION_PACKAGES[@]}" "endpoints" "hooks" "layouts" "modules" "operations" "panels" "displays" "interfaces")
WHITELIST=("${EXTENSION_PACKAGES[@]}" "sources" "endpoints" "hooks" "layouts" "modules" "operations" "panels" "displays" "interfaces")
for TARGET_BASE in "${TARGET_DIRS[@]}"; do
echo "🧹 Cleaning up $TARGET_BASE..."