@involvex/magic-pwa-core 0.2.0 → 0.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@involvex/magic-pwa-core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Shared config schema and helpers for Magic-PWA",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -15,6 +15,16 @@ describe("schema", () => {
15
15
  expect(config.targets.electron).toBe(true);
16
16
  });
17
17
 
18
+ test("android.staticServer defaults to false", () => {
19
+ const config = createDefaultConfig({
20
+ name: "Demo",
21
+ slug: "demo",
22
+ appId: "com.example.demo",
23
+ template: "basic",
24
+ });
25
+ expect(config.android.staticServer).toBe(false);
26
+ });
27
+
18
28
  test("vue and svelte templates parse with basic-style defaults", () => {
19
29
  for (const template of ["vue", "svelte"] as const) {
20
30
  const config = createDefaultConfig({
package/src/schema.ts CHANGED
@@ -58,6 +58,13 @@ export const MagicPwaConfigSchema = z.object({
58
58
  url: z.string().url().optional(),
59
59
  statusBarStyle: z.enum(["auto", "light", "dark"]),
60
60
  enableHaptics: z.boolean(),
61
+ /**
62
+ * Bundle mode only. When true, Expo shell starts a loopback HTTP server
63
+ * (SPA-friendly) via `@dr.pogodin/react-native-static-server`.
64
+ * Native Android builds of that package are not supported on Windows hosts —
65
+ * keep false there and fall back to `file:///android_asset/web-dist`.
66
+ */
67
+ staticServer: z.boolean().default(false),
61
68
  }),
62
69
  });
63
70
 
@@ -123,6 +130,7 @@ export function createDefaultConfig(overrides: {
123
130
  url: "http://localhost:5173",
124
131
  statusBarStyle: "auto",
125
132
  enableHaptics: !isBlank,
133
+ staticServer: false,
126
134
  },
127
135
  });
128
136
  }