codeplay-common 4.10.3 → 4.10.5
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/CHANGELOG.md +20 -0
- package/RELEASE_NOTES.md +20 -0
- package/files/scripts-common/run-codeplay-sync-after.js +21 -0
- package/package.json +1 -1
- package/scripts/sync-files.js +26 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.10.5 — 2026-10-23
|
|
4
|
+
|
|
5
|
+
Version name: 4.10.5. Version code/build number: not applicable to this npm package.
|
|
6
|
+
|
|
7
|
+
Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
8
|
+
|
|
9
|
+
- Migrate known legacy filename lookups in an existing app configurator after installing shared scripts.
|
|
10
|
+
- Prefer unversioned pre-build and package-ID helpers while retaining the versioned fallback.
|
|
11
|
+
- Correct the known old sync-hook folder assignment without replacing app-specific configuration or adding a configurator to apps that do not have one.
|
|
12
|
+
|
|
13
|
+
## 4.10.4 — 2026-10-23
|
|
14
|
+
|
|
15
|
+
Version name: 4.10.4. Version code/build number: not applicable to this npm package.
|
|
16
|
+
|
|
17
|
+
Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
18
|
+
|
|
19
|
+
- Ship an updated sync-after hook for apps retaining the custom hook command after script migration.
|
|
20
|
+
- Run unversioned splash helpers instead of searching for removed versioned filenames.
|
|
21
|
+
- Resolve baseline profile setup from `scripts-common/` and preserve the existing native splash when no splash icon is configured.
|
|
22
|
+
|
|
3
23
|
## 4.10.3 — 2026-10-23
|
|
4
24
|
|
|
5
25
|
Version name: 4.10.3. Version code/build number: not applicable to this npm package.
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Release notes
|
|
2
2
|
|
|
3
|
+
## 4.10.5 — 2026-10-23
|
|
4
|
+
|
|
5
|
+
Version name: 4.10.5. Version code/build number: not applicable to this npm package.
|
|
6
|
+
|
|
7
|
+
Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
8
|
+
|
|
9
|
+
- Prevent app postinstall failures after shared scripts switch to unversioned filenames.
|
|
10
|
+
- Repair the known old sync-hook path during plugin installation.
|
|
11
|
+
- Preserve each app's custom configuration and leave apps without the affected configurator unchanged.
|
|
12
|
+
|
|
13
|
+
## 4.10.4 — 2026-10-23
|
|
14
|
+
|
|
15
|
+
Version name: 4.10.4. Version code/build number: not applicable to this npm package.
|
|
16
|
+
|
|
17
|
+
Files changed: `package.json`, `files/scripts-common/run-codeplay-sync-after.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
18
|
+
|
|
19
|
+
- Fix Android sync failures caused by the old versioned splash script lookup.
|
|
20
|
+
- Use the migrated baseline profile setup path.
|
|
21
|
+
- Update the custom sync hook automatically during plugin installation.
|
|
22
|
+
|
|
3
23
|
## 4.10.3 — 2026-10-23
|
|
4
24
|
|
|
5
25
|
Version name: 4.10.3. Version code/build number: not applicable to this npm package.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { execFileSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const root = path.resolve(__dirname, '..');
|
|
6
|
+
const buildDir = path.join(root, 'buildCodeplay');
|
|
7
|
+
|
|
8
|
+
function run(scriptPath) {
|
|
9
|
+
execFileSync(process.execPath, [scriptPath], { cwd: root, stdio: 'inherit' });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const splashIcon = path.join(root, 'resources', 'splash_icon.png');
|
|
13
|
+
if (fs.existsSync(splashIcon)) {
|
|
14
|
+
run(path.join(buildDir, 'add-splash-screen.js'));
|
|
15
|
+
run(path.join(buildDir, 'setSplashAnimation.js'));
|
|
16
|
+
} else {
|
|
17
|
+
console.log('ℹ️ Keeping the existing native splash because resources/splash_icon.png is not configured.');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
run(path.join(buildDir, 'manifestModification.js'));
|
|
21
|
+
run(path.join(__dirname, 'setup-baseline-profile.js'));
|
package/package.json
CHANGED
package/scripts/sync-files.js
CHANGED
|
@@ -30,6 +30,30 @@ function migrateAppScripts(projectRoot) {
|
|
|
30
30
|
move(source, destination);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function migrateAppConfigurator(projectRoot) {
|
|
34
|
+
const filePath = path.join(projectRoot, 'scripts-common', 'configure-codeplay-common.js');
|
|
35
|
+
if (!fs.existsSync(filePath)) return;
|
|
36
|
+
const original = fs.readFileSync(filePath, 'utf8');
|
|
37
|
+
let updated = original;
|
|
38
|
+
// Preserve app-specific configuration; extend only the known legacy lookups.
|
|
39
|
+
for (const [variable, script] of [
|
|
40
|
+
['buildFile', 'codeplayBeforeBuild.js'],
|
|
41
|
+
['packageIdFile', 'packageidBaseModification.js'],
|
|
42
|
+
]) {
|
|
43
|
+
updated = updated.replace(
|
|
44
|
+
`const ${variable} = fs.readdirSync(buildDir)`,
|
|
45
|
+
`const ${variable} = fs.existsSync(path.join(buildDir, '${script}'))\n` +
|
|
46
|
+
` ? '${script}'\n` +
|
|
47
|
+
` : fs.readdirSync(buildDir)`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
updated = updated.replace(
|
|
51
|
+
"packageJson.scripts['capacitor:sync:after'] = 'node scripts/run-codeplay-sync-after.js';",
|
|
52
|
+
"packageJson.scripts['capacitor:sync:after'] = 'node scripts-common/run-codeplay-sync-after.js';"
|
|
53
|
+
);
|
|
54
|
+
if (updated !== original) fs.writeFileSync(filePath, updated, 'utf8');
|
|
55
|
+
}
|
|
56
|
+
|
|
33
57
|
function findProjectRoot() {
|
|
34
58
|
// npm may execute a file: dependency's lifecycle in its source directory.
|
|
35
59
|
// INIT_CWD identifies the app that invoked npm in that case.
|
|
@@ -72,6 +96,7 @@ function install(options = {}) {
|
|
|
72
96
|
fs.cpSync(path.join(commonFiles, name), path.join(projectRoot, name), { recursive: true });
|
|
73
97
|
}
|
|
74
98
|
}
|
|
99
|
+
migrateAppConfigurator(projectRoot);
|
|
75
100
|
pkg.scripts = scripts;
|
|
76
101
|
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2) + '\n');
|
|
77
102
|
// Cleanup happens only after replacement assets and package commands exist.
|
|
@@ -80,7 +105,7 @@ function install(options = {}) {
|
|
|
80
105
|
// Coupled IAP/AdMob/Home migrations run together during before-build.
|
|
81
106
|
return pkg;
|
|
82
107
|
}
|
|
83
|
-
module.exports = { install, findProjectRoot, migrateAppScripts };
|
|
108
|
+
module.exports = { install, findProjectRoot, migrateAppScripts, migrateAppConfigurator };
|
|
84
109
|
if (require.main === module) {
|
|
85
110
|
try { install(); } catch (error) { console.error(error.message); process.exitCode = 1; }
|
|
86
111
|
}
|