codeplay-common 4.11.34 → 4.11.37

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 (47) hide show
  1. package/CHANGELOG.md +115 -115
  2. package/LICENSE +21 -21
  3. package/README.md +6 -0
  4. package/RELEASE_NOTES.md +110 -110
  5. package/files/buildCodeplay/HUAWEI-PRIVACY.md +9 -9
  6. package/files/buildCodeplay/add-splash-screen.js +256 -256
  7. package/files/buildCodeplay/apk-store-builder.js +97 -97
  8. package/files/buildCodeplay/fix-onesignal-plugin.js +96 -96
  9. package/files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs +31 -31
  10. package/files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs +28 -28
  11. package/files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle +9 -9
  12. package/files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs +30 -30
  13. package/files/buildCodeplay/huawei-privacy.cjs +102 -92
  14. package/files/buildCodeplay/iap-alias.cjs +116 -108
  15. package/files/buildCodeplay/ios-emi-admob-modification.js +24 -24
  16. package/files/buildCodeplay/manifestModification.js +38 -38
  17. package/files/buildCodeplay/migrate-system-bars.cjs +122 -122
  18. package/files/buildCodeplay/packageidBaseModification.js +528 -528
  19. package/files/buildCodeplay/project-scripts.cjs +69 -69
  20. package/files/buildCodeplay/ruads.cjs +10 -1
  21. package/files/buildCodeplay/setSplashAnimation.js +228 -228
  22. package/files/buildCodeplay/setup-ruads.cjs +9 -2
  23. package/files/buildCodeplay/splash-setup.cjs +88 -88
  24. package/files/buildCodeplay/splashxml/codeplay_splashScreen.xml +11 -11
  25. package/files/buildCodeplay/sync-admob-nextgen.js +219 -219
  26. package/files/buildCodeplay/tests/huawei-live-reload.test.cjs +60 -0
  27. package/files/buildCodeplay/tests/huawei-multiple-entries.test.cjs +80 -0
  28. package/files/buildCodeplay/tests/huawei-vite.test.cjs +38 -35
  29. package/files/buildCodeplay/versions.json +28 -28
  30. package/files/finalrelease +1365 -1365
  31. package/files/generate-ai-promo-video.js +23 -23
  32. package/files/ionic.config.json +6 -6
  33. package/files/scripts-common/run-codeplay-sync-after.js +21 -21
  34. package/files/scripts-common/screenshot/background-decorations.js +120 -120
  35. package/files/scripts-common/screenshot/frame-samples.js +117 -117
  36. package/files/scripts-common/setup-baseline-profile.js +291 -291
  37. package/files/take-screen-video.js +644 -644
  38. package/package.json +1 -1
  39. package/runtime/splash-ready.mjs +52 -52
  40. package/scripts/iap-alias.test.cjs +117 -78
  41. package/scripts/ruads-install.test.cjs +20 -3
  42. package/scripts/splash-setup.test.cjs +142 -142
  43. package/scripts/sync-files.js +119 -119
  44. package/scripts/system-bars-package.test.cjs +37 -37
  45. package/scripts/system-bars.test.cjs +93 -93
  46. package/scripts/uninstall.js +2 -2
  47. package/scripts/vite-build-settings.test.cjs +1 -0
