codeplay-common 4.11.29 → 4.11.30

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 (45) hide show
  1. package/README.md +89 -89
  2. package/RELEASE_NOTES.md +13 -13
  3. package/files/buildCodeplay/HUAWEI-PRIVACY.md +9 -9
  4. package/files/buildCodeplay/add-splash-screen.js +1 -1
  5. package/files/buildCodeplay/codeplayBeforeBuild.js +4756 -4756
  6. package/files/buildCodeplay/disabled-ads.mjs +45 -45
  7. package/files/buildCodeplay/ensure-current-build.cjs +42 -42
  8. package/files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs +31 -31
  9. package/files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs +28 -28
  10. package/files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle +9 -9
  11. package/files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs +30 -30
  12. package/files/buildCodeplay/huawei-privacy-entry.js +135 -135
  13. package/files/buildCodeplay/huawei-privacy.cjs +92 -92
  14. package/files/buildCodeplay/huawei-privacy.css +22 -22
  15. package/files/buildCodeplay/iap-alias.cjs +116 -108
  16. package/files/buildCodeplay/ios-ad-consent.cjs +56 -56
  17. package/files/buildCodeplay/ios-emi-admob-modification.js +25 -25
  18. package/files/buildCodeplay/migrate-system-bars.cjs +115 -115
  19. package/files/buildCodeplay/newly added.txt +89 -89
  20. package/files/buildCodeplay/non-google-billing.pro +3 -3
  21. package/files/buildCodeplay/release-sync.config.json +4 -4
  22. package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
  23. package/files/buildCodeplay/ruads.cjs +211 -211
  24. package/files/buildCodeplay/saf-mediastore-dependency.cjs +21 -21
  25. package/files/buildCodeplay/setSplashAnimation.js +2 -2
  26. package/files/buildCodeplay/setup-ruads.cjs +55 -55
  27. package/files/buildCodeplay/splash-setup.cjs +88 -88
  28. package/files/buildCodeplay/store-billing.cjs +43 -43
  29. package/files/buildCodeplay/tests/huawei-privacy.test.cjs +49 -49
  30. package/files/buildCodeplay/tests/huawei-vite.test.cjs +35 -35
  31. package/files/scripts-common/generate-baseline-profile.js +46 -46
  32. package/files/take-screen-image.js +4414 -4414
  33. package/package.json +28 -28
  34. package/runtime/splash-ready.mjs +52 -52
  35. package/runtime/vk-ads/vk-ad-configuration.json +39 -39
  36. package/scripts/ensure-current-build.test.cjs +76 -76
  37. package/scripts/iap-alias.test.cjs +117 -78
  38. package/scripts/ios-ad-consent.test.cjs +99 -99
  39. package/scripts/ruads-install.test.cjs +180 -180
  40. package/scripts/ruads-policy.test.cjs +174 -174
  41. package/scripts/saf-mediastore-dependency.test.cjs +44 -44
  42. package/scripts/splash-setup.test.cjs +142 -142
  43. package/scripts/sync-files.js +1 -1
  44. package/scripts/system-bars.test.cjs +77 -77
  45. package/scripts/vite-build-settings.test.cjs +92 -92
