codeplay-common 4.11.11 → 4.11.14

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 (35) hide show
  1. package/CHANGELOG.md +114 -101
  2. package/LICENSE +21 -21
  3. package/README.md +274 -229
  4. package/RELEASE_NOTES.md +110 -97
  5. package/files/buildCodeplay/add-splash-screen.js +256 -255
  6. package/files/buildCodeplay/apk-store-builder.js +97 -97
  7. package/files/buildCodeplay/codeplayBeforeBuild.js +45 -43
  8. package/files/buildCodeplay/ensure-current-build.cjs +42 -42
  9. package/files/buildCodeplay/fix-onesignal-plugin.js +96 -96
  10. package/files/buildCodeplay/ios-emi-admob-modification.js +49 -49
  11. package/files/buildCodeplay/manifestModification.js +38 -38
  12. package/files/buildCodeplay/newly added.txt +89 -89
  13. package/files/buildCodeplay/release-sync.config.json +4 -4
  14. package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
  15. package/files/buildCodeplay/setSplashAnimation.js +227 -225
  16. package/files/buildCodeplay/splash-setup.cjs +88 -0
  17. package/files/buildCodeplay/splashxml/codeplay_splashScreen.xml +1 -1
  18. package/files/buildCodeplay/sync-admob-nextgen.js +219 -219
  19. package/files/buildCodeplay/versions.json +27 -27
  20. package/files/finalrelease +1263 -1246
  21. package/files/generate-ai-promo-video.js +23 -23
  22. package/files/ionic.config.json +6 -6
  23. package/files/scripts-common/generate-baseline-profile.js +46 -46
  24. package/files/scripts-common/run-codeplay-sync-after.js +21 -21
  25. package/files/scripts-common/screenshot/background-decorations.js +120 -120
  26. package/files/scripts-common/screenshot/frame-samples.js +117 -117
  27. package/files/scripts-common/setup-baseline-profile.js +291 -291
  28. package/files/take-screen-image.js +2 -1
  29. package/files/take-screen-video.js +644 -644
  30. package/package.json +3 -2
  31. package/runtime/splash-ready.mjs +52 -0
  32. package/scripts/ensure-current-build.test.cjs +76 -76
  33. package/scripts/splash-setup.test.cjs +142 -0
  34. package/scripts/sync-files.js +114 -113
  35. package/scripts/uninstall.js +2 -2
