@plitzi/sdk-server 0.35.9 → 0.35.10

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @plitzi/sdk-server
2
2
 
3
+ ## 0.35.10
4
+
5
+ ### Patch Changes
6
+
7
+ - **Breaking:** the space setting that lets a published site open the dev tools is now `settings.debugMode`, and
8
+ `settings.devTools` is gone.
9
+
10
+ It was always the same decision the SDK and the page server call `debugMode` — whether the dev-tools panel is
11
+ authorized — and having a third name for it invited confusing it with `devMode`, which is a different thing: it turns a
12
+ deployment into a development server (the unminified bundles, request timings, and the full action trace with every
13
+ step's results). A space can authorize debugging for its own site; it can never make its server a development one.
14
+
15
+ A space that stored `settings.devTools` needs it moved to `settings.debugMode`; nothing reads the old key.
16
+
17
+ - Updated dependencies
18
+ - @plitzi/plitzi-sdk@0.35.10
19
+ - @plitzi/sdk-shared@0.35.10
20
+
3
21
  ## 0.35.9
4
22
 
5
23
  ### Patch Changes
@@ -3,13 +3,13 @@ type DebugConfig = {
3
3
  debugMode?: boolean;
4
4
  devMode?: boolean;
5
5
  };
6
- type DebugSettings = Pick<Schema['settings'], 'devTools'> | undefined;
6
+ type DebugSettings = Pick<Schema['settings'], 'debugMode'> | undefined;
7
7
  /**
8
8
  * Whether a page — and what its flows did — may be debugged. One rule for the render and for every run it reports.
9
9
  *
10
10
  * The server decides first, through `debugMode`: set, it speaks for every space, and `false` is a refusal no space can
11
11
  * turn around. Left unset, a development server authorizes it, and so does a space whose own settings switched
12
- * `devTools` on. The settings are what this server loaded, never anything the request carries.
12
+ * `debugMode` on. The settings are what this server loaded, never anything the request carries.
13
13
  *
14
14
  * A page nobody authorized is told nothing: not the steps behind it, not even that a flow ran.
15
15
  */
@@ -4,11 +4,11 @@
4
4
  *
5
5
  * The server decides first, through `debugMode`: set, it speaks for every space, and `false` is a refusal no space can
6
6
  * turn around. Left unset, a development server authorizes it, and so does a space whose own settings switched
7
- * `devTools` on. The settings are what this server loaded, never anything the request carries.
7
+ * `debugMode` on. The settings are what this server loaded, never anything the request carries.
8
8
  *
9
9
  * A page nobody authorized is told nothing: not the steps behind it, not even that a flow ran.
10
10
  */
11
- var authorizesDebugging = (config, settings) => config.debugMode ?? (config.devMode === true || settings?.devTools === true);
11
+ var authorizesDebugging = (config, settings) => config.debugMode ?? (config.devMode === true || settings?.debugMode === true);
12
12
  /**
13
13
  * The same rule, for a request that has not loaded the space yet.
14
14
  *
@@ -62,7 +62,7 @@ var prepareRender = async (req, config, spaceId, environment, revision, pluginMa
62
62
  * product from the same cookie on its first pass, so the markup it hydrates matches.
63
63
  *
64
64
  * Who may authorize it: the server first, through `debugMode`. When it said nothing, a development server does, and
65
- * so does the space itself (`settings.devTools`) — an owner inspecting their own published site. The space is read
65
+ * so does the space itself (`settings.debugMode`) — an owner inspecting their own published site. The space is read
66
66
  * from what this server loaded, never from the request, so a visitor has no say in it.
67
67
  */
68
68
  const debugAuthorized = !Boolean(req.query["__pt"]) && authorizesDebugging(config, schema?.settings);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-server",
3
- "version": "0.35.9",
3
+ "version": "0.35.10",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist",
@@ -58,8 +58,8 @@
58
58
  "type": "module",
59
59
  "sideEffects": false,
60
60
  "dependencies": {
61
- "@plitzi/plitzi-sdk": "0.35.9",
62
- "@plitzi/sdk-shared": "0.35.9",
61
+ "@plitzi/plitzi-sdk": "0.35.10",
62
+ "@plitzi/sdk-shared": "0.35.10",
63
63
  "ejs": "^6.0.1",
64
64
  "esbuild": "^0.28.2",
65
65
  "jsonwebtoken": "^9.0.3",