package/README.md CHANGED
@@ -1,92 +1,92 @@
1
- # codeplay-common
2
-
3
- When `cordova-plugin-saf-mediastore` is installed, setup, before-build and Capacitor
4
- sync/update hooks add its missing AndroidX DocumentFile dependency to plugin metadata.
5
- Existing dependency versions are preserved. After upgrading from an affected version,
6
- run `npx cap sync android` once to regenerate the native dependencies.
7
-
8
- ## VK / RuStore builds (4.11.23)
9
-
10
- Before-build 7.8 preserves the original Vite build settings when adding tree-shaking
11
- inside the generated store wrapper. It also repairs the exact treeshake-only build
12
- override created by the earlier migration; custom wrapper build settings are retained.
13
-
14
- IAP imports use `@iap/<module>.js`. Installation configures the Vite alias; before-build
15
- automatically migrates versioned IAP import paths without confirmation, after module
16
- downloads and generators. Static/dynamic imports, re-exports and require calls are
17
- covered. Comments, plain strings and Framework7 templates are preserved. Vite selects
18
- the newest installed IAP folder containing IAP-state.js for all callers, so the existing
19
- VK controller can use IAP 4.8 without a hardcoded 4.9 dependency. Missing imported
20
- modules stop migration before source changes. No new IAP package is created or downloaded
21
- by this alias helper; the existing server updater still owns version updates.
22
- Protected AdMob controllers are excluded from source migration. A Vite resolver
23
- maps their existing versioned IAP imports to the same installed folder without
24
- editing or increasing the AdMob version. Existing local AdMob versions are retained.
25
-
26
- Publish `capacitor-codeplay-rustore-ads` **0.1.1 first**, then this package **4.11.23**.
27
- The new build preparation upgrades the old VK 0.1.0 banner implementation when
28
- selected, installs only the selected ad provider, removes Google Billing for
29
- Android stores 4/10, adds store 10 commands, and configures Vite's store ID and
30
- provider alias for build and live reload. RuStore release sync sends the store
31
- name for lookup by the updated Codeplay server. Amazon messages are store-scoped.
32
-
33
- Each consuming app must use Capacitor 8, the shared `@admob` interface and a
34
- current `Ads/IAP-x.x/IAP-state.js` integration. Older direct AdMob imports or IAP
35
- integrations require updating first; this is not a universal migration of old apps.
36
- Opt in through the app's `capacitor.config.json`:
37
-
38
- ```json
39
- "RuAds": {
40
- "VK_ADS_ENABLED": true,
41
- "STORE_IDS": [4, 10]
42
- }
43
- ```
44
-
45
- Place this section under `plugins`. Copy the first versioned controller folder
46
- manually to `src/js/Ads/vk-ads-<version>/vk-ads.js`. This package never creates or
47
- ships a VK controller. Selecting VK without a complete controller reports an error.
48
- The resolver selects the highest complete installed numeric folder version.
49
- Installing/updating this package or running before-build creates only a missing
50
- `src/js/Ads/vk-ad-configuration.json`. Existing configuration is preserved.
51
- Fill the app's own HuaweiStore/RuStore publisher IDs; shipped defaults are zero.
52
- Set `config.isTesting=true` for official demo slots. Finalrelease warns and saves
53
- it as false before a VK release. Configuration stays outside the versioned folder
54
- so controller updates preserve each app's IDs.
55
-
56
- The existing folder updater handles subsequent VK versions. Add this key to the
57
- server's `https://htmlcodeplay.com/code-play-plugin/versions.json`:
58
-
59
- ```json
60
- "vk-ads": "1.0"
61
- ```
62
-
63
- Upload `vk-ads-1.0.zip` beside that manifest, with `vk-ads.js` directly at the ZIP
64
- root, following the existing folder-plugin ZIP format. For the next release,
65
- upload the new ZIP and raise only the server entry, for example to `"1.1"`.
66
- Before-build downloads higher advertised versions for existing VK installations,
67
- updates references using the shared updater, and preserves the app configuration.
68
- No codeplay-common path/version change is needed. Server deployment is manual.
69
-
70
- Missing RuAds settings preserve AdMob selection. iOS store 6 keeps AdMob; the VK
71
- plugin has a separate iOS API but this app adapter enables VK only on Android.
72
- App-open/native/PiP formats remain disabled for VK. Native package changes need
73
- a rebuilt install; changing live-reload JavaScript alone cannot replace plugins.
74
- Explicitly disabled providers use an SDK-free controller, preserve task continuations
75
- and never grant ad rewards. They do not require the VK adapter or IAP imports.
76
-
77
- Release credentials are not distributed. Existing consumer release-sync config
78
- is preserved; new consumers should set `CODEPLAY_RELEASE_SYNC_TOKEN` securely.
79
- Do not copy publisher IDs or credentials from another app. VK creates app/slot
80
- names using `<uniqueid>. <app name>`. Real ad serving requires separate publisher
81
- setup and is not guaranteed by successful SDK integration or demo ads.
82
-
83
- ## Android system bars (4.11.22)
84
-
85
- Installation and before-build migrate installed `capacitor-codeplay-system-bars` 1.0.1 to avoid calling `Window.setNavigationBarColor` on Android 15+. Existing inset protection views, keyboard handling, icon appearance and older Android compatibility remain intact. Missing plugins are skipped; unexpected native source requires review. Before-build removes `@capacitor/status-bar` only when parsed app sources confirm modern `SystemBars` usage without legacy references. Apps with active legacy calls or unparseable source retain the dependency and report why. The existing app parser is reused; no dependency is added. Run normal Capacitor sync after dependency cleanup. Native changes require a rebuilt install; older Android compatibility code can still trigger Play static warnings.
86
-
87
- Dependency cleanup also runs `npx --no-install cap update android` when an Android platform exists and removes the standard stale iOS Podfile declaration. It does not build or install an APK. Run normal iOS sync on the supported build system before the next iOS build.
88
-
89
- This source update is not an npm publication. Existing apps receive future releases through their normal package update process.
1
+ # codeplay-common
2
+
3
+ When `cordova-plugin-saf-mediastore` is installed, setup, before-build and Capacitor
4
+ sync/update hooks add its missing AndroidX DocumentFile dependency to plugin metadata.
5
+ Existing dependency versions are preserved. After upgrading from an affected version,
6
+ run `npx cap sync android` once to regenerate the native dependencies.
7
+
8
+ ## VK / RuStore builds (4.11.23)
9
+
10
+ Before-build 7.8 preserves the original Vite build settings when adding tree-shaking
11
+ inside the generated store wrapper. It also repairs the exact treeshake-only build
12
+ override created by the earlier migration; custom wrapper build settings are retained.
13
+
14
+ IAP imports use `@iap/<module>.js`. Installation configures the Vite alias; before-build
15
+ automatically migrates versioned IAP import paths without confirmation, after module
16
+ downloads and generators. Static/dynamic imports, re-exports and require calls are
17
+ covered. Comments, plain strings and Framework7 templates are preserved. Vite selects
18
+ the newest installed IAP folder containing IAP-state.js for all callers, so the existing
19
+ VK controller can use IAP 4.8 without a hardcoded 4.9 dependency. Missing imported
20
+ modules stop migration before source changes. No new IAP package is created or downloaded
21
+ by this alias helper; the existing server updater still owns version updates.
22
+ Protected AdMob controllers are excluded from source migration. A Vite resolver
23
+ maps their existing versioned IAP imports to the same installed folder without
24
+ editing or increasing the AdMob version. Existing local AdMob versions are retained.
25
+
26
+ Publish `capacitor-codeplay-rustore-ads` **0.1.1 first**, then this package **4.11.23**.
27
+ The new build preparation upgrades the old VK 0.1.0 banner implementation when
28
+ selected, installs only the selected ad provider, removes Google Billing for
29
+ Android stores 4/10, adds store 10 commands, and configures Vite's store ID and
30
+ provider alias for build and live reload. RuStore release sync sends the store
31
+ name for lookup by the updated Codeplay server. Amazon messages are store-scoped.
32
+
33
+ Each consuming app must use Capacitor 8, the shared `@admob` interface and a
34
+ current `Ads/IAP-x.x/IAP-state.js` integration. Older direct AdMob imports or IAP
35
+ integrations require updating first; this is not a universal migration of old apps.
36
+ Opt in through the app's `capacitor.config.json`:
37
+
38
+ ```json
39
+ "RuAds": {
40
+ "VK_ADS_ENABLED": true,
41
+ "STORE_IDS": [4, 10]
42
+ }
43
+ ```
44
+
45
+ Place this section under `plugins`. Copy the first versioned controller folder
46
+ manually to `src/js/Ads/vk-ads-<version>/vk-ads.js`. This package never creates or
47
+ ships a VK controller. Selecting VK without a complete controller reports an error.
48
+ The resolver selects the highest complete installed numeric folder version.
49
+ Installing/updating this package or running before-build creates only a missing
50
+ `src/js/Ads/vk-ad-configuration.json`. Existing configuration is preserved.
51
+ Fill the app's own HuaweiStore/RuStore publisher IDs; shipped defaults are zero.
52
+ Set `config.isTesting=true` for official demo slots. Finalrelease warns and saves
53
+ it as false before a VK release. Configuration stays outside the versioned folder
54
+ so controller updates preserve each app's IDs.
55
+
56
+ The existing folder updater handles subsequent VK versions. Add this key to the
57
+ server's `https://htmlcodeplay.com/code-play-plugin/versions.json`:
58
+
59
+ ```json
60
+ "vk-ads": "1.0"
61
+ ```
62
+
63
+ Upload `vk-ads-1.0.zip` beside that manifest, with `vk-ads.js` directly at the ZIP
64
+ root, following the existing folder-plugin ZIP format. For the next release,
65
+ upload the new ZIP and raise only the server entry, for example to `"1.1"`.
66
+ Before-build downloads higher advertised versions for existing VK installations,
67
+ updates references using the shared updater, and preserves the app configuration.
68
+ No codeplay-common path/version change is needed. Server deployment is manual.
69
+
70
+ Missing RuAds settings preserve AdMob selection. iOS store 6 keeps AdMob; the VK
71
+ plugin has a separate iOS API but this app adapter enables VK only on Android.
72
+ App-open/native/PiP formats remain disabled for VK. Native package changes need
73
+ a rebuilt install; changing live-reload JavaScript alone cannot replace plugins.
74
+ Explicitly disabled providers use an SDK-free controller, preserve task continuations
75
+ and never grant ad rewards. They do not require the VK adapter or IAP imports.
76
+
77
+ Release credentials are not distributed. Existing consumer release-sync config
78
+ is preserved; new consumers should set `CODEPLAY_RELEASE_SYNC_TOKEN` securely.
79
+ Do not copy publisher IDs or credentials from another app. VK creates app/slot
80
+ names using `<uniqueid>. <app name>`. Real ad serving requires separate publisher
81
+ setup and is not guaranteed by successful SDK integration or demo ads.
82
+
83
+ ## Android system bars (4.11.22)
84
+
85
+ Installation and before-build migrate installed `capacitor-codeplay-system-bars` 1.0.1 to avoid calling `Window.setNavigationBarColor` on Android 15+. Existing inset protection views, keyboard handling, icon appearance and older Android compatibility remain intact. Missing plugins are skipped; unexpected native source requires review. Before-build removes `@capacitor/status-bar` only when parsed app sources confirm modern `SystemBars` usage without legacy references. Apps with active legacy calls or unparseable source retain the dependency and report why. The existing app parser is reused; no dependency is added. Run normal Capacitor sync after dependency cleanup. Native changes require a rebuilt install; older Android compatibility code can still trigger Play static warnings.
86
+
87
+ Dependency cleanup also runs `npx --no-install cap update android` when an Android platform exists and removes the standard stale iOS Podfile declaration. It does not build or install an APK. Run normal iOS sync on the supported build system before the next iOS build.
88
+
89
+ This source update is not an npm publication. Existing apps receive future releases through their normal package update process.
90
90
 
