codeplay-common 4.9.6 → 4.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
package/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
- # Changelog
1
+ # Changelog
2
+
3
+ ## 4.9.8 — 2026-10-22
4
+
5
+ Version name: 4.9.8. Version code/build number: not applicable to this npm package.
6
+ Bundled pre-build script: 6.5.
7
+
8
+ 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`.
9
+
10
+ - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
11
+ - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
12
+ - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
13
+ - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
14
+ - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
15
+ - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
2
16
 
3
17
  ## 4.7.7 — 2026-10-07
4
18
 
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,169 +1,201 @@
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
- ## Platform builds and shared validation
12
-
13
- Installing or updating `codeplay-common` updates the consuming project's `package.json`
14
- to use the latest bundled pre-build script and adds these commands:
15
-
16
- - `npm run build`: Android by default, including on macOS.
17
- - `npm run build:ios`: sets `CODEPLAY_BUILD_PLATFORM=ios` and runs the same build pipeline.
18
- - `npm run build-capacitor-android`: runs the shared checks and copies the web build to Android.
19
-
20
- The pre-build script migrates direct `saveToGalleryAndSaveAnyFile` imports to
21
- `@saveGallery` and sets the Vite alias to the matching Android or iOS helper.
22
- Before changing source imports or the alias, it lists the build target, affected files,
23
- and exact replacements. Press Enter or type `y` to continue; any other answer cancels.
24
- Correct imports and alias targets continue without prompting. Missing helpers, mixed
25
- versions and query/hash imports stop with an actionable error.
26
-
27
- Source validation reuses a directory inventory and combines the gallery and editor
28
- checks in one content pass. The inventory refreshes when generated or downloaded
29
- files change the source tree.
30
-
31
- Builds also keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries.
32
- If `onesignal-cordova-plugin` is declared or installed, the pre-build script warns and
33
- runs `npm uninstall onesignal-cordova-plugin`. It stops if removal fails or active
34
- package imports remain. Legacy OneSignal patching and helper downloads are disabled.
35
-
36
- ## Screenshot data
37
-
38
- Shared screenshot helpers are installed into `scripts/screenshot/` and updated with
39
- the package. App-specific data is not bundled with the package.
40
- During an upgrade, cleanup removes only the two legacy helpers `frame-samples.js`
41
- and `background-decorations.js` from `scripts-screenshot/screenshot/`, preserving
42
- the folder, JSON data, and other app files.
43
-
44
- `take-screen-image.js` creates `scripts-screenshot/screenshot/` and empty
45
- `screenshot-copy.json` and `screenshot-info.json` files when needed. Existing files
46
- are preserved during initialization, package installation, and cleanup. Capture
47
- updates screenshot information; the AI text-generation workflow fills screenshot
48
- copy. `--delete` removes matching records, and screenshot runs reconcile records
49
- against the captured images (except dry runs and `--refresh-info`).
50
-
51
- ## Agent instructions
52
-
53
- Agent instructions are updated during `npm run build`, not during npm installation.
54
- The build script reads the `agents` version from
55
- `https://htmlcodeplay.com/code-play-plugin/versions.json` and downloads the matching
56
- `agents-<version>.zip` archive when the project has no agent instructions or the
57
- server version is newer.
58
-
59
- The ZIP root must contain `AGENTS.md` and `AGENTS/`. These are copied directly to
60
- the project root. The installed version is stored in `AGENTS/.codeplay-version`.
61
- Existing files with matching names are replaced; project-only files with other
62
- names inside `AGENTS/` are preserved.
63
-
64
- For example, publish `agents-1.1.zip` and add this entry to the server's
65
- `versions.json`:
66
-
67
- ```json
68
- "agents": "1.1"
69
- ```
70
-
71
- Donate to get full code including many common functions
72
- https://ko-fi.com/codeplay
73
-
74
- Version 4.6.1
75
- Added automatic IAP startup integration for Framework7 home pages.
76
- Updated minimum shared versions to IAP 4.2 and AdMob nextgen 2.5.
77
-
78
- 4.2.8
79
- baseline profile code modifications
80
-
81
- Version 4.2.3
82
- Added build warning confirmation when android.ORIENTATION is not "auto" or android.RESIZEABLE_ACTIVITY is not true.
83
-
84
- Version 4.2.2
85
- Added "bannerDisabledPages" property and its default value
86
- The admob configuration default value priority is updated
87
-
88
- Version 4.2.1
89
- Updated AdMob nextgen file validation to match admob-emi-nextgen file names.
90
-
91
- Version 4.2.0
92
- Firebase related automatic changes updated
93
-
94
- Version 4.1.9
95
- Added AdMob nextgen 1.7 validation/default support for "overlappingHeight", "bannerTypeAndroidLandscape", and "bannerTypeiOSLandscape".
96
-
97
- Version 4.1.8
98
- "consentDebug: false" is added
99
-
100
- Version 4.1.7
101
- admob configuration automatically added.
102
-
103
- Version 4.1.6
104
- "setup-baseline-profile.js" modification, duplicate validation error fixed
105
-
106
- Version 4.1.5
107
- While isTesting is true it is not validated from our new configuration admob file, now it is solved
108
-
109
- Version 4.1.4
110
- hardcoded version is removed for the admob-emi-nextgen
111
-
112
-
113
- Version 4.1.3
114
- "consentDebug": false automatically adds if not
115
-
116
- Version 4.1.2
117
- Speedup
118
-
119
- Version 4.1.1
120
- Auto admob integration updated
121
-
122
-
123
- version 4.0.9
124
- packageJson.scripts["ionic:serve"] = "cross-env NODE_ENV=development vite"; this line updated in "sync-files.js"
125
-
126
-
127
- version 4.0.8
128
- safearea plugin is checked and removed automatically
129
- Automatically added following in capacitor.config.json file
130
- "SystemBars": {
131
- "insetsHandling": "css"
132
- }
133
- patchFile() method is removed
134
-
135
-
136
-
137
-
138
- Version 4.0.6
139
- IAP related some automatic variable creation and validation
140
- Fetch from vite.config.json file
141
- 'import.meta.env.VITE_APP_UNIQUE_ID': JSON.stringify(APP_UNIQUE_ID),
142
- 'import.meta.env.VITE_ANDROID_ANALYTICS_ENABLED': JSON.stringify(ANDROID_ANALYTICS_ENABLED),
143
- 'import.meta.env.VITE_IOS_ANALYTICS_ENABLED': JSON.stringify(IOS_ANALYTICS_ENABLED),
144
- 'import.meta.env.VITE_IAP_DESIGN': JSON.stringify(IAP_DESIGN),
145
-
146
-
147
- Version 4.0.5
148
- In "files\buildCodeplay\packageidBaseModification-1.4.js" SCHEDULE_EXACT_ALARM permission added for the app unique id 2 (resume generator app)
149
-
150
-
151
- Version 4.0.4
152
- 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"
153
-
154
- Version 4.0.3
155
- Old admob check performs through plugin location, but not it is validated from capacitor.config.json
156
-
157
-
158
- Version: 4.0.2
159
- After check & install/download the latest version, the re-check is cancelled now
160
-
161
- Version: 4.0.1
162
- Base profile script added
163
-
164
-
165
- "version": "",
166
- Version : 4.0.0 (Previous version 3.2.19)
167
- 1) In here we are completly remove the admob-emi and use "capacitor-admob-nextgen"
168
- 2) Removed "modify-plugin-xml.js"
169
- 3)
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
+ ## AdMob folder packages (4.9.8)
13
+
14
+ Installing this release automatically migrates AdMob to:
15
+
16
+ `src/js/Ads/admob-nextgen-4.0/admob-emi-nextgen.js`
17
+
18
+ `src/js/Ads/admob-nextgen-4.0/app-open-state.js`
19
+
20
+ Existing `@admob` imports continue to work. Direct imports of the controller or
21
+ lightweight state module are rewritten to the selected folder, including relative
22
+ paths, `@/` paths and static dynamic imports. App-owned
23
+ `src/js/Ads/admob-ad-configuration-nextgen.json` remains outside the package;
24
+ installation does not replace its values. The controller's analytics import is
25
+ aligned with the newest installed IAP folder containing `firebase-analytics.js`.
26
+
27
+ The postinstall hook and pre-build script use the same migration helper. AdMob archives are downloaded only from the live plugin server; none are stored in this npm package.
28
+ ZIPs may contain the files directly or one matching versioned folder. A complete
29
+ controller and state module are required before imports switch. An unavailable or
30
+ invalid remote ZIP leaves the installed package in use, with a warning. Unresolved
31
+ import targets stop migration before old packages are removed.
32
+
33
+ For future AdMob releases, upload `admob-nextgen-X.Y.zip` to
34
+ `https://htmlcodeplay.com/code-play-plugin/` and set `"admob-nextgen": "X.Y"`
35
+ in that server's `versions.json`. Version the folder, and keep module filenames
36
+ stable. The previous `admob-emi-nextgen` manifest key is accepted for versions
37
+ 4.0 and later during the transition. Apps automatically select a newer ZIP during
38
+ installation or their next normal pre-build; no per-app import changes are needed.
39
+ For older manifests without a folder release entry, migration checks the required
40
+ `admob-nextgen-4.0.zip` directly on the same server. If offline, an existing complete
41
+ folder remains usable; first migration stops with the legacy files preserved.
42
+
43
+ ## Platform builds and shared validation
44
+
45
+ Installing or updating `codeplay-common` updates the consuming project's `package.json`
46
+ to use the latest bundled pre-build script and adds these commands:
47
+
48
+ - `npm run build`: Android by default, including on macOS.
49
+ - `npm run build:ios`: sets `CODEPLAY_BUILD_PLATFORM=ios` and runs the same build pipeline.
50
+ - `npm run build-capacitor-android`: runs the shared checks and copies the web build to Android.
51
+
52
+ The pre-build script migrates direct `saveToGalleryAndSaveAnyFile` imports to
53
+ `@saveGallery` and sets the Vite alias to the matching Android or iOS helper.
54
+ Before changing source imports or the alias, it lists the build target, affected files,
55
+ and exact replacements. Press Enter or type `y` to continue; any other answer cancels.
56
+ Correct imports and alias targets continue without prompting. Missing helpers, mixed
57
+ versions and query/hash imports stop with an actionable error.
58
+
59
+ Source validation reuses a directory inventory and combines the gallery and editor
60
+ checks in one content pass. The inventory refreshes when generated or downloaded
61
+ files change the source tree.
62
+
63
+ Builds also keep `agent-temp/` ignored and remove existing `buildCodeplay/` ignore entries.
64
+ If `onesignal-cordova-plugin` is declared or installed, the pre-build script warns and
65
+ runs `npm uninstall onesignal-cordova-plugin`. It stops if removal fails or active
66
+ package imports remain. Legacy OneSignal patching and helper downloads are disabled.
67
+
68
+ ## Screenshot data
69
+
70
+ Shared screenshot helpers are installed into `scripts/screenshot/` and updated with
71
+ the package. App-specific data is not bundled with the package.
72
+ During an upgrade, cleanup removes only the two legacy helpers `frame-samples.js`
73
+ and `background-decorations.js` from `scripts-screenshot/screenshot/`, preserving
74
+ the folder, JSON data, and other app files.
75
+
76
+ `take-screen-image.js` creates `scripts-screenshot/screenshot/` and empty
77
+ `screenshot-copy.json` and `screenshot-info.json` files when needed. Existing files
78
+ are preserved during initialization, package installation, and cleanup. Capture
79
+ updates screenshot information; the AI text-generation workflow fills screenshot
80
+ copy. `--delete` removes matching records, and screenshot runs reconcile records
81
+ against the captured images (except dry runs and `--refresh-info`).
82
+
83
+ ## Agent instructions
84
+
85
+ Agent instructions are updated during `npm run build`, not during npm installation.
86
+ The build script reads the `agents` version from
87
+ `https://htmlcodeplay.com/code-play-plugin/versions.json` and downloads the matching
88
+ `agents-<version>.zip` archive when the project has no agent instructions or the
89
+ server version is newer.
90
+
91
+ The ZIP root must contain `AGENTS.md` and `AGENTS/`. These are copied directly to
92
+ the project root. The installed version is stored in `AGENTS/.codeplay-version`.
93
+ Existing files with matching names are replaced; project-only files with other
94
+ names inside `AGENTS/` are preserved.
95
+
96
+ For example, publish `agents-1.1.zip` and add this entry to the server's
97
+ `versions.json`:
98
+
99
+ ```json
100
+ "agents": "1.1"
101
+ ```
102
+
103
+ Donate to get full code including many common functions
104
+ https://ko-fi.com/codeplay
105
+
106
+ Version 4.6.1
107
+ Added automatic IAP startup integration for Framework7 home pages.
108
+ Updated minimum shared versions to IAP 4.2 and AdMob nextgen 2.5.
109
+
110
+ 4.2.8
111
+ baseline profile code modifications
112
+
113
+ Version 4.2.3
114
+ Added build warning confirmation when android.ORIENTATION is not "auto" or android.RESIZEABLE_ACTIVITY is not true.
115
+
116
+ Version 4.2.2
117
+ Added "bannerDisabledPages" property and its default value
118
+ The admob configuration default value priority is updated
119
+
120
+ Version 4.2.1
121
+ Updated AdMob nextgen file validation to match admob-emi-nextgen file names.
122
+
123
+ Version 4.2.0
124
+ Firebase related automatic changes updated
125
+
126
+ Version 4.1.9
127
+ Added AdMob nextgen 1.7 validation/default support for "overlappingHeight", "bannerTypeAndroidLandscape", and "bannerTypeiOSLandscape".
128
+
129
+ Version 4.1.8
130
+ "consentDebug: false" is added
131
+
132
+ Version 4.1.7
133
+ admob configuration automatically added.
134
+
135
+ Version 4.1.6
136
+ "setup-baseline-profile.js" modification, duplicate validation error fixed
137
+
138
+ Version 4.1.5
139
+ While isTesting is true it is not validated from our new configuration admob file, now it is solved
140
+
141
+ Version 4.1.4
142
+ hardcoded version is removed for the admob-emi-nextgen
143
+
144
+
145
+ Version 4.1.3
146
+ "consentDebug": false automatically adds if not
147
+
148
+ Version 4.1.2
149
+ Speedup
150
+
151
+ Version 4.1.1
152
+ Auto admob integration updated
153
+
154
+
155
+ version 4.0.9
156
+ packageJson.scripts["ionic:serve"] = "cross-env NODE_ENV=development vite"; this line updated in "sync-files.js"
157
+
158
+
159
+ version 4.0.8
160
+ safearea plugin is checked and removed automatically
161
+ Automatically added following in capacitor.config.json file
162
+ "SystemBars": {
163
+ "insetsHandling": "css"
164
+ }
165
+ patchFile() method is removed
166
+
167
+
168
+
169
+
170
+ Version 4.0.6
171
+ IAP related some automatic variable creation and validation
172
+ Fetch from vite.config.json file
173
+ 'import.meta.env.VITE_APP_UNIQUE_ID': JSON.stringify(APP_UNIQUE_ID),
174
+ 'import.meta.env.VITE_ANDROID_ANALYTICS_ENABLED': JSON.stringify(ANDROID_ANALYTICS_ENABLED),
175
+ 'import.meta.env.VITE_IOS_ANALYTICS_ENABLED': JSON.stringify(IOS_ANALYTICS_ENABLED),
176
+ 'import.meta.env.VITE_IAP_DESIGN': JSON.stringify(IAP_DESIGN),
177
+
178
+
179
+ Version 4.0.5
180
+ In "files\buildCodeplay\packageidBaseModification-1.4.js" SCHEDULE_EXACT_ALARM permission added for the app unique id 2 (resume generator app)
181
+
182
+
183
+ Version 4.0.4
184
+ 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"
185
+
186
+ Version 4.0.3
187
+ Old admob check performs through plugin location, but not it is validated from capacitor.config.json
188
+
189
+
190
+ Version: 4.0.2
191
+ After check & install/download the latest version, the re-check is cancelled now
192
+
193
+ Version: 4.0.1
194
+ Base profile script added
195
+
196
+
197
+ "version": "",
198
+ Version : 4.0.0 (Previous version 3.2.19)
199
+ 1) In here we are completly remove the admob-emi and use "capacitor-admob-nextgen"
200
+ 2) Removed "modify-plugin-xml.js"
201
+ 3)
package/RELEASE_NOTES.md CHANGED
@@ -1,4 +1,18 @@
1
- # Release notes
1
+ # Release notes
2
+
3
+ ## 4.9.8 — 2026-10-22
4
+
5
+ Version name: 4.9.8. Version code/build number: not applicable to this npm package.
6
+ Bundled pre-build script: 6.5.
7
+
8
+ 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`.
9
+
10
+ - Install AdMob as `src/js/Ads/admob-nextgen-4.0/` with stable `admob-emi-nextgen.js` and `app-open-state.js` filenames.
11
+ - Automatically migrate loose-file references, folder references and Vite aliases during installation and before builds.
12
+ - Preserve app-owned ad configuration and select each app's existing IAP analytics module.
13
+ - Download every AdMob folder ZIP from htmlcodeplay.com; no AdMob archive is included in this npm package.
14
+ - Validate ZIP contents before switching imports; retain the working package when a remote update fails.
15
+ - Validate the selected folder controller during final-release checks while continuing to reject test aliases.
2
16
 
3
17
  ## 4.7.7 — 2026-10-07
4
18