saltcorn-samba 0.3.2 → 0.3.3
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/CHANGELOG.md +14 -0
- package/index.js +17 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to `saltcorn-samba` are documented here.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.3.3] – 2026-07-05
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **`plugin[key] is not a function` beim Installieren behoben.**
|
|
11
|
+
Saltcorns Plugin-Loader ruft — sobald ein Plugin `configuration_workflow`
|
|
12
|
+
exportiert — *jeden* weiteren Manifest-Key als Funktion mit der aktuellen
|
|
13
|
+
Konfiguration als Argument auf (siehe
|
|
14
|
+
[saltcorn-data/db/state.ts, Fn `withCfg`](https://github.com/saltcorn/saltcorn/blob/master/packages/saltcorn-data/db/state.ts)).
|
|
15
|
+
In v0.3.2 waren `viewtemplates`, `routes`, `headers` und `dependencies`
|
|
16
|
+
jedoch statische Arrays — der Aufruf `plugin.viewtemplates(cfg)` warf
|
|
17
|
+
daher den Fehler. Alle Keys sind jetzt Factory-Funktionen, die den Wert
|
|
18
|
+
zurückgeben. `plugin_name` als Top-Level-Key wurde entfernt (aus
|
|
19
|
+
demselben Grund unaufrufbar).
|
|
20
|
+
|
|
7
21
|
## [0.3.2] – 2026-07-05
|
|
8
22
|
|
|
9
23
|
### Fixed
|
package/index.js
CHANGED
|
@@ -607,16 +607,28 @@ function wrapView(v) {
|
|
|
607
607
|
// Manifest
|
|
608
608
|
// ---------------------------------------------------------------------------
|
|
609
609
|
|
|
610
|
+
// ---------------------------------------------------------------------------
|
|
611
|
+
// IMPORTANT: how Saltcorn iterates the manifest
|
|
612
|
+
// ---------------------------------------------------------------------------
|
|
613
|
+
// When a plugin exports `configuration_workflow`, Saltcorn's state loader
|
|
614
|
+
// treats EVERY other manifest key as a factory function and calls it with the
|
|
615
|
+
// current plugin configuration — see
|
|
616
|
+
// packages/saltcorn-data/db/state.ts `withCfg` (`plugin[key](cfg || {})`).
|
|
617
|
+
// So each key below must be a function that returns the value, otherwise
|
|
618
|
+
// Node throws `plugin[key] is not a function`. The only exceptions are the
|
|
619
|
+
// bookkeeping keys `sc_plugin_api_version` and `configuration_workflow`
|
|
620
|
+
// itself, which the loader accesses directly.
|
|
621
|
+
// ---------------------------------------------------------------------------
|
|
622
|
+
|
|
610
623
|
module.exports = {
|
|
611
624
|
sc_plugin_api_version: 1,
|
|
612
|
-
plugin_name: PLUGIN_NAME,
|
|
613
625
|
configuration_workflow,
|
|
614
|
-
viewtemplates: [wrapView(fileManagerView), wrapView(treeView)],
|
|
615
|
-
routes,
|
|
616
|
-
headers: [
|
|
626
|
+
viewtemplates: () => [wrapView(fileManagerView), wrapView(treeView)],
|
|
627
|
+
routes: () => routes,
|
|
628
|
+
headers: () => [
|
|
617
629
|
{ css: `/plugins/public/${PLUGIN_NAME}/samba.css` },
|
|
618
630
|
],
|
|
619
|
-
dependencies: [],
|
|
631
|
+
dependencies: () => [],
|
|
620
632
|
};
|
|
621
633
|
|
|
622
634
|
// Note: the `samba_pdf` fieldview shipped in v0.1–0.3.1 has been removed from
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saltcorn-samba",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Saltcorn plugin: browse, upload, rename and delete files on a Samba/CIFS share. File-manager view, directory tree, inline PDF viewer, external-app open (smb://).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|