91
91
  ## Optional IAP configuration (4.11.21)
92
92
 
package/RELEASE_NOTES.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # Release notes
2
-
3
- ## 4.11.13 — 2026-11-04
4
-
5
- Version name:4.11.13. Version code/build number:not applicable to this npm package.
6
-
7
- Files changed: `package.json`, `runtime/splash-ready.mjs`, `files/buildCodeplay/splash-setup.cjs`, `files/buildCodeplay/setSplashAnimation.js`, `files/buildCodeplay/add-splash-screen.js`, `files/buildCodeplay/splashxml/codeplay_splashScreen.xml`, `files/buildCodeplay/codeplayBeforeBuild.js`, `scripts/sync-files.js`, `scripts/splash-setup.test.cjs`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
8
-
9
- - Use a DayNight post-splash theme and migrate only the known legacy default in existing app templates; preserve custom themes.
10
- - Configure native exit animation duration,including0ms,without editing generated MainActivity;default remains1000ms.
11
- - Share the existing Framework7 page/image readiness flow with timeout,error handling and listener cleanup.
12
- - Migrate the known existing readiness handler;offer explicit opt-in for supported legacy timer handlers,with native fallback/plugin checks. Preserve unsupported custom startup code.
13
- - Run splash preparation during installation,before-build and splash setup;rebuild consuming apps to apply native changes.
14
-
2
+
3
+ ## 4.11.13 — 2026-11-04
4
+
5
+ Version name:4.11.13. Version code/build number:not applicable to this npm package.
6
+
7
+ Files changed: `package.json`, `runtime/splash-ready.mjs`, `files/buildCodeplay/splash-setup.cjs`, `files/buildCodeplay/setSplashAnimation.js`, `files/buildCodeplay/add-splash-screen.js`, `files/buildCodeplay/splashxml/codeplay_splashScreen.xml`, `files/buildCodeplay/codeplayBeforeBuild.js`, `scripts/sync-files.js`, `scripts/splash-setup.test.cjs`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
8
+
9
+ - Use a DayNight post-splash theme and migrate only the known legacy default in existing app templates; preserve custom themes.
10
+ - Configure native exit animation duration,including0ms,without editing generated MainActivity;default remains1000ms.
11
+ - Share the existing Framework7 page/image readiness flow with timeout,error handling and listener cleanup.
12
+ - Migrate the known existing readiness handler;offer explicit opt-in for supported legacy timer handlers,with native fallback/plugin checks. Preserve unsupported custom startup code.
13
+ - Run splash preparation during installation,before-build and splash setup;rebuild consuming apps to apply native changes.
14
+
15
15
 
