@rdlabo/ionic-angular-kit 0.0.25 → 0.0.26

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.
Files changed (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -604,6 +604,53 @@ Surface:
604
604
 
605
605
  ---
606
606
 
607
+ ### Live Update (`@rdlabo/ionic-angular-kit/live-update`)
608
+
609
+ A secondary entry point (so only apps that use it pull in `@capawesome/capacitor-live-update`, declared as an optional peer) for shipping [Capawesome Live Updates](https://capawesome.io/plugins/live-update/) — over-the-air replacement of the Web (Angular/Ionic) layer without a store review.
610
+
611
+ #### `provideLiveUpdateReadiness()`
612
+
613
+ Marks the running Live Update bundle **healthy** once the app has actually rendered, so Capawesome does not auto-roll-back a good bundle. It waits for Angular to become stable **and** the first route to finish (`NavigationEnd` + one animation frame) before calling `LiveUpdate.ready()`. This replaces a fixed `readyTimeout` in `capacitor.config.ts` with a signal tied to real readiness. **Native only** — a no-op on web.
614
+
615
+ ```typescript
616
+ // app.config.ts
617
+ import { provideLiveUpdateReadiness } from '@rdlabo/ionic-angular-kit/live-update';
618
+
619
+ export const appConfig: ApplicationConfig = {
620
+ providers: [
621
+ provideZonelessChangeDetection(),
622
+ provideLiveUpdateReadiness(),
623
+ // ...
624
+ ],
625
+ };
626
+ ```
627
+
628
+ #### Release & channel model — 同じチャンネルのまま / チャンネルが変わる
629
+
630
+ 配信は各アプリの `.github/workflows/live-update.yml` が `vX.Y.Z` / `vX.Y.Z-N` タグ push で発火し、共有 composite action([`ionic-angular-library/.github/actions`](https://github.com/rdlabo-team/ionic-angular-library/tree/main/.github/actions) の `validate-live-update` / `publish-live-update`)でバリデーション → バンドル署名 → アップロードまで自動実行します。
631
+
632
+ 配信チャンネルは常に **`production-<ネイティブビルド番号>`**(Android `versionCode` = iOS `CURRENT_PROJECT_VERSION`、両者は一致必須)です。Live Update は「同じネイティブバイナリの上で JS/HTML/CSS だけを差し替える」仕組みなので、互換な端末にしか配信されないよう **ビルド番号ごとにチャンネルを分離** します(アップロード時に `--android-min/max` `--ios-min/max` をビルド番号へ固定)。
633
+
634
+ - **同じチャンネルのまま = Live Update で配信できる**
635
+ ネイティブビルド番号を **変えない** リリース。JS/HTML/CSS のみの変更(バグ修正・文言・UI・ロジック、ネイティブに影響しない npm 依存)。同じ `major.minor` で patch を上げるだけならチャンネルは据え置きで、既存ユーザーはストア更新なしで最新化されます。
636
+ 例)`9.0.0`(build `9000000`)→ Web だけ直して `9.0.1` → どちらも `production-9000000`。
637
+
638
+ - **チャンネルが変わる = ストアリリースが必要**
639
+ ネイティブビルド番号を **上げる** リリース。次のいずれかを含む場合:`app/android/**`・`app/ios/**`・`capacitor.config.ts`(または `.json`)の変更、または `@capacitor/*` / `@capawesome/capacitor-live-update` の **バージョン変更**。
640
+ 例)ネイティブ更新で `9.1.0`(build `9100000`)→ 新チャンネル `production-9100000`。古い `9.0.x` 端末は `production-9000000` のまま影響を受けません。
641
+
642
+ ビルド番号は `major`・`minor` を先頭にエンコードします:`floor(ビルド番号 / 10000) === major * 100 + minor`。
643
+
644
+ | バージョン | ビルド番号 | チャンネル |
645
+ | ---------- | ---------- | --------------------- |
646
+ | `9.0.x` | `9000000` | `production-9000000` |
647
+ | `9.1.x` | `9100000` | `production-9100000` |
648
+ | `10.2.x` | `10020000` | `production-10020000` |
649
+
650
+ `validate-live-update` は、直前の互換タグからネイティブ/設定/プラグイン依存が変わっているのに **ビルド番号を上げていない**(=ストア更新が必要なのに Live Update で流そうとしている)ケースを CI で失敗させ、事故を防ぎます。
651
+
652
+ ---
653
+
607
654
  ## Consumer Vitest setup notes
608
655
 
609
656
  When testing a consumer app that declares `@rdlabo/ionic-angular-kit` as a `file:` symlink dependency, add the following to your `vitest.config.ts`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdlabo/ionic-angular-kit",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",