package/CHANGELOG.md CHANGED
@@ -1,115 +1,115 @@
1
- # Changelog
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
-
16
- ## Unreleased
17
-
18
- - Add a Huawei-only first-launch Simplified Chinese privacy consent gate from shared `buildCodeplay` files. Keep Firebase Analytics off by default in Huawei native builds, restore non-Huawei entries on the next build, and provide a Settings link and withdrawal control. Each app still needs its own published Chinese policy profile before submission.
19
- - Add optional camera, autofocus and flash feature declarations after package-specific manifest updates. Warn about Amazon device exclusions for existing required camera features (including manual declarations); Enter or a 5-second timeout changes them to optional, while n/N preserves them. Avoid duplicate features on repeated builds and run package-ID preparation in every Android store build command.
20
- - Invalidate the cached source-file inventory after removing replaced plugin folders or versioned files, so post-update validation scans the installed sources instead of deleted theme paths.
21
- - Automatically migrate versioned save-file imports to `@saveGallery`, scan the script section of Framework7 pages, and add or refresh the Vite alias for the newest installed platform helper before and after plugin updates.
22
- - Check installed package versions before conditional plugin installation; a missing optional Firebase web SDK no longer reinstalls native Analytics. Preserve disabled-feature removal and required Samsung IAP upgrades.
23
- - Propagate loading errors from installed build helpers instead of attempting to reinstall them.
24
- - Preserve configured LocalNotifications small/large drawables and the default OneSignal drawable when present in Android resources; regenerate the shrinker keep rules on every before-build run, including after platform recreation.
25
- - Detect version-suffixed files in the app's `buildCodeplay` folder at build startup, then run `npm uninstall codeplay-common` and `npm install codeplay-common` sequentially before resuming with the refreshed before-build script.
26
- - Stop on reinstall failure or incomplete legacy cleanup rather than continuing with stale build templates.
27
-
28
- ## 4.11.4 — 2026-10-27
29
-
30
- Version name: 4.11.4. Version code/build number: not applicable to this npm package.
31
-
32
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle`, `files/buildCodeplay/codeplayBeforeBuild.js`, `files/buildCodeplay/manifestModification.js`, `files/buildCodeplay/project-scripts.cjs`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
33
-
34
- - Preserve Capacitor permission annotations in every consuming Android app, without an app ID or permission-use restriction.
35
- - Restore the scoped ProGuard rules during installation, Android sync and every Gradle build through a regenerated apply-from hook; keep existing custom rules and avoid duplicates.
36
- - Ship the helper inside `buildCodeplay` so shared templates do not depend on an app-specific `Scripts` file.
37
- - Provide `npm run android:r8-rules` and migrate the known previous helper command while preserving custom commands.
38
- - Keep permission declarations, prompts, minification settings and iOS configuration unchanged; already-distributed binaries require rebuilding.
39
- - Preserve explicit release minification settings when distributing shared templates, and retain the tested FFmpeg JNI rules when that plugin is installed.
40
-
41
- ## 4.10.5 — 2026-10-23
42
-
43
- Version name: 4.10.5. Version code/build number: not applicable to this npm package.
44
-
45
- Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
46
-
47
- - Migrate known legacy filename lookups in an existing app configurator after installing shared scripts.
48
- - Prefer unversioned pre-build and package-ID helpers while retaining the versioned fallback.
49
- - Correct the known old sync-hook folder assignment without replacing app-specific configuration or adding a configurator to apps that do not have one.
50
-
51
- ## 4.10.4 — 2026-10-23
52
-
53
- Version name: 4.10.4. Version code/build number: not applicable to this npm package.
54
-
55
- Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
56
-
57
- - Ship an updated sync-after hook for apps retaining the custom hook command after script migration.
58
- - Run unversioned splash helpers instead of searching for removed versioned filenames.
59
- - Resolve baseline profile setup from `scripts-common/` and preserve the existing native splash when no splash icon is configured.
60
-
61
- ## 4.10.3 — 2026-10-23
62
-
63
- Version name: 4.10.3. Version code/build number: not applicable to this npm package.
64
-
65
- Files changed: `package.json`, `files/finalrelease`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
66
-
67
- - Allow ad-free apps with `plugins.AdMob.ADMOB_ENABLED: false` to pass release validation without an AdMob alias or controller.
68
- - Continue requiring a production AdMob alias when advertising is enabled or the enabled flag is unspecified.
69
- - Preserve rejection of test aliases, commented or duplicate aliases, and missing production controllers for apps with ads enabled.
70
-
71
- ## 4.10.0 — 2026-10-23
72
-
73
- Version name: 4.10.0. Version code/build number: not applicable to this npm package.
74
- Bundled pre-build script: 6.7.
75
-
76
- Files changed: `package.json`, `files/buildCodeplay/project-scripts.cjs`, `scripts/sync-files.js`, `scripts/uninstall.js`, `files/finalrelease`, `files/buildCodeplay/`, `files/scripts-common/`, `files/take-screen-image.js`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
77
-
78
- - Copy shared build scripts and the versions manifest into each app; run local scripts with unversioned filenames.
79
- - Rename app helper scripts to scripts-common automatically, migrate command paths, and preserve existing files without overwriting folder conflicts.
80
- - Migrate app build/store/sync paths automatically and remove only superseded versioned helpers; preserve app-owned configuration and screenshot data.
81
- - Resolve app sources/native targets from the consuming app directory while keeping bundled assets inside the plugin.
82
- - Download IAP and AdMob directly from htmlcodeplay.com, without bundling archives or adding a separate fallback.
83
- - Automatically migrate deferred ownership verification, purchase-safe advertising, and Home Pro visibility according to each store IAP flag.
84
- - Copy the full finalrelease implementation so it can be tested from the application folder.
85
- - Preserve working files during preinstall and avoid downgrading local/newer plugin installations to an older registry release.
86
-
87
- ## 4.9.8 — 2026-10-22
88
-
89
- Version name: 4.9.8. Version code/build number: not applicable to this npm package.
90
- Bundled pre-build script: 6.5.
91
-
92
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.5.js`, `files/buildCodeplay/sync-admob-nextgen.js`, `files/buildCodeplay/versions.json`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
93
-
94
- - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
95
- - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
96
- - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
97
- - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
98
- - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
99
- - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
100
-
101
- ## 4.7.7 — 2026-10-07
102
-
103
- Version name: 4.7.7. Version code/build number: not applicable to this npm package.
104
- Bundled pre-build script: 6.4.
105
-
106
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.4.js`
107
- (replaces `codeplayBeforeBuild-6.3.js`), `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
108
-
109
- - Keep `npm run build` as the Android default on every host; add `npm run build:ios` automatically during installation.
110
- - Route `build-capacitor-android` through the same pre-build validation before copying the web build.
111
- - Migrate direct save-gallery imports to `@saveGallery` and select the matching platform helper in Vite after one detailed Enter/y confirmation.
112
- - Stop without import writes on cancellation, missing helpers, mixed versions, unsupported query/hash aliases or concurrent source edits.
113
- - Reuse source directory traversal and combine gallery, retired OneSignal import, StatusBar and editor checks in one content pass.
114
- - Automatically remove an installed/declared `onesignal-cordova-plugin` with a warning; skip legacy OneSignal patching/helper downloads and stop on remaining package imports.
115
- - Keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries without adding them in future projects.
1
+ # Changelog
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
+
16
+ ## Unreleased
17
+
18
+ - Add a Huawei-only first-launch Simplified Chinese privacy consent gate from shared `buildCodeplay` files. Keep Firebase Analytics off by default in Huawei native builds, restore non-Huawei entries on the next build, and provide a Settings link and withdrawal control. Each app still needs its own published Chinese policy profile before submission.
19
+ - Add optional camera, autofocus and flash feature declarations after package-specific manifest updates. Warn about Amazon device exclusions for existing required camera features (including manual declarations); Enter or a 5-second timeout changes them to optional, while n/N preserves them. Avoid duplicate features on repeated builds and run package-ID preparation in every Android store build command.
20
+ - Invalidate the cached source-file inventory after removing replaced plugin folders or versioned files, so post-update validation scans the installed sources instead of deleted theme paths.
21
+ - Automatically migrate versioned save-file imports to `@saveGallery`, scan the script section of Framework7 pages, and add or refresh the Vite alias for the newest installed platform helper before and after plugin updates.
22
+ - Check installed package versions before conditional plugin installation; a missing optional Firebase web SDK no longer reinstalls native Analytics. Preserve disabled-feature removal and required Samsung IAP upgrades.
23
+ - Propagate loading errors from installed build helpers instead of attempting to reinstall them.
24
+ - Preserve configured LocalNotifications small/large drawables and the default OneSignal drawable when present in Android resources; regenerate the shrinker keep rules on every before-build run, including after platform recreation.
25
+ - Detect version-suffixed files in the app's `buildCodeplay` folder at build startup, then run `npm uninstall codeplay-common` and `npm install codeplay-common` sequentially before resuming with the refreshed before-build script.
26
+ - Stop on reinstall failure or incomplete legacy cleanup rather than continuing with stale build templates.
27
+
28
+ ## 4.11.4 — 2026-10-27
29
+
30
+ Version name: 4.11.4. Version code/build number: not applicable to this npm package.
31
+
32
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle`, `files/buildCodeplay/codeplayBeforeBuild.js`, `files/buildCodeplay/manifestModification.js`, `files/buildCodeplay/project-scripts.cjs`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
33
+
34
+ - Preserve Capacitor permission annotations in every consuming Android app, without an app ID or permission-use restriction.
35
+ - Restore the scoped ProGuard rules during installation, Android sync and every Gradle build through a regenerated apply-from hook; keep existing custom rules and avoid duplicates.
36
+ - Ship the helper inside `buildCodeplay` so shared templates do not depend on an app-specific `Scripts` file.
37
+ - Provide `npm run android:r8-rules` and migrate the known previous helper command while preserving custom commands.
38
+ - Keep permission declarations, prompts, minification settings and iOS configuration unchanged; already-distributed binaries require rebuilding.
39
+ - Preserve explicit release minification settings when distributing shared templates, and retain the tested FFmpeg JNI rules when that plugin is installed.
40
+
41
+ ## 4.10.5 — 2026-10-23
42
+
43
+ Version name: 4.10.5. Version code/build number: not applicable to this npm package.
44
+
45
+ Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
46
+
47
+ - Migrate known legacy filename lookups in an existing app configurator after installing shared scripts.
48
+ - Prefer unversioned pre-build and package-ID helpers while retaining the versioned fallback.
49
+ - Correct the known old sync-hook folder assignment without replacing app-specific configuration or adding a configurator to apps that do not have one.
50
+
51
+ ## 4.10.4 — 2026-10-23
52
+
53
+ Version name: 4.10.4. Version code/build number: not applicable to this npm package.
54
+
55
+ Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
56
+
57
+ - Ship an updated sync-after hook for apps retaining the custom hook command after script migration.
58
+ - Run unversioned splash helpers instead of searching for removed versioned filenames.
59
+ - Resolve baseline profile setup from `scripts-common/` and preserve the existing native splash when no splash icon is configured.
60
+
61
+ ## 4.10.3 — 2026-10-23
62
+
63
+ Version name: 4.10.3. Version code/build number: not applicable to this npm package.
64
+
65
+ Files changed: `package.json`, `files/finalrelease`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
66
+
67
+ - Allow ad-free apps with `plugins.AdMob.ADMOB_ENABLED: false` to pass release validation without an AdMob alias or controller.
68
+ - Continue requiring a production AdMob alias when advertising is enabled or the enabled flag is unspecified.
69
+ - Preserve rejection of test aliases, commented or duplicate aliases, and missing production controllers for apps with ads enabled.
70
+
71
+ ## 4.10.0 — 2026-10-23
72
+
73
+ Version name: 4.10.0. Version code/build number: not applicable to this npm package.
74
+ Bundled pre-build script: 6.7.
75
+
76
+ Files changed: `package.json`, `files/buildCodeplay/project-scripts.cjs`, `scripts/sync-files.js`, `scripts/uninstall.js`, `files/finalrelease`, `files/buildCodeplay/`, `files/scripts-common/`, `files/take-screen-image.js`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
77
+
78
+ - Copy shared build scripts and the versions manifest into each app; run local scripts with unversioned filenames.
79
+ - Rename app helper scripts to scripts-common automatically, migrate command paths, and preserve existing files without overwriting folder conflicts.
80
+ - Migrate app build/store/sync paths automatically and remove only superseded versioned helpers; preserve app-owned configuration and screenshot data.
81
+ - Resolve app sources/native targets from the consuming app directory while keeping bundled assets inside the plugin.
82
+ - Download IAP and AdMob directly from htmlcodeplay.com, without bundling archives or adding a separate fallback.
83
+ - Automatically migrate deferred ownership verification, purchase-safe advertising, and Home Pro visibility according to each store IAP flag.
84
+ - Copy the full finalrelease implementation so it can be tested from the application folder.
85
+ - Preserve working files during preinstall and avoid downgrading local/newer plugin installations to an older registry release.
86
+
87
+ ## 4.9.8 — 2026-10-22
88
+
89
+ Version name: 4.9.8. Version code/build number: not applicable to this npm package.
90
+ Bundled pre-build script: 6.5.
91
+
92
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.5.js`, `files/buildCodeplay/sync-admob-nextgen.js`, `files/buildCodeplay/versions.json`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
93
+
94
+ - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
95
+ - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
96
+ - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
97
+ - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
98
+ - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
99
+ - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
100
+
101
+ ## 4.7.7 — 2026-10-07
102
+
103
+ Version name: 4.7.7. Version code/build number: not applicable to this npm package.
104
+ Bundled pre-build script: 6.4.
105
+
106
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.4.js`
107
+ (replaces `codeplayBeforeBuild-6.3.js`), `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
108
+
109
+ - Keep `npm run build` as the Android default on every host; add `npm run build:ios` automatically during installation.
110
+ - Route `build-capacitor-android` through the same pre-build validation before copying the web build.
111
+ - Migrate direct save-gallery imports to `@saveGallery` and select the matching platform helper in Vite after one detailed Enter/y confirmation.
112
+ - Stop without import writes on cancellation, missing helpers, mixed versions, unsupported query/hash aliases or concurrent source edits.
113
+ - Reuse source directory traversal and combine gallery, retired OneSignal import, StatusBar and editor checks in one content pass.
114
+ - Automatically remove an installed/declared `onesignal-cordova-plugin` with a warning; skip legacy OneSignal patching/helper downloads and stop on remaining package imports.
115
+ - Keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries without adding them in future projects.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Merbin Joe
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Merbin Joe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # codeplay-common
2
2
 
