@cmpose/core 0.2.7 → 0.3.0
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/README.md +1 -1
- package/package.json +1 -1
- package/src/fileService.js +3 -2
- package/src/game/flags.js +1 -1
- package/src/game/modules.js +1 -1
- package/src/game/unityYaml.js +1 -1
- package/src/generationRecord.js +1 -1
- package/src/pins.js +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# @cmpose/core
|
|
2
2
|
|
|
3
|
-
The cmpose generator library: it turns the pinned Compose Multiplatform template into a new project (validation, package and name rewrites, optional features and modules).
|
|
3
|
+
The cmpose generator library: it turns the pinned Compose Multiplatform template into a new project (validation, package and name rewrites, optional features and modules). See the README at the root of the cmpose repository for usage and development.
|
|
4
4
|
|
|
5
5
|
It also generates Unity mobile games from the pinned game template: `game.validateGame`, `game.generateGame` and `game.describeGame`.
|
package/package.json
CHANGED
package/src/fileService.js
CHANGED
|
@@ -48,11 +48,12 @@ function sanitizeXcconfigValue(s) {
|
|
|
48
48
|
return String(s).replace(/\r\n|\r|\n/g, ' ');
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
// The xcconfig bundle id line is written in one pass (idempotent
|
|
51
|
+
// The xcconfig bundle id line is written in one pass (idempotent). It is the bare package: TEAM_ID only picks the
|
|
52
|
+
// signing team, and a template's older $(TEAM_ID) suffix goes with the rest of the line
|
|
52
53
|
function replaceXcconfigBundleId(content, newPackage) {
|
|
53
54
|
return content.replace(
|
|
54
55
|
/^PRODUCT_BUNDLE_IDENTIFIER\s*=.*$/gm,
|
|
55
|
-
() => 'PRODUCT_BUNDLE_IDENTIFIER=' + newPackage
|
|
56
|
+
() => 'PRODUCT_BUNDLE_IDENTIFIER=' + newPackage
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
59
|
|
package/src/game/flags.js
CHANGED
|
@@ -7,7 +7,7 @@ const { readMetaGuid } = require('./guid');
|
|
|
7
7
|
const { findResidue } = require('./residue');
|
|
8
8
|
const { pruneBuildScenes } = require('./buildScenes');
|
|
9
9
|
|
|
10
|
-
// cmpose
|
|
10
|
+
// cmpose game: a feature flag is folders + marked C# blocks ('// cmpose:<flag>' … '// /cmpose:<flag>') +
|
|
11
11
|
// asmdef references + packages + a scripting define, all listed in the template's .cmpose/flags.json. A flag may
|
|
12
12
|
// require others ("requires"); turning one off turns off the flags that require it. A render
|
|
13
13
|
// other than the upstream one is an overlay under .cmpose/layers/ whose files replace the project's (same guids).
|
package/src/game/modules.js
CHANGED
|
@@ -3,7 +3,7 @@ const fs = require('fs-extra');
|
|
|
3
3
|
const { cloneWithNewGuids } = require('./guid');
|
|
4
4
|
const { MANIFEST } = require('./flags');
|
|
5
5
|
|
|
6
|
-
// cmpose
|
|
6
|
+
// cmpose game blank modules: each one is a copy of Features/Sample with fresh guids and the Sample names
|
|
7
7
|
// renamed, registered in the Game scope (one guarded installer line inside the cmpose:features markers, its using
|
|
8
8
|
// line, the App asmdef reference). A copy carries the Sample's flag parts (Sample/Ads …), so the flag manifest gets
|
|
9
9
|
// their twins and turning a flag off removes them from every copy. Only files are edited; Unity never runs here.
|
package/src/game/unityYaml.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// cmpose
|
|
1
|
+
// cmpose game: Unity's serialized YAML (ProjectSettings.asset, EditorBuildSettings.asset) is edited
|
|
2
2
|
// line by line, never through a YAML library: Unity's tags (--- !u!129 &1) and layout must survive.
|
|
3
3
|
// Every editor works inside one document and refuses to guess: no match or more than one throws.
|
|
4
4
|
|
package/src/generationRecord.js
CHANGED
|
@@ -35,7 +35,7 @@ function sanitizeFeaturesConfig(featuresConfig) {
|
|
|
35
35
|
/** The .cmpose/generation.json content written into the generated project (no personal data) */
|
|
36
36
|
function buildGenerationRecord({ templateRef, templateCommit, backendRevision, templateType, ci, minSdk, iosVersion, features, featuresConfig, now = new Date() }) {
|
|
37
37
|
return {
|
|
38
|
-
generator: 'cmpose
|
|
38
|
+
generator: 'cmpose',
|
|
39
39
|
generatedAt: now.toISOString(),
|
|
40
40
|
template: { ref: templateRef || null, commit: templateCommit || null },
|
|
41
41
|
backend: { revision: backendRevision || null },
|
package/src/pins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
// The template tags this core version was tested with (immutable tags)
|
|
3
3
|
module.exports = Object.freeze({
|
|
4
|
-
cmp: Object.freeze({ repo: 'whinstudio/cmpose-template', ref: 'template-2026.10.
|
|
4
|
+
cmp: Object.freeze({ repo: 'whinstudio/cmpose-template', ref: 'template-2026.10.17' }),
|
|
5
5
|
// The release step replaces the placeholder with the game template's tag
|
|
6
6
|
game: Object.freeze({ repo: 'whinstudio/cmpose-game-template', ref: 'game-template-2026.10.15.2' })
|
|
7
7
|
});
|