16
16
  ## Unreleased
17
17
 
@@ -1,9 +1,9 @@
1
- # Huawei Mainland privacy setup
2
-
3
- The shared before-build script activates `huawei-privacy-entry.js` for Android store ID 4. It uses `android.APP_UNIQUE_ID` from `capacitor.config.json` to link to `https://htmlcodeplay.com/privacy/ch/{id}`. The app entry waits for first-launch consent before importing the normal app bundle. The native manifest defaults Firebase Analytics collection to false. Other store builds restore the original app entry and any existing Analytics manifest value.
4
-
5
- Publish this `codeplay-common` version, then update it in each app to copy the shared `buildCodeplay` files before running the normal Huawei build command. An older before-build process can download the new package while continuing its own old code, so run the build again after the package update and inspect the generated assets. Editing an app's `AGENTS.md` alone does not change a compiled build. This package does not deploy the privacy site or submit a release.
6
-
7
- Before submitting each app, publish and review its own Simplified Chinese policy in the website's `data/privacy/ch/{id}.json`. Check that the policy matches the exact Huawei APK/AAB, including ads, analytics, permissions, server requests, accounts, and payment behavior. The website returns 503 if a Chinese profile is missing; do not submit that app until its page works publicly.
8
-
9
- The shared hook expects one module script in `src/index.html`. It fails the Huawei build on unsupported layouts instead of silently bypassing consent. For apps with native services that collect information before the web app starts, audit and gate those services separately. The Analytics manifest setting is only one native collection control.
1
+ # Huawei Mainland privacy setup
2
+
3
+ The shared before-build script activates `huawei-privacy-entry.js` for Android store ID 4. It uses `android.APP_UNIQUE_ID` from `capacitor.config.json` to link to `https://htmlcodeplay.com/privacy/ch/{id}`. The app entry waits for first-launch consent before importing the normal app bundle. The native manifest defaults Firebase Analytics collection to false. Other store builds restore the original app entry and any existing Analytics manifest value.
4
+
5
+ Publish this `codeplay-common` version, then update it in each app to copy the shared `buildCodeplay` files before running the normal Huawei build command. An older before-build process can download the new package while continuing its own old code, so run the build again after the package update and inspect the generated assets. Editing an app's `AGENTS.md` alone does not change a compiled build. This package does not deploy the privacy site or submit a release.
6
+
7
+ Before submitting each app, publish and review its own Simplified Chinese policy in the website's `data/privacy/ch/{id}.json`. Check that the policy matches the exact Huawei APK/AAB, including ads, analytics, permissions, server requests, accounts, and payment behavior. The website returns 503 if a Chinese profile is missing; do not submit that app until its page works publicly.
8
+
9
+ The shared hook expects one module script in `src/index.html`. It fails the Huawei build on unsupported layouts instead of silently bypassing consent. For apps with native services that collect information before the web app starts, audit and gate those services separately. The Analytics manifest setting is only one native collection control.
@@ -23,7 +23,7 @@ const destinationSplashIcon = path.join(
23
23
 
24
24
 
25
25
  const appSplashXML = path.join(projectFolder, "buildCodeplay", "splashxml", "codeplay_splashScreen.xml");
26
- require('./splash-setup.cjs').syncSplashSetup(projectFolder);
26
+ require('./splash-setup.cjs').syncSplashSetup(projectFolder);
27
27
  const sourceSplashXML = fs.existsSync(appSplashXML) ? appSplashXML : path.join(__dirname, "splashxml", "codeplay_splashScreen.xml");
28
28
  const destinationSplashXML = path.join(
29
29
  projectFolder,