domma-cms 1.6.47 → 1.6.48

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.
@@ -111,7 +111,7 @@ function DOC_TUTORIALS_SUBMENU() {
111
111
  text: 'Tutorials', icon: 'document',
112
112
  items: [
113
113
  {text: 'Building a CRUD App', url: '#/tutorials/crud', icon: 'database'},
114
- {text: 'Writing a Plugin', url: '#/tutorials/plugin', icon: 'package'},
114
+ {text: 'Writing a Tool', url: '#/tutorials/plugin', icon: 'package'},
115
115
  {text: 'Form Follow-Up', url: '#/tutorials/forms', icon: 'layout'}
116
116
  ]
117
117
  };
@@ -385,6 +385,18 @@ export async function ensureFolderKeys(opts = {}) {
385
385
  changed = true;
386
386
  }
387
387
 
388
+ // Plugins are Tools, so the tutorial became "Writing a Tool" in 1.6.48. Renamed once
389
+ // (`meta.writingToolName`) and only where the item still says Writing a Plugin.
390
+ if (!menu.meta?.writingToolName && items.length) {
391
+ const rename = (list) => (list || []).forEach(n => {
392
+ if (n && n.url === '#/tutorials/plugin' && String(n.text || '').trim() === 'Writing a Plugin') n.text = 'Writing a Tool';
393
+ if (Array.isArray(n?.items)) rename(n.items);
394
+ });
395
+ rename(items);
396
+ menu.meta = {...(menu.meta || {}), writingToolName: true};
397
+ changed = true;
398
+ }
399
+
388
400
  // An empty menu is left empty: the renderer's minimal fallback (Dashboard,
389
401
  // Menus) is what an admin needs to repair it, and a lone Tools folder would
390
402
  // stop that fallback from applying.