3
+ Version 4.11.37 adds the `/buildCodeplay` Vite alias during installation and
4
+ before-build setup, including upgrades of existing generated wrappers. This
5
+ lets Huawei privacy startup modules load during Live Reload when the app's
6
+ Vite root is `src`. Object and array aliases and explicit app mappings are
7
+ preserved. Upgrade the package in each consuming app and restart its dev server.
8
+
3
9
  When `cordova-plugin-saf-mediastore` is installed, setup, before-build and Capacitor
4
10
  sync/update hooks add its missing AndroidX DocumentFile dependency to plugin metadata.
5
11
  Existing dependency versions are preserved. After upgrading from an affected version,
package/RELEASE_NOTES.md CHANGED
@@ -1,110 +1,110 @@
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
-
15
-
16
- ## Unreleased
17
-
18
- - Improve Amazon device compatibility by making camera features optional during build preparation. If a camera feature is required, press Enter or wait 5 seconds to make it optional, or press n to keep it required. This also checks manually added declarations and preserves existing camera permissions.
19
- - Prevent builds from failing on deleted theme paths immediately after automatic plugin updates.
20
- - Repair old save-file imports automatically, including imports in Framework7 pages, and keep the Vite alias aligned with the latest installed Android or iOS helper.
21
- - Avoid repeated Analytics and conditional-plugin installs when the required packages are already installed. Native Analytics does not require installing the optional Firebase web SDK.
22
- - Report installed build-helper loading errors without unnecessary reinstall attempts.
23
- - Keep notification icons in optimized Android apps by generating resource protection from each app's configuration during build preparation. Rebuild and reinstall consuming apps to apply this fix.
24
-
25
- ## 4.11.4 — 2026-10-27
26
-
27
- Version name: 4.11.4. Version code/build number: not applicable to this npm package.
28
-
29
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle`, `files/buildCodeplay/codeplayBeforeBuild.js`, `files/buildCodeplay/manifestModification.js`, `files/buildCodeplay/project-scripts.cjs`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
30
-
31
- - Fix missing permission-check results caused by release optimization removing Capacitor metadata.
32
- - Apply protection to all Android apps using this package, including apps with no permission-dependent features.
33
- - Restore protection after native platform regeneration and package updates, and check it on every Gradle build without overwriting custom ProGuard rules.
34
- - Keep the fix self-contained in the shared package and provide a manual restore command.
35
- - No new permissions or prompts are added. Update the package and rebuild each app to include the correction.
36
- - Preserve existing release minification choices and protect FFmpeg native entry points in apps using that plugin.
37
-
38
- ## 4.10.5 — 2026-10-23
39
-
40
- Version name: 4.10.5. Version code/build number: not applicable to this npm package.
41
-
42
- Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
43
-
44
- - Prevent app postinstall failures after shared scripts switch to unversioned filenames.
45
- - Repair the known old sync-hook path during plugin installation.
46
- - Preserve each app's custom configuration and leave apps without the affected configurator unchanged.
47
-
48
- ## 4.10.4 — 2026-10-23
49
-
50
- Version name: 4.10.4. Version code/build number: not applicable to this npm package.
51
-
52
- Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
53
-
54
- - Fix Android sync failures caused by the old versioned splash script lookup.
55
- - Use the migrated baseline profile setup path.
56
- - Update the custom sync hook automatically during plugin installation.
57
-
58
- ## 4.10.3 — 2026-10-23
59
-
60
- Version name: 4.10.3. Version code/build number: not applicable to this npm package.
61
-
62
- Files changed: `package.json`, `files/finalrelease`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
63
-
64
- - Release ad-free apps without adding an unnecessary AdMob alias or controller.
65
- - Explicitly set `plugins.AdMob.ADMOB_ENABLED` to `false` to use the ad-free release path.
66
- - Keep production AdMob safety checks for apps with advertising enabled.
67
-
68
- ## 4.10.0 — 2026-10-23
69
-
70
- Version name: 4.10.0. Version code/build number: not applicable to this npm package.
71
- Bundled pre-build script: 6.7.
72
-
73
- Files changed: `package.json`, `files/buildCodeplay/project-scripts.cjs`, `scripts/sync-files.js`, `scripts/uninstall.js`, `files/finalrelease`, `files/buildCodeplay/`, `files/scripts-common/`, `files/take-screen-image.js`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
74
-
75
- - Copy shared build scripts and the versions manifest into each app; run local scripts with unversioned filenames.
76
- - Rename app helper scripts to scripts-common automatically, migrate command paths, and preserve existing files without overwriting folder conflicts.
77
- - Migrate app build/store/sync paths automatically and remove only superseded versioned helpers; preserve app-owned configuration and screenshot data.
78
- - Resolve app sources/native targets from the consuming app directory while keeping bundled assets inside the plugin.
79
- - Download IAP and AdMob directly from htmlcodeplay.com, without bundling archives or adding a separate fallback.
80
- - Automatically migrate deferred ownership verification, purchase-safe advertising, and Home Pro visibility according to each store IAP flag.
81
- - Copy the full finalrelease implementation so it can be tested from the application folder.
82
- - Preserve working files during preinstall and avoid downgrading local/newer plugin installations to an older registry release.
83
-
84
- ## 4.9.8 — 2026-10-22
85
-
86
- Version name: 4.9.8. Version code/build number: not applicable to this npm package.
87
- Bundled pre-build script: 6.5.
88
-
89
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.5.js`, `files/buildCodeplay/sync-admob-nextgen.js`, `files/buildCodeplay/versions.json`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
90
-
91
- - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
92
- - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
93
- - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
94
- - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
95
- - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
96
- - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
97
-
98
- ## 4.7.7 — 2026-10-07
99
-
100
- Version name: 4.7.7. Version code/build number: not applicable to this npm package.
101
-
102
- Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.4.js`
103
- (replaces `codeplayBeforeBuild-6.3.js`), `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
104
-
105
- - Installation automatically configures Android and iOS build commands in your app's `package.json`.
106
- - Android builds remain the default; use `npm run build:ios` for iOS.
107
- - Save-gallery imports use one alias with a platform-specific helper and a clear confirmation before source changes.
108
- - Shared checks reuse file traversal to reduce repeated scanning.
109
- - Builds warn and automatically uninstall the retired OneSignal Cordova plugin when found.
110
- - `agent-temp/` stays ignored, while `buildCodeplay/` is removed from ignore rules.
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
+
15
+
16
+ ## Unreleased
17
+
18
+ - Improve Amazon device compatibility by making camera features optional during build preparation. If a camera feature is required, press Enter or wait 5 seconds to make it optional, or press n to keep it required. This also checks manually added declarations and preserves existing camera permissions.
19
+ - Prevent builds from failing on deleted theme paths immediately after automatic plugin updates.
20
+ - Repair old save-file imports automatically, including imports in Framework7 pages, and keep the Vite alias aligned with the latest installed Android or iOS helper.
21
+ - Avoid repeated Analytics and conditional-plugin installs when the required packages are already installed. Native Analytics does not require installing the optional Firebase web SDK.
22
+ - Report installed build-helper loading errors without unnecessary reinstall attempts.
23
+ - Keep notification icons in optimized Android apps by generating resource protection from each app's configuration during build preparation. Rebuild and reinstall consuming apps to apply this fix.
24
+
25
+ ## 4.11.4 — 2026-10-27
26
+
27
+ Version name: 4.11.4. Version code/build number: not applicable to this npm package.
28
+
29
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs`, `files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle`, `files/buildCodeplay/codeplayBeforeBuild.js`, `files/buildCodeplay/manifestModification.js`, `files/buildCodeplay/project-scripts.cjs`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
30
+
31
+ - Fix missing permission-check results caused by release optimization removing Capacitor metadata.
32
+ - Apply protection to all Android apps using this package, including apps with no permission-dependent features.
33
+ - Restore protection after native platform regeneration and package updates, and check it on every Gradle build without overwriting custom ProGuard rules.
34
+ - Keep the fix self-contained in the shared package and provide a manual restore command.
35
+ - No new permissions or prompts are added. Update the package and rebuild each app to include the correction.
36
+ - Preserve existing release minification choices and protect FFmpeg native entry points in apps using that plugin.
37
+
38
+ ## 4.10.5 — 2026-10-23
39
+
40
+ Version name: 4.10.5. Version code/build number: not applicable to this npm package.
41
+
42
+ Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
43
+
44
+ - Prevent app postinstall failures after shared scripts switch to unversioned filenames.
45
+ - Repair the known old sync-hook path during plugin installation.
46
+ - Preserve each app's custom configuration and leave apps without the affected configurator unchanged.
47
+
48
+ ## 4.10.4 — 2026-10-23
49
+
50
+ Version name: 4.10.4. Version code/build number: not applicable to this npm package.
51
+
52
+ Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
53
+
54
+ - Fix Android sync failures caused by the old versioned splash script lookup.
55
+ - Use the migrated baseline profile setup path.
56
+ - Update the custom sync hook automatically during plugin installation.
57
+
58
+ ## 4.10.3 — 2026-10-23
59
+
60
+ Version name: 4.10.3. Version code/build number: not applicable to this npm package.
61
+
62
+ Files changed: `package.json`, `files/finalrelease`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
63
+
64
+ - Release ad-free apps without adding an unnecessary AdMob alias or controller.
65
+ - Explicitly set `plugins.AdMob.ADMOB_ENABLED` to `false` to use the ad-free release path.
66
+ - Keep production AdMob safety checks for apps with advertising enabled.
67
+
68
+ ## 4.10.0 — 2026-10-23
69
+
70
+ Version name: 4.10.0. Version code/build number: not applicable to this npm package.
71
+ Bundled pre-build script: 6.7.
72
+
73
+ Files changed: `package.json`, `files/buildCodeplay/project-scripts.cjs`, `scripts/sync-files.js`, `scripts/uninstall.js`, `files/finalrelease`, `files/buildCodeplay/`, `files/scripts-common/`, `files/take-screen-image.js`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
74
+
75
+ - Copy shared build scripts and the versions manifest into each app; run local scripts with unversioned filenames.
76
+ - Rename app helper scripts to scripts-common automatically, migrate command paths, and preserve existing files without overwriting folder conflicts.
77
+ - Migrate app build/store/sync paths automatically and remove only superseded versioned helpers; preserve app-owned configuration and screenshot data.
78
+ - Resolve app sources/native targets from the consuming app directory while keeping bundled assets inside the plugin.
79
+ - Download IAP and AdMob directly from htmlcodeplay.com, without bundling archives or adding a separate fallback.
80
+ - Automatically migrate deferred ownership verification, purchase-safe advertising, and Home Pro visibility according to each store IAP flag.
81
+ - Copy the full finalrelease implementation so it can be tested from the application folder.
82
+ - Preserve working files during preinstall and avoid downgrading local/newer plugin installations to an older registry release.
83
+
84
+ ## 4.9.8 — 2026-10-22
85
+
86
+ Version name: 4.9.8. Version code/build number: not applicable to this npm package.
87
+ Bundled pre-build script: 6.5.
88
+
89
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.5.js`, `files/buildCodeplay/sync-admob-nextgen.js`, `files/buildCodeplay/versions.json`, `files/finalrelease`, `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
90
+
91
+ - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
92
+ - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
93
+ - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
94
+ - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
95
+ - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
96
+ - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
97
+
98
+ ## 4.7.7 — 2026-10-07
99
+
100
+ Version name: 4.7.7. Version code/build number: not applicable to this npm package.
101
+
102
+ Files changed: `package.json`, `scripts/sync-files.js`, `files/buildCodeplay/codeplayBeforeBuild-6.4.js`
103
+ (replaces `codeplayBeforeBuild-6.3.js`), `README.md`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
104
+
105
+ - Installation automatically configures Android and iOS build commands in your app's `package.json`.
106
+ - Android builds remain the default; use `npm run build:ios` for iOS.
107
+ - Save-gallery imports use one alias with a platform-specific helper and a clear confirmation before source changes.
108
+ - Shared checks reuse file traversal to reduce repeated scanning.
109
+ - Builds warn and automatically uninstall the retired OneSignal Cordova plugin when found.
110
+ - `agent-temp/` stays ignored, while `buildCodeplay/` is removed from ignore rules.
@@ -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 supports multiple external local JavaScript module scripts in `src/index.html`. One consent entry imports them in document order after acceptance; the remaining module tags are inert until restored for another store. Commented script examples are ignored. Missing or unsupported module paths fail the Huawei build instead of silently bypassing consent. Classic scripts and inline scripts are not gated by this hook; audit any such scripts that collect information. 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.