@protobase/cli 0.117.5 → 0.117.6

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.117.5";
2
+ var version = "0.117.6";
3
3
  //#endregion
4
4
  export { version };
@@ -1,6 +1,6 @@
1
1
  //#region ../mobile/package.json
2
2
  var name = "@protobase/mobile";
3
- var nativeContract = 16;
3
+ var nativeContract = 17;
4
4
  var dependencies = {
5
5
  "@capacitor/android": "8.5.3",
6
6
  "@capacitor/app": "8.1.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.117.5",
3
+ "version": "0.117.6",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@better-auth/core": "^1.7.12",
45
45
  "@hono/node-server": "^2.1.3",
46
- "@protobase/config": "0.117.5",
47
- "@protobase/layout": "0.117.5",
48
- "@protobase/query": "0.117.5",
49
- "@protobase/schema": "0.117.5",
50
- "@protobase/server": "0.117.5",
51
- "@protobase/ui": "0.117.5",
52
- "@protobase/workflows": "0.117.5",
46
+ "@protobase/config": "0.117.6",
47
+ "@protobase/layout": "0.117.6",
48
+ "@protobase/query": "0.117.6",
49
+ "@protobase/schema": "0.117.6",
50
+ "@protobase/server": "0.117.6",
51
+ "@protobase/ui": "0.117.6",
52
+ "@protobase/workflows": "0.117.6",
53
53
  "@react-email/render": "^2.1.0",
54
54
  "@scalar/hono-api-reference": "^0.12.10",
55
55
  "@sentry/vite-plugin": "^11.10.0",
@@ -186,6 +186,25 @@ mobile: {
186
186
 
187
187
  Build the binary again. Each deploy of the app then reaches it: it downloads the files that changed in the background and runs them at its next start, or when it comes back to the foreground after 5 minutes or more away, on the page it showed and still signed in, behind its splash screen. Right after someone signs in, it switches before the app opens. It never switches while in use, within 5 minutes of leaving it, or over unsaved changes on the page, and it asks nobody to reload. A release that fails to start goes back to the files the binary carries. Releases come from a server of the same Protobase minor as the binary (below 1.0) and the same native code; a newer minor, or a Protobase release that changes the native code, needs a store release. See [the live updater](../reference/cli.md#the-live-updater).
188
188
 
189
+ ### In a host app's own views
190
+
191
+ A native host app that embeds the shell and serves its files in its own views, rather than through the Capacitor web view, takes the same releases through the same checks with `HostedReleases` from `@protobase/mobile`'s iOS package. The host decides when a new release takes over:
192
+
193
+ ```swift
194
+ let releases = try HostedReleases.make(
195
+ HostedReleaseSettings(apiOrigin: "https://shop.example.com", publicKey: publicKey, fingerprint: fingerprint, shellVersion: shellVersion, builtInOrder: builtInOrder),
196
+ builtInFiles: Bundle.main.url(forResource: "shell", withExtension: nil)!
197
+ ).get()
198
+
199
+ serve(releases.currentFiles) // the release swapped in earlier, or the binary's own files
200
+ releases.check { outcome in // downloads and checks a new release in the background
201
+ if case .ready = outcome { /* swap it in when nothing is open */ }
202
+ }
203
+ if releases.swap() { serve(releases.currentFiles) }
204
+ ```
205
+
206
+ Each set of files a host serves takes its own `name`, so their releases stay apart. A swapped-in release that no longer passes its checks, or that an update of the app made older than the files it carries, gives way to the binary's own files at the next start.
207
+
189
208
  ## 8. What the stores accept
190
209
 
191
210
  You submit the app under your own developer account, on both stores: Apple rejects apps from a template or app generation service unless the provider of the app's content submits them ([App Review Guidelines](https://developer.apple.com/app-store/review/guidelines/) 4.2.6).