com.robotsquid.squidhub 0.5.1 → 0.5.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 CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.3
4
+
5
+ **Compressed builds are now refused in the Editor**, with a message naming the
6
+ setting to change. Player Settings → Publishing Settings → **Compression Format
7
+ → Disabled**.
8
+
9
+ SquidHub serves build assets uncompressed and Cloudflare compresses them at the
10
+ edge. A build compressed beforehand cannot be served at all: R2 stores it
11
+ correctly, but the edge either strips `Content-Encoding` or compresses the body
12
+ a second time, and no zone configuration preserves it. `squidhub-release`
13
+ refuses such files at upload too — this check exists so the failure lands in the
14
+ Editor, next to the setting that causes it.
15
+
16
+ ⚠️ **Removes 0.5.2's rewriting of compressed asset URLs.** That pointed
17
+ `web.wasm.br` at the key it was stored under, which was correct for a hosting
18
+ model since disproven. With compressed builds refused outright there is nothing
19
+ left for it to rewrite.
20
+
21
+ ## 0.5.2
22
+
23
+ ⚠️ **Fixes `Unable to load file Build/<name>.br!` — a Unity build that reached
24
+ the portal, rendered the shell and then could not load itself.**
25
+
26
+ `squidhub-release` stores a precompressed `web.wasm.br` under the key
27
+ `web.wasm` and records `Content-Encoding: br`, so the browser decodes it
28
+ natively. Unity's loader asks for the name as it appears on disk —
29
+ `Build/web.wasm.br` — and gets a 404, because nothing is stored there.
30
+
31
+ The build step now points those URLs at the key they are actually stored under.
32
+ That is also what makes the loader behave: Unity decides whether to run its own
33
+ JavaScript decompressor by looking for a `.br` or `.gz` on the URL, and with the
34
+ suffix gone it fetches normally and lets the browser decode — which is what the
35
+ stored headers were asking for all along.
36
+
37
+ ⚠️ Not Unity-specific despite the trigger: **any** reference a build makes to a
38
+ file it ships as `X.br` breaks identically, because the upload strips the suffix
39
+ from every one of them. The rewrite covers `.data`, `.wasm`, `.js`, `.json` and
40
+ `.symbols.json` in both `.br` and `.gz` form, and leaves alone a path that
41
+ merely ends in `-br`.
42
+
3
43
  ## 0.5.1
4
44
 
5
45
  ⚠️ **Fixes an install that logged an error per file on every refresh.** 0.5.0
@@ -87,27 +87,23 @@ namespace SquidHub.Editor
87
87
  AllowThreadsDefine + " to the WebGL scripting define symbols to silence this.");
88
88
  }
89
89
 
90
+ // ⚠️ FATAL, not a warning. A precompressed build cannot be served: R2
91
+ // stores it fine, but Cloudflare either strips Content-Encoding or
92
+ // compresses the body a second time, and no zone configuration
93
+ // preserves it. squidhub-release refuses these at upload too — this
94
+ // check exists so the failure lands in the Editor, next to the setting
95
+ // that causes it, rather than in a CLI twenty minutes later.
90
96
  private static void CheckCompression(List<Finding> findings)
91
97
  {
92
98
  var format = PlayerSettings.WebGL.compressionFormat;
99
+ if (format == WebGLCompressionFormat.Disabled) return;
93
100
 
94
- if (format == WebGLCompressionFormat.Disabled)
95
- {
96
- Warn(findings,
97
- "Compression is disabled. squidhub-release records Content-Encoding from " +
98
- "the file suffix at upload, so Brotli costs you nothing at runtime and " +
99
- "saves the player most of the download.");
100
- }
101
-
102
- // ⚠️ Not an error — just weight. The platform serves the correct
103
- // Content-Encoding, so the JS decompressor never has to run.
104
- if (PlayerSettings.WebGL.decompressionFallback)
105
- {
106
- Warn(findings,
107
- "Decompression Fallback is on. squidhub-release strips the .br suffix and " +
108
- "records Content-Encoding: br in R2, so the browser decompresses natively " +
109
- "and the bundled JS decompressor is dead weight. Turning it off is safe here.");
110
- }
101
+ Fatal(findings,
102
+ "Compression Format is " + format + ". SquidHub serves build assets " +
103
+ "uncompressed and Cloudflare compresses them at the edge — a build " +
104
+ "compressed beforehand reaches the browser either undeclared or " +
105
+ "double-encoded, and the loader fails naming the wrong cause. Set " +
106
+ "Player Settings > Publishing Settings > Compression Format to Disabled.");
111
107
  }
112
108
 
113
109
  private static bool AllowsThreads()
@@ -79,6 +79,7 @@ namespace SquidHub.Editor
79
79
  if (result.Extracted.Count == 0)
80
80
  log.Append(" · no inline scripts to hoist\n");
81
81
 
82
+
82
83
  File.WriteAllText(indexPath, result.Html);
83
84
  foreach (var note in result.Notes) log.Append(" ✓ ").Append(note).Append('\n');
84
85
 
package/README.md CHANGED
@@ -103,8 +103,7 @@ The package checks these for you, but for reference:
103
103
  | Setting | Value | Why |
104
104
  |---|---|---|
105
105
  | Native C/C++ Multithreading | **off** | SquidHub's default tier is not cross-origin isolated, so `SharedArrayBuffer` does not exist. A pthreads build cannot start. Ask about the isolated tier if you genuinely need threads — it carries no ads |
106
- | Compression Format | Brotli | `squidhub-release` strips the `.br` suffix and records `Content-Encoding: br` in R2, so the browser decompresses natively |
107
- | Decompression Fallback | off | The header is already correct, so the bundled JS decompressor is dead weight |
106
+ | Compression Format | **Disabled** | ⚠️ Required, and the build is refused otherwise. SquidHub stores assets uncompressed and Cloudflare compresses them at the edge, per client. A precompressed build cannot be served correctly at all |
108
107
 
109
108
  ## Things that will otherwise bite
110
109
 
@@ -135,11 +134,14 @@ is discarded. Change a real file and rebuild.
135
134
 
136
135
  ## ⚠️ Status
137
136
 
138
- **The Unity path has never been run against the platform.** The HTML rewriting
139
- is unit-tested, the bridge is covered by the SDK's own suite, and the C#
140
- compiles but no Unity build has completed a handshake with the portal. The
141
- JavaScript and Godot paths are tested; this one is not. Expect to shake out
142
- problems, and tell us what you find.
137
+ **Verified end to end on 2026-09-04.** A real Unity WebGL build completed the
138
+ portal handshake, received its session, read a save, and had `commerce.purchase`
139
+ correctly refused as an ungranted capability.
140
+
141
+ ⚠️ **Upload your build UNCOMPRESSED** Player Settings → Publishing Settings →
142
+ Compression Format → **Disabled**. Cloudflare compresses at the edge and sets the
143
+ header; a precompressed build cannot be served correctly and fails in the loader
144
+ with a message naming the wrong cause.
143
145
 
144
146
  ## Support
145
147
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.robotsquid.squidhub",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "displayName": "SquidHub",
5
5
  "description": "Cloud saves, analytics and the coin economy for Unity WebGL games published on SquidHub. Installs the C# wrapper, the .jslib half and the page bridge, and rewrites the exported index.html so it survives the platform's CSP.",
6
6
  "unity": "2021.3",