From e75b11117fd1687bca7dcc4d2aca26d397377a7d Mon Sep 17 00:00:00 2001 From: Torsten Brendgen Date: Sun, 19 Jul 2026 23:42:36 +0200 Subject: [PATCH] Bump version to 2.0.1, update deployment strategy for central SPFx deployment, and enhance error handling in PowerShell script --- README.md | 10 ++++++++-- config/package-solution.json | 17 ++--------------- deployment/add-megamenu.ps1 | 13 ++++++++++--- package-lock.json | 2 +- package.json | 2 +- .../megaMenu/MegaMenuApplicationCustomizer.ts | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 05c9296..a561214 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Barrierearme, dreistufige Portalnavigation auf Basis von SharePoint Managed Meta | Eigenschaft | Wert | |---|---| -| Version | 2.0.0 | +| Version | 2.0.1 | | SharePoint Framework | SPFx 1.4.1 | | Node.js | 8.17.0 | | Zieloberfläche | Moderne SharePoint-Seiten | @@ -43,7 +43,7 @@ MegaMenuApplicationCustomizer └── responsive Darstellung ``` -Das MegaMenu wird einmal pro Site Collection konfiguriert. PortalSettings speichert die zentrale Konfiguration im Property Bag des Root Webs und synchronisiert eine identische, web-scoped Runtime-Bindung auf das Root Web und alle vorhandenen Unterwebs. Das MegaMenu selbst enthält keine eigene Administrationsoberfläche. +Das MegaMenu wird einmal pro Site Collection konfiguriert. Das Paket wird mit `skipFeatureDeployment: true` zentral über den App Catalog bereitgestellt, damit das SPFx-Bundle ohne eine App-Installation in jedem einzelnen Web verfügbar ist. PortalSettings speichert die zentrale Konfiguration im Property Bag des Root Webs. Eine Site-Collection-Action aktiviert das MegaMenu auf dem Root Web sowie auf vorhandenen und zukünftigen Unterwebs. Das MegaMenu selbst enthält keine eigene Administrationsoberfläche. ## Voraussetzungen @@ -261,6 +261,12 @@ MegaMenu/ ## Versionshistorie +### 2.0.1 + +- Zentrale SPFx-Bereitstellung mit `skipFeatureDeployment: true`. +- Das MegaMenu-Paket muss nicht mehr als App in jedem Unterweb installiert werden. +- Feature-Framework-Registrierung aus dem Paket entfernt; die Aktivierung erfolgt zentral über PortalSettings oder das Deploymentskript. + ### 2.0.0 - Neue Application-Customizer-ID `c0abbffb-355d-4d4e-bd38-9e15fb811506`, um alte On-Premises-Manifest- und Loader-Zuordnungen sicher zu umgehen. diff --git a/config/package-solution.json b/config/package-solution.json index c8f1dee..ddcb45a 100644 --- a/config/package-solution.json +++ b/config/package-solution.json @@ -3,22 +3,9 @@ "solution": { "name": "mega-menu-client-side-solution", "id": "f4660e06-ce08-43ee-bfb7-5c4464e01133", - "version": "2.0.0.0", + "version": "2.0.1.0", "includeClientSideAssets": true, - "skipFeatureDeployment": false, - "features": [ - { - "title": "MegaMenu extension registration", - "description": "Registers the MegaMenu Application Customizer in the host web.", - "id": "1e4fdc74-8053-48b2-a15b-e975d61eb71f", - "version": "2.0.0.0", - "assets": { - "elementManifests": [ - "elements.xml" - ] - } - } - ] + "skipFeatureDeployment": true }, "paths": { "zippedPackage": "solution/mega-menu.sppkg" diff --git a/deployment/add-megamenu.ps1 b/deployment/add-megamenu.ps1 index 65c6e25..2b217f2 100644 --- a/deployment/add-megamenu.ps1 +++ b/deployment/add-megamenu.ps1 @@ -64,8 +64,15 @@ try { foreach ($web in $site.AllWebs) { try { + $webUrl = $web.Url + $userCustomActions = $web.UserCustomActions + + if ($null -eq $userCustomActions) { + throw ('UserCustomActions konnten fuer das Web nicht geladen werden: ' + $webUrl) + } + $actions = @( - $web.UserCustomActions | + $userCustomActions | Where-Object { $_.ClientSideComponentId -eq $componentId -or $_.ClientSideComponentId -eq $legacyComponentId @@ -88,7 +95,7 @@ try { } if (-not $currentAction) { - $currentAction = $web.UserCustomActions.Add() + $currentAction = $userCustomActions.Add() $currentAction.Name = [Guid]::NewGuid().ToString('B') $created++ } @@ -105,7 +112,7 @@ try { $currentAction.Update() $web.Update() - Write-Host ('MegaMenu synchronisiert: ' + $web.Url) -ForegroundColor Green + Write-Host ('MegaMenu synchronisiert: ' + $webUrl) -ForegroundColor Green } finally { $web.Dispose() diff --git a/package-lock.json b/package-lock.json index 88d1074..9c86bc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mega-menu", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 11625bc..9984c0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mega-menu", - "version": "2.0.0", + "version": "2.0.1", "private": true, "main": "lib/index.js", "engines": { diff --git a/src/extensions/megaMenu/MegaMenuApplicationCustomizer.ts b/src/extensions/megaMenu/MegaMenuApplicationCustomizer.ts index 42acdcd..12c1c10 100644 --- a/src/extensions/megaMenu/MegaMenuApplicationCustomizer.ts +++ b/src/extensions/megaMenu/MegaMenuApplicationCustomizer.ts @@ -40,7 +40,7 @@ export default class MegaMenuApplicationCustomizer const debug: boolean = this._isDebugEnabled(); debugLog(debug, LOG_SOURCE, 'onInit started.', { componentId: UserCustomActionMegaMenuId, - version: '2.0.0', + version: '2.0.1', properties: this.properties || {}, pageUrl: window.location.href, webUrl: this.context.pageContext.web.absoluteUrl,