package/README.md CHANGED
@@ -1,229 +1,274 @@
1
- # codeplay-common
2
- Everything automatted in Capacitor apps, easy to maintain many apps in capacitor. It will reduce your 40% of work, with common file code.
3
-
4
-
5
- Easy add splashscreen and set animation
6
- Admob id automatically from capacitor.config.json file
7
- Make three build file for different store as per our requirement
8
- Based on store install various IAP plugins
9
- Make it to ionic project
10
-
11
-
12
- ## Capacitor Android permission metadata (4.11.4)
13
-
14
- The package preserves the runtime `CapacitorPlugin` and `Permission` annotation members required by optimized Android builds. This applies to every Android consumer, even if the app does not currently use permission-dependent plugins. It does not declare or grant permissions, show prompts, or enable minification.
15
-
16
- Installation applies the rules to an existing Android project and installs one `apply from` line in `android/app/build.gradle`. The included Gradle script reruns the repair during every Gradle configuration, including direct Android Studio/Gradle and Capacitor `run --no-sync` builds. All repair logic stays in the shared fix folder. Android sync, build preparation and release preparation restore missing rules after platform regeneration. The generated Gradle hook is restored after platform regeneration. Existing custom ProGuard rules are preserved and repeated runs do not add duplicates. Apps without an Android platform are skipped until that platform exists.
17
-
18
- All fix implementations ship under `buildCodeplay/fix-optimize-builld/`, including the restore command and its Gradle integration; no app-specific `Scripts` file is required. Run `npm run android:r8-rules` to restore the rules manually. Existing custom npm commands are preserved; the known older `restore-android-r8-rules.cjs` command is migrated automatically.
19
-
20
- After installing this package update, rebuild and test each app's optimized release. Updating build tooling cannot change APKs or app-store releases already distributed to users.
21
-
22
- ## App helper folder
23
-
24
- Application helper scripts are kept in `scripts-common/`. Installation migrates the old `scripts/` folder and package command paths automatically, preserving every existing file. A conflicting destination file stops migration before any files are moved. The plugin’s internal npm lifecycle folder remains `scripts/`.
25
-
26
- ## Shared unversioned build files (4.10.0)
27
-
28
- The plugin keeps the master build templates in files/buildCodeplay and copies them into each app's buildCodeplay folder during installation/update. Test changes in the application folder, then update these master templates for distribution to other apps.
29
-
30
- App package scripts run local files: node buildCodeplay/codeplayBeforeBuild.js, node buildCodeplay/packageidBaseModification.js, node buildCodeplay/add-splash-screen.js and node buildCodeplay/setSplashAnimation.js. Filenames have no version suffixes. The versions.json plugin manifest remains alongside these scripts and is copied too.
31
-
32
- Installation migrates both legacy versioned filenames and the temporary node_modules runner commands to these local paths. It removes only superseded versioned build scripts, preserves app-owned release configuration and splash XML overrides, and keeps screenshot data and custom helpers. The root finalrelease script is also copied as a local implementation.
33
-
34
- After this update is installed, `npm run build` checks the app's `buildCodeplay/` folder for version-suffixed files before preparing the build. If any exist, it runs `npm uninstall codeplay-common` followed by `npm install codeplay-common`, then runs the refreshed before-build script before continuing. A failed command or remaining versioned files stops the build. Unrecognized legacy files must be migrated manually; they are not deleted automatically.
35
-
36
- Before-build includes the automatic IAP startup and Home Pro-button migrations. IAP and AdMob ZIPs are downloaded directly from https://htmlcodeplay.com/code-play-plugin/ using the existing update flow. No plugin ZIPs are bundled in this npm package. App-specific configuration and designs remain in the app.
37
-
38
- ## AdMob folder packages
39
-
40
- The next before-build automatically migrates AdMob to at least:
41
-
42
- `src/js/Ads/admob-nextgen-4.1/admob-emi-nextgen.js`
43
-
44
- `src/js/Ads/admob-nextgen-4.1/app-open-state.js`
45
-
46
- Existing `@admob` imports continue to work. Direct imports of the controller or
47
- lightweight state module are rewritten to the selected folder, including relative
48
- paths, `@/` paths and static dynamic imports. App-owned
49
- `src/js/Ads/admob-ad-configuration-nextgen.json` remains outside the package;
50
- installation does not replace its values. The controller's analytics import is
51
- aligned with the newest installed IAP folder containing `firebase-analytics.js`.
52
-
53
- The pre-build script downloads IAP before migrating AdMob so the corresponding imports exist. Postinstall does not independently update AdMob ahead of IAP.
54
- ZIPs may contain the files directly or one matching versioned folder. A complete
55
- controller and state module are required before imports switch. An unavailable or
56
- invalid remote ZIP leaves the installed package in use, with a warning. Unresolved
57
- import targets stop migration before old packages are removed.
58
-
59
- For future AdMob releases, upload `admob-nextgen-X.Y.zip` to
60
- `https://htmlcodeplay.com/code-play-plugin/` and set `"admob-nextgen": "X.Y"`
61
- in that server's `versions.json`. Version the folder, and keep module filenames
62
- stable. The previous `admob-emi-nextgen` manifest key is accepted for versions
63
- 4.0 and later during the transition. Apps automatically select a newer ZIP during
64
- their next normal pre-build; no per-app import changes are needed.
65
- For older manifests without a folder release entry, migration checks the required
66
- `admob-nextgen-4.1.zip` directly from the same server. If offline, an existing compatible
67
- installation is preserved; a missing required package stops the build.
68
-
69
- ## Platform builds and shared validation
70
-
71
- Installing or updating `codeplay-common` updates the consuming project's `package.json`
72
- to use the copied unversioned pre-build script and adds these commands:
73
-
74
- - `npm run build`: Android by default, including on macOS.
75
- - `npm run build:ios`: sets `CODEPLAY_BUILD_PLATFORM=ios` and runs the same build pipeline.
76
- - `npm run build-capacitor-android`: runs the shared checks and copies the web build to Android.
77
-
78
- The pre-build script migrates direct `saveToGalleryAndSaveAnyFile` imports to
79
- `@saveGallery` and sets the Vite alias to the matching Android or iOS helper.
80
- Before changing source imports or the alias, it lists the build target, affected files,
81
- and exact replacements. Press Enter or type `y` to continue; any other answer cancels.
82
- Correct imports and alias targets continue without prompting. Missing helpers, mixed
83
- versions and query/hash imports stop with an actionable error.
84
-
85
- Source validation reuses a directory inventory and combines the gallery and editor
86
- checks in one content pass. The inventory refreshes when generated or downloaded
87
- files change the source tree.
88
-
89
- Builds also keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries.
90
- If `onesignal-cordova-plugin` is declared or installed, the pre-build script warns and
91
- runs `npm uninstall onesignal-cordova-plugin`. It stops if removal fails or active
92
- package imports remain. Legacy OneSignal patching and helper downloads are disabled.
93
-
94
- ## Screenshot data
95
-
96
- Shared screenshot helpers are installed into `scripts-common/screenshot/` and updated with
97
- the package. App-specific data is not bundled with the package.
98
- During an upgrade, cleanup removes only the two legacy helpers `frame-samples.js`
99
- and `background-decorations.js` from `scripts-screenshot/screenshot/`, preserving
100
- the folder, JSON data, and other app files.
101
-
102
- `take-screen-image.js` creates `scripts-screenshot/screenshot/` and empty
103
- `screenshot-copy.json` and `screenshot-info.json` files when needed. Existing files
104
- are preserved during initialization, package installation, and cleanup. Capture
105
- updates screenshot information; the AI text-generation workflow fills screenshot
106
- copy. `--delete` removes matching records, and screenshot runs reconcile records
107
- against the captured images (except dry runs and `--refresh-info`).
108
-
109
- ## Agent instructions
110
-
111
- Agent instructions are updated during `npm run build`, not during npm installation.
112
- The build script reads the `agents` version from
113
- `https://htmlcodeplay.com/code-play-plugin/versions.json` and downloads the matching
114
- `agents-<version>.zip` archive when the project has no agent instructions or the
115
- server version is newer.
116
-
117
- The ZIP root must contain `AGENTS.md` and `AGENTS/`. These are copied directly to
118
- the project root. The installed version is stored in `AGENTS/.codeplay-version`.
119
- Existing files with matching names are replaced; project-only files with other
120
- names inside `AGENTS/` are preserved.
121
-
122
- For example, publish `agents-1.1.zip` and add this entry to the server's
123
- `versions.json`:
124
-
125
- ```json
126
- "agents": "1.1"
127
- ```
128
-
129
- Donate to get full code including many common functions
130
- https://ko-fi.com/codeplay
131
-
132
- Version 4.6.1
133
- Added automatic IAP startup integration for Framework7 home pages.
134
- Updated minimum shared versions to IAP 4.2 and AdMob nextgen 2.5.
135
-
136
- 4.2.8
137
- baseline profile code modifications
138
-
139
- Version 4.2.3
140
- Added build warning confirmation when android.ORIENTATION is not "auto" or android.RESIZEABLE_ACTIVITY is not true.
141
-
142
- Version 4.2.2
143
- Added "bannerDisabledPages" property and its default value
144
- The admob configuration default value priority is updated
145
-
146
- Version 4.2.1
147
- Updated AdMob nextgen file validation to match admob-emi-nextgen file names.
148
-
149
- Version 4.2.0
150
- Firebase related automatic changes updated
151
-
152
- Version 4.1.9
153
- Added AdMob nextgen 1.7 validation/default support for "overlappingHeight", "bannerTypeAndroidLandscape", and "bannerTypeiOSLandscape".
154
-
155
- Version 4.1.8
156
- "consentDebug: false" is added
157
-
158
- Version 4.1.7
159
- admob configuration automatically added.
160
-
161
- Version 4.1.6
162
- "setup-baseline-profile.js" modification, duplicate validation error fixed
163
-
164
- Version 4.1.5
165
- While isTesting is true it is not validated from our new configuration admob file, now it is solved
166
-
167
- Version 4.1.4
168
- hardcoded version is removed for the admob-emi-nextgen
169
-
170
-
171
- Version 4.1.3
172
- "consentDebug": false automatically adds if not
173
-
174
- Version 4.1.2
175
- Speedup
176
-
177
- Version 4.1.1
178
- Auto admob integration updated
179
-
180
-
181
- version 4.0.9
182
- packageJson.scripts["ionic:serve"] = "cross-env NODE_ENV=development vite"; this line updated in "sync-files.js"
183
-
184
-
185
- version 4.0.8
186
- safearea plugin is checked and removed automatically
187
- Automatically added following in capacitor.config.json file
188
- "SystemBars": {
189
- "insetsHandling": "css"
190
- }
191
- patchFile() method is removed
192
-
193
-
194
-
195
-
196
- Version 4.0.6
197
- IAP related some automatic variable creation and validation
198
- Fetch from vite.config.json file
199
- 'import.meta.env.VITE_APP_UNIQUE_ID': JSON.stringify(APP_UNIQUE_ID),
200
- 'import.meta.env.VITE_ANDROID_ANALYTICS_ENABLED': JSON.stringify(ANDROID_ANALYTICS_ENABLED),
201
- 'import.meta.env.VITE_IOS_ANALYTICS_ENABLED': JSON.stringify(IOS_ANALYTICS_ENABLED),
202
- 'import.meta.env.VITE_IAP_DESIGN': JSON.stringify(IAP_DESIGN),
203
-
204
-
205
- Version 4.0.5
206
- In "files\buildCodeplay\packageidBaseModification-1.4.js" SCHEDULE_EXACT_ALARM permission added for the app unique id 2 (resume generator app)
207
-
208
-
209
- Version 4.0.4
210
- patchFile(); method is disabled, Due to "@capacitor/android:8.4.2" this update. I think it is realted to safearea issue fixed in this latest version, file in "SystemBars.java"
211
-
212
- Version 4.0.3
213
- Old admob check performs through plugin location, but not it is validated from capacitor.config.json
214
-
215
-
216
- Version: 4.0.2
217
- After check & install/download the latest version, the re-check is cancelled now
218
-
219
- Version: 4.0.1
220
- Base profile script added
221
-
222
-
223
- "version": "",
224
- Version : 4.0.0 (Previous version 3.2.19)
225
- 1) In here we are completly remove the admob-emi and use "capacitor-admob-nextgen"
226
- 2) Removed "modify-plugin-xml.js"
227
- 3)
228
-
229
- The fix preserves the metadata behind the release permission-check failure verified in testing. It does not guarantee every native dialog or plugin: required manifest declarations, Android permission policy, device settings and plugin-specific keep rules still apply.
1
+ # codeplay-common
2
+
3
+ ## Shared splash setup (4.11.13)
4
+
5
+ The package owns the splash theme template, Android splash setup, MainActivity generator and Framework7 readiness helper. Install/update copies the build scripts into the consuming app. Installation, before-build and splash setup repair the known legacy `Theme.AppCompat.NoActionBar` post-splash default in the app's preserved `buildCodeplay/splashxml/codeplay_splashScreen.xml` template. The replacement uses `Theme.AppCompat.DayNight.NoActionBar`; other custom themes and resource attributes are preserved. Android sync applies the template to generated resources. Existing APKs require a rebuild to receive native changes.
6
+
7
+ Configure these separate controls in `capacitor.config.json`:
8
+
9
+ ```json
10
+ {
11
+ "plugins": {
12
+ "SplashScreen": {
13
+ "launchShowDuration": 8000,
14
+ "launchAutoHide": true
15
+ },
16
+ "CodeplaySplashScreen": {
17
+ "exitAnimationDuration": 200,
18
+ "readinessTimeout": 8000,
19
+ "readyImageSelector": "[data-splash-ready], .t-film-art img",
20
+ "migrateLegacyReadiness": true
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ `CodeplaySplashScreen` is build-time configuration, not an additional native plugin. `exitAnimationDuration` accepts integer milliseconds from0 through10000 and defaults to1000 for compatibility;0 removes the configured exit-animation delay. Run Android sync after changing it. The sample opts into200ms; installation does not choose a new duration for existing apps. `SplashScreen.launchShowDuration` is the native maximum fallback;0 bypasses Capacitor's launch-splash holding flow, so do not use it to disable only the exit animation. Keep `launchAutoHide:true` and a native duration at least as long as `readinessTimeout`.
27
+
28
+ The package automatically recognizes the previously shared page/image readiness implementation and moves it to the package helper. `migrateLegacyReadiness:true` additionally opts a supported fixed2000ms handler into readiness;its default is false. Migration requires the installed `@capacitor/splash-screen` dependency, the native fallback configuration above and a supported `capacitorApp.handleSplashscreen` method. Config and unsupported custom startup methods are preserved; preparation reports manual integration requirements. Existing explicitly managed helper calls receive updated selector/timeout options during preparation.
29
+
30
+ For custom Framework7 startup code, retain your app's lifecycle and call:
31
+
32
+ ```js
33
+ import { SplashScreen } from '@capacitor/splash-screen';
34
+ import { hideSplashWhenReady } from 'codeplay-common/runtime/splash-ready.mjs';
35
+
36
+ hideSplashWhenReady({
37
+ f7: app,
38
+ hide: () => SplashScreen.hide(),
39
+ imageSelector: '[data-splash-ready]',
40
+ timeout: 8000
41
+ });
42
+ ```
43
+
44
+ Invoke after the Framework7 instance exists. The helper uses `pageAfterIn` for the main view, handles an already-current page, waits for the selected image's load/decode, and then hides once. Mark the important `<img>` with `data-splash-ready` or configure its selector;without a matching image it hides after the page is ready. Image errors and timeout release the splash and remove listeners. It does not track every image, async request or custom page render;call from your own ready point for those requirements. Retain the native timeout as a second fallback. No new dependencies are added.
45
+
46
+ Validation: migration/runtime/generator tests cover0ms,theme preservation,repeat runs,image errors,decode failure and timeout cleanup. Earlier app release benchmarks used the equivalent app-local readiness flow;they do not validate every consuming app or guarantee a startup speedup from this package update. Rebuild and check light/dark switching and splash handoff on Android before releasing an app.
47
+ Everything automatted in Capacitor apps, easy to maintain many apps in capacitor. It will reduce your 40% of work, with common file code.
48
+
49
+
50
+ Easy add splashscreen and set animation
51
+ Admob id automatically from capacitor.config.json file
52
+ Make three build file for different store as per our requirement
53
+ Based on store install various IAP plugins
54
+ Make it to ionic project
55
+
56
+
57
+ ## Capacitor Android permission metadata (4.11.4)
58
+
59
+ The package preserves the runtime `CapacitorPlugin` and `Permission` annotation members required by optimized Android builds. This applies to every Android consumer, even if the app does not currently use permission-dependent plugins. It does not declare or grant permissions, show prompts, or enable minification.
60
+
61
+ Installation applies the rules to an existing Android project and installs one `apply from` line in `android/app/build.gradle`. The included Gradle script reruns the repair during every Gradle configuration, including direct Android Studio/Gradle and Capacitor `run --no-sync` builds. All repair logic stays in the shared fix folder. Android sync, build preparation and release preparation restore missing rules after platform regeneration. The generated Gradle hook is restored after platform regeneration. Existing custom ProGuard rules are preserved and repeated runs do not add duplicates. Apps without an Android platform are skipped until that platform exists.
62
+
63
+ All fix implementations ship under `buildCodeplay/fix-optimize-builld/`, including the restore command and its Gradle integration; no app-specific `Scripts` file is required. Run `npm run android:r8-rules` to restore the rules manually. Existing custom npm commands are preserved; the known older `restore-android-r8-rules.cjs` command is migrated automatically.
64
+
65
+ After installing this package update, rebuild and test each app's optimized release. Updating build tooling cannot change APKs or app-store releases already distributed to users.
66
+
67
+ ## App helper folder
68
+
69
+ Application helper scripts are kept in `scripts-common/`. Installation migrates the old `scripts/` folder and package command paths automatically, preserving every existing file. A conflicting destination file stops migration before any files are moved. The plugin’s internal npm lifecycle folder remains `scripts/`.
70
+
71
+ ## Shared unversioned build files (4.10.0)
72
+
73
+ The plugin keeps the master build templates in files/buildCodeplay and copies them into each app's buildCodeplay folder during installation/update. Test changes in the application folder, then update these master templates for distribution to other apps.
74
+
75
+ App package scripts run local files: node buildCodeplay/codeplayBeforeBuild.js, node buildCodeplay/packageidBaseModification.js, node buildCodeplay/add-splash-screen.js and node buildCodeplay/setSplashAnimation.js. Filenames have no version suffixes. The versions.json plugin manifest remains alongside these scripts and is copied too.
76
+
77
+ Installation migrates both legacy versioned filenames and the temporary node_modules runner commands to these local paths. It removes only superseded versioned build scripts, preserves app-owned release configuration and splash XML overrides, and keeps screenshot data and custom helpers. The root finalrelease script is also copied as a local implementation.
78
+
79
+ After this update is installed, `npm run build` checks the app's `buildCodeplay/` folder for version-suffixed files before preparing the build. If any exist, it runs `npm uninstall codeplay-common` followed by `npm install codeplay-common`, then runs the refreshed before-build script before continuing. A failed command or remaining versioned files stops the build. Unrecognized legacy files must be migrated manually; they are not deleted automatically.
80
+
81
+ Before-build includes the automatic IAP startup and Home Pro-button migrations. IAP and AdMob ZIPs are downloaded directly from https://htmlcodeplay.com/code-play-plugin/ using the existing update flow. No plugin ZIPs are bundled in this npm package. App-specific configuration and designs remain in the app.
82
+
83
+ ## AdMob folder packages
84
+
85
+ The next before-build automatically migrates AdMob to at least:
86
+
87
+ `src/js/Ads/admob-nextgen-4.1/admob-emi-nextgen.js`
88
+
89
+ `src/js/Ads/admob-nextgen-4.1/app-open-state.js`
90
+
91
+ Existing `@admob` imports continue to work. Direct imports of the controller or
92
+ lightweight state module are rewritten to the selected folder, including relative
93
+ paths, `@/` paths and static dynamic imports. App-owned
94
+ `src/js/Ads/admob-ad-configuration-nextgen.json` remains outside the package;
95
+ installation does not replace its values. The controller's analytics import is
96
+ aligned with the newest installed IAP folder containing `firebase-analytics.js`.
97
+
98
+ The pre-build script downloads IAP before migrating AdMob so the corresponding imports exist. Postinstall does not independently update AdMob ahead of IAP.
99
+ ZIPs may contain the files directly or one matching versioned folder. A complete
100
+ controller and state module are required before imports switch. An unavailable or
101
+ invalid remote ZIP leaves the installed package in use, with a warning. Unresolved
102
+ import targets stop migration before old packages are removed.
103
+
104
+ For future AdMob releases, upload `admob-nextgen-X.Y.zip` to
105
+ `https://htmlcodeplay.com/code-play-plugin/` and set `"admob-nextgen": "X.Y"`
106
+ in that server's `versions.json`. Version the folder, and keep module filenames
107
+ stable. The previous `admob-emi-nextgen` manifest key is accepted for versions
108
+ 4.0 and later during the transition. Apps automatically select a newer ZIP during
109
+ their next normal pre-build; no per-app import changes are needed.
110
+ For older manifests without a folder release entry, migration checks the required
111
+ `admob-nextgen-4.1.zip` directly from the same server. If offline, an existing compatible
112
+ installation is preserved; a missing required package stops the build.
113
+
114
+ ## Platform builds and shared validation
115
+
116
+ Installing or updating `codeplay-common` updates the consuming project's `package.json`
117
+ to use the copied unversioned pre-build script and adds these commands:
118
+
119
+ - `npm run build`: Android by default, including on macOS.
120
+ - `npm run build:ios`: sets `CODEPLAY_BUILD_PLATFORM=ios` and runs the same build pipeline.
121
+ - `npm run build-capacitor-android`: runs the shared checks and copies the web build to Android.
122
+
123
+ The pre-build script migrates direct `saveToGalleryAndSaveAnyFile` imports to
124
+ `@saveGallery` and sets the Vite alias to the matching Android or iOS helper.
125
+ Before changing source imports or the alias, it lists the build target, affected files,
126
+ and exact replacements. Press Enter or type `y` to continue; any other answer cancels.
127
+ Correct imports and alias targets continue without prompting. Missing helpers, mixed
128
+ versions and query/hash imports stop with an actionable error.
129
+
130
+ Source validation reuses a directory inventory and combines the gallery and editor
131
+ checks in one content pass. The inventory refreshes when generated or downloaded
132
+ files change the source tree.
133
+
134
+ Builds also keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries.
135
+ If `onesignal-cordova-plugin` is declared or installed, the pre-build script warns and
136
+ runs `npm uninstall onesignal-cordova-plugin`. It stops if removal fails or active
137
+ package imports remain. Legacy OneSignal patching and helper downloads are disabled.
138
+
139
+ ## Screenshot data
140
+
141
+ Shared screenshot helpers are installed into `scripts-common/screenshot/` and updated with
142
+ the package. App-specific data is not bundled with the package.
143
+ During an upgrade, cleanup removes only the two legacy helpers `frame-samples.js`
144
+ and `background-decorations.js` from `scripts-screenshot/screenshot/`, preserving
145
+ the folder, JSON data, and other app files.
146
+
147
+ `take-screen-image.js` creates `scripts-screenshot/screenshot/` and empty
148
+ `screenshot-copy.json` and `screenshot-info.json` files when needed. Existing files
149
+ are preserved during initialization, package installation, and cleanup. Capture
150
+ updates screenshot information; the AI text-generation workflow fills screenshot
151
+ copy. `--delete` removes matching records, and screenshot runs reconcile records
152
+ against the captured images (except dry runs and `--refresh-info`).
153
+
154
+ ## Agent instructions
155
+
156
+ Agent instructions are updated during `npm run build`, not during npm installation.
157
+ The build script reads the `agents` version from
158
+ `https://htmlcodeplay.com/code-play-plugin/versions.json` and downloads the matching
159
+ `agents-<version>.zip` archive when the project has no agent instructions or the
160
+ server version is newer.
161
+
162
+ The ZIP root must contain `AGENTS.md` and `AGENTS/`. These are copied directly to
163
+ the project root. The installed version is stored in `AGENTS/.codeplay-version`.
164
+ Existing files with matching names are replaced; project-only files with other
165
+ names inside `AGENTS/` are preserved.
166
+
167
+ For example, publish `agents-1.1.zip` and add this entry to the server's
168
+ `versions.json`:
169
+
170
+ ```json
171
+ "agents": "1.1"
172
+ ```
173
+
174
+ Donate to get full code including many common functions
175
+ https://ko-fi.com/codeplay
176
+
177
+ Version 4.6.1
178
+ Added automatic IAP startup integration for Framework7 home pages.
179
+ Updated minimum shared versions to IAP 4.2 and AdMob nextgen 2.5.
180
+
181
+ 4.2.8
182
+ baseline profile code modifications
183
+
184
+ Version 4.2.3
185
+ Added build warning confirmation when android.ORIENTATION is not "auto" or android.RESIZEABLE_ACTIVITY is not true.
186
+
187
+ Version 4.2.2
188
+ Added "bannerDisabledPages" property and its default value
189
+ The admob configuration default value priority is updated
190
+
191
+ Version 4.2.1
192
+ Updated AdMob nextgen file validation to match admob-emi-nextgen file names.
193
+
194
+ Version 4.2.0
195
+ Firebase related automatic changes updated
196
+
197
+ Version 4.1.9
198
+ Added AdMob nextgen 1.7 validation/default support for "overlappingHeight", "bannerTypeAndroidLandscape", and "bannerTypeiOSLandscape".
199
+
200
+ Version 4.1.8
201
+ "consentDebug: false" is added
202
+
203
+ Version 4.1.7
204
+ admob configuration automatically added.
205
+
206
+ Version 4.1.6
207
+ "setup-baseline-profile.js" modification, duplicate validation error fixed
208
+
209
+ Version 4.1.5
210
+ While isTesting is true it is not validated from our new configuration admob file, now it is solved
211
+
212
+ Version 4.1.4
213
+ hardcoded version is removed for the admob-emi-nextgen
214
+
215
+
216
+ Version 4.1.3
217
+ "consentDebug": false automatically adds if not
218
+
219
+ Version 4.1.2
220
+ Speedup
221
+
222
+ Version 4.1.1
223
+ Auto admob integration updated
224
+
225
+
226
+ version 4.0.9
227
+ packageJson.scripts["ionic:serve"] = "cross-env NODE_ENV=development vite"; this line updated in "sync-files.js"
228
+
229
+
230
+ version 4.0.8
231
+ safearea plugin is checked and removed automatically
232
+ Automatically added following in capacitor.config.json file
233
+ "SystemBars": {
234
+ "insetsHandling": "css"
235
+ }
236
+ patchFile() method is removed
237
+
238
+
239
+
240
+
241
+ Version 4.0.6
242
+ IAP related some automatic variable creation and validation
243
+ Fetch from vite.config.json file
244
+ 'import.meta.env.VITE_APP_UNIQUE_ID': JSON.stringify(APP_UNIQUE_ID),
245
+ 'import.meta.env.VITE_ANDROID_ANALYTICS_ENABLED': JSON.stringify(ANDROID_ANALYTICS_ENABLED),
246
+ 'import.meta.env.VITE_IOS_ANALYTICS_ENABLED': JSON.stringify(IOS_ANALYTICS_ENABLED),
247
+ 'import.meta.env.VITE_IAP_DESIGN': JSON.stringify(IAP_DESIGN),
248
+
249
+
250
+ Version 4.0.5
251
+ In "files\buildCodeplay\packageidBaseModification-1.4.js" SCHEDULE_EXACT_ALARM permission added for the app unique id 2 (resume generator app)
252
+
253
+
254
+ Version 4.0.4
255
+ patchFile(); method is disabled, Due to "@capacitor/android:8.4.2" this update. I think it is realted to safearea issue fixed in this latest version, file in "SystemBars.java"
256
+
257
+ Version 4.0.3
258
+ Old admob check performs through plugin location, but not it is validated from capacitor.config.json
259
+
260
+
261
+ Version: 4.0.2
262
+ After check & install/download the latest version, the re-check is cancelled now
263
+
264
+ Version: 4.0.1
265
+ Base profile script added
266
+
267
+
268
+ "version": "",
269
+ Version : 4.0.0 (Previous version 3.2.19)
270
+ 1) In here we are completly remove the admob-emi and use "capacitor-admob-nextgen"
271
+ 2) Removed "modify-plugin-xml.js"
272
+ 3)
273
+
274
+ The fix preserves the metadata behind the release permission-check failure verified in testing. It does not guarantee every native dialog or plugin: required manifest declarations, Android permission policy, device settings and plugin-specific keep rules still apply.