@protobase/cli 0.45.8 → 0.45.9

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.45.8";
2
+ var version = "0.45.9";
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 = 2;
3
+ var nativeContract = 3;
4
4
  var dependencies = {
5
5
  "@capacitor/android": "8.5.3",
6
6
  "@capacitor/app": "8.1.2",
@@ -13,7 +13,7 @@ const nativeDependencies = Object.fromEntries(Object.entries(dependencies).filte
13
13
  * The native code an app's binary carries from @protobase/mobile, name → version, which a native fingerprint names:
14
14
  * the native packages it pins, at their versions, and its own native code by its `nativeContract`, `native-<n>`. Never
15
15
  * its npm version, which is Protobase's: every Protobase release would cut the binaries off updates. Raise
16
- * `nativeContract` whenever its Android (later iOS) sources change; its test fails until it is.
16
+ * `nativeContract` whenever its Android or iOS sources change; its test fails until it is.
17
17
  */
18
18
  const pinnedNative = {
19
19
  ...nativeDependencies,
@@ -42,10 +42,17 @@ const checkProtobasePlugin = async (ws) => {
42
42
  if (missing.length === 0) return;
43
43
  throw new Error(`The Android app lacks Protobase's native plugin (${missing.join(", ")}): delete ${ws} and run the command again`);
44
44
  };
45
- /** Refuses the live updater on iOS, which has no guard yet, from the class list `cap add ios` writes. */
45
+ /** The class of Protobase's iOS plugin, which gives the page back the bounce Capacitor turns off. */
46
+ const protobaseIosPlugin = "ProtobaseBounce";
47
+ /**
48
+ * Checks the class list `cap add ios` writes: it refuses the live updater, which has no guard on iOS yet, and an app
49
+ * without Protobase's iOS plugin, as a workspace left from an earlier CLI may build.
50
+ */
46
51
  const checkIosPlugins = async (ws) => {
47
- if (!JSON.parse(await readFile(path.join(ws, "ios", "App", "App", "capacitor.config.json"), "utf8")).packageClassList?.includes("LiveUpdatePlugin")) return;
48
- throw new Error("The iOS app lists LiveUpdatePlugin, which has no guard against page script on iOS yet");
52
+ const classes = JSON.parse(await readFile(path.join(ws, "ios", "App", "App", "capacitor.config.json"), "utf8")).packageClassList ?? [];
53
+ if (classes.includes("LiveUpdatePlugin")) throw new Error("The iOS app lists LiveUpdatePlugin, which has no guard against page script on iOS yet");
54
+ if (classes.includes("ProtobaseBounce")) return;
55
+ throw new Error(`The iOS app lacks Protobase's native plugin (${protobaseIosPlugin}): delete ${ws} and run the command again`);
49
56
  };
50
57
  //#endregion
51
- export { checkIosPlugins, checkProtobasePlugin, guardLiveUpdate, protobasePluginClasses };
58
+ export { checkIosPlugins, checkProtobasePlugin, guardLiveUpdate, protobaseIosPlugin, protobasePluginClasses };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.45.8",
3
+ "version": "0.45.9",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -36,11 +36,11 @@
36
36
  "@better-auth/core": "^1.7.12",
37
37
  "@hono/node-server": "^2.1.3",
38
38
  "@hono/vite-dev-server": "^0.26.1",
39
- "@protobase/layout": "0.45.8",
40
- "@protobase/query": "0.45.8",
41
- "@protobase/schema": "0.45.8",
42
- "@protobase/server": "0.45.8",
43
- "@protobase/ui": "0.45.8",
39
+ "@protobase/layout": "0.45.9",
40
+ "@protobase/query": "0.45.9",
41
+ "@protobase/schema": "0.45.9",
42
+ "@protobase/server": "0.45.9",
43
+ "@protobase/ui": "0.45.9",
44
44
  "@react-email/render": "^2.1.0",
45
45
  "@scalar/hono-api-reference": "^0.12.10",
46
46
  "@tailwindcss/vite": "^4.3.3",