@moku-labs/native 0.3.10 → 0.3.12
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/README.md +16 -4
- package/dist/index.cjs +1445 -479
- package/dist/index.d.cts +63 -26
- package/dist/index.d.mts +63 -26
- package/dist/index.mjs +1445 -479
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,10 +175,11 @@ The substantive surface is **global** `Config` — every plugin reads it via `ct
|
|
|
175
175
|
| `app.version` | `string?` | unset → `"0.1.0"` | Marketing version. |
|
|
176
176
|
| `app.icon` | `string?` | unset | 1024×1024 PNG, relative to cwd. Unset → a placeholder PNG is generated. |
|
|
177
177
|
| `app.category` | `string?` | unset | Store category → `bundle.category`. |
|
|
178
|
-
| `app.buildNumber` | `string?` | unset | Store build number → `bundle.{iOS,macOS}.bundleVersion
|
|
178
|
+
| `app.buildNumber` | `string?` | unset | Store build number → `bundle.{iOS,macOS}.bundleVersion`, and on an android build `bundle.android.versionCode`, as a number. Android refuses anything but a whole number from 1 to 2100000000, at generate; `"1.0.3"` stays legal elsewhere. |
|
|
179
179
|
| `app.orientation` | `"portrait" \| "landscape" \| "any"` | unset (= `"any"`) | Build-time mobile orientation lock → `UISupportedInterfaceOrientations` (+ `~ipad`, `UIRequiresFullScreen`) in `Info.ios.plist`, `android:screenOrientation` on the Android main activity. No runtime lock. |
|
|
180
|
-
| `app.backgroundColor` | `string?` | unset | Hex window colour (`"#10161d"`, `"#10161dff"`) → `app.windows[0].backgroundColor`. Shows during launch and behind any gap the page does not cover. Android status bar icons follow it: light on a dark colour, dark on a light one. |
|
|
180
|
+
| `app.backgroundColor` | `string?` | unset | Hex window colour (`"#10161d"`, `"#10161dff"`) → `app.windows[0].backgroundColor`. Shows during launch and behind any gap the page does not cover. On Android it also paints the activity window and the Android 12+ icon splash, so no dark frame shows between the icon splash and the page's first paint; the status bar icons follow it: light on a dark colour, dark on a light one. |
|
|
181
181
|
| `app.adaptiveIconInset` | `number?` | unset | Android adaptive icon inset, percent per side of the 108 dp canvas (`0 < n ≤ 30`, validated at composition). Wraps the launcher foreground in an `<inset>` so full-bleed art survives the mask; `19.44` keeps it inside the 66 dp safe zone. Re-applied after `tauri icon` on every Android build; unset leaves the icon untouched. |
|
|
182
|
+
| `app.keepScreenOn` | `boolean?` | unset | iOS: the app turns the idle timer off at launch, because iOS refuses `navigator.wakeLock` until the first tap. Android keeps the screen on from the page. |
|
|
182
183
|
| `web.build` | `string` | `"bun run build"` | Runs before a build, in `web.cwd`. |
|
|
183
184
|
| `web.devCommand` | `string` | `"bun run dev"` | Runs before `dev`, in `web.cwd`. |
|
|
184
185
|
| `web.devUrl` | `string` | `"http://localhost:5173"` | Dev server URL — also the `DevHandle.url` and the readiness-poll target. |
|
|
@@ -189,9 +190,11 @@ The substantive surface is **global** `Config` — every plugin reads it via `ct
|
|
|
189
190
|
| `targets` | `readonly Target[]` | `hostTargets(process.platform)` | The host's own desktop target (`darwin`→`macos`, `win32`→`windows`, `linux`→`linux`). **Mobile is opt-in**: name `ios`/`android` explicitly. |
|
|
190
191
|
| `projectDir` | `string` | `".moku/tauri"` | Generated Tauri project root (contains `src-tauri/`). Gitignored build output. |
|
|
191
192
|
| `outDir` | `string` | `"dist-native"` | Installer delivery root — `collect` copies finished artifacts to `outDir/<target>/`. |
|
|
192
|
-
| `signing.apple` | `AppleSigning?` | unset | `teamId`, `signingIdentity`, `providerShortName`, `entitlements`, `appStore`, `exportMethod`, `macosMinimumSystemVersion`, `iosMinimumSystemVersion` (default `"15.0"`: Tauri's own 14.0 is refused by Xcode 27) — see [Signing and store builds](#signing-and-store-builds). |
|
|
193
|
+
| `signing.apple` | `AppleSigning?` | unset | `teamId`, `signingIdentity`, `providerShortName`, `entitlements`, `appStore`, `exportMethod`, `macosMinimumSystemVersion`, `iosMinimumSystemVersion` (default `"15.0"`: Tauri's own 14.0 is refused by Xcode 27; a kept iOS tree follows it) — see [Signing and store builds](#signing-and-store-builds). |
|
|
193
194
|
| `signing.android` | `{ keystorePath?, keystorePasswordEnv?, keyPasswordEnv?, keyAlias? }` | unset | Env-var **names**, never secrets. `keyPasswordEnv` falls back to `keystorePasswordEnv`. |
|
|
194
195
|
| `signing.windows` | `{ certificateThumbprint? }` | unset | Windows signing certificate thumbprint. |
|
|
196
|
+
| `ios.infoPlist` | `Readonly<Record<string, PlistValue>>?` | unset | Keys merged into `Info.plist` through `Info.ios.plist`, nested dictionaries and arrays included. They beat a capability; `app.orientation` beats them. |
|
|
197
|
+
| `ios.privacyManifest` | `string?` | unset | Absolute path of the file the bundle carries as `PrivacyInfo.xcprivacy`. Unset, a manifest an earlier build left in the generated tree is removed. |
|
|
195
198
|
|
|
196
199
|
Per-plugin knobs, overridable via `createApp({ pluginConfigs })`:
|
|
197
200
|
|
|
@@ -266,6 +269,13 @@ What each piece does:
|
|
|
266
269
|
> [!NOTE]
|
|
267
270
|
> **Unsigned dev builds and iOS simulator builds need none of this.** `doctor`'s signing check is warn-only for exactly that reason — a missing credential never fails a build, and never flips `report.ok`.
|
|
268
271
|
|
|
272
|
+
What the generated project adds for a store:
|
|
273
|
+
|
|
274
|
+
- **A smaller library.** Every `Cargo.toml` carries a `[profile.release]` table (`codegen-units = 1`, `lto = true`, `opt-level = "s"`, `panic = "abort"`, `strip = true`), on every target and in both build profiles. It costs compile time.
|
|
275
|
+
- **No unused commands.** A store build sets `build.removeUnusedCommands: true` in `tauri.conf.json`. A debug build leaves it out.
|
|
276
|
+
- **An Android `versionCode`.** An android build with `app.buildNumber` writes it to `bundle.android.versionCode`, as a number.
|
|
277
|
+
- **`Info.plist` keys and a privacy manifest.** `ios.infoPlist` and `ios.privacyManifest`, see [Configuration](#configuration).
|
|
278
|
+
|
|
269
279
|
## Debug builds (Android)
|
|
270
280
|
|
|
271
281
|
```ts
|
|
@@ -330,6 +340,8 @@ The first iOS build also runs `tauri ios init` once, then rewrites the build pha
|
|
|
330
340
|
|
|
331
341
|
Android needs neither: Gradle manages its own `build` tree.
|
|
332
342
|
|
|
343
|
+
**A kept tree follows the config.** `tauri ios build` never runs xcodegen on a kept tree, so a change to `project.yml` alone reaches no build, and `MinimumOSVersion` would stay on the value of the first `tauri ios init`. Every `patchMobile` therefore writes `iosMinimumSystemVersion` into `deploymentTarget.iOS` in `project.yml` and every `IPHONEOS_DEPLOYMENT_TARGET` in `project.pbxproj`, and keeps `ios.privacyManifest` in both files, as `gen/apple/PrivacyInfo.xcprivacy` in the Resources phase. Unset, the manifest and its entries go again, down to the original bytes. A file without the line a patch needs is a `[native]` error, and a missing manifest source is refused before anything is written.
|
|
344
|
+
|
|
333
345
|
## When a build fails
|
|
334
346
|
|
|
335
347
|
A non-zero `@tauri-apps/cli` exit throws a `TauriError` carrying `kind`, `exitCode` and a scrubbed `stderrTail` (the last cause lines first, then the raw tail — `cli` prints it above the error line). In a terminal it is a branded box and each tail line is cut to the terminal's width minus the box chrome; with no terminal — CI, or `native build > build.log` — there is no box and nothing is cut, so a piped log keeps the full toolchain diagnostic on plain, unpadded lines. Classification runs over the *cause* lines of both streams only, most specific first, so one incidental `CodeSign` line in a 50k-line xcodebuild log cannot decide the taxonomy:
|
|
@@ -378,7 +390,7 @@ One **per-plugin event** is declared by `doctor` (hookable via a `depends: [doct
|
|
|
378
390
|
|
|
379
391
|
## Breaking changes in this release
|
|
380
392
|
|
|
381
|
-
The Android shell, the debug profile, `app.adaptiveIconInset` and the two new doctor checks are additive — nothing in the table below comes from them.
|
|
393
|
+
The Android shell, the debug profile, `app.adaptiveIconInset` and the two new doctor checks are additive — nothing in the table below comes from them. So are `ios`, `app.keepScreenOn` and the store-build changes, with one earlier stop: a non-numeric `app.buildNumber` on an android build is now refused at generate, where Tauri would have failed on it anyway. `Project.PlistValue` widens to the recursive `PlistValue`, which the package root exports too.
|
|
382
394
|
|
|
383
395
|
| What breaks | Migration |
|
|
384
396
|
|---|---|
|