@cmpose/core 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmpose/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "cmpose project generator core (Compose Multiplatform)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,8 +15,7 @@ function describeGame() {
15
15
  flags: { showcase: GAME_SCHEMA.flags.slice(), blank: [] },
16
16
  features: [],
17
17
  minSdk: GAME_SCHEMA.limits.minSdkMin,
18
- iosVersion: GAME_SCHEMA.limits.iosVersionMin,
19
- ci: false
18
+ iosVersion: GAME_SCHEMA.limits.iosVersionMin
20
19
  },
21
20
  contract: gameContractFacts()
22
21
  };
@@ -3,7 +3,6 @@ const fs = require('fs-extra');
3
3
  const path = require('path');
4
4
  const { log } = require('../log');
5
5
  const pins = require('../pins');
6
- const { applyCiOption } = require('../ciOption');
7
6
  const { COMMIT_FILE_NAME, REF_FILE_NAME } = require('../templateVersions');
8
7
  const { GAME_SCHEMA } = require('./contract');
9
8
  const { cloneModules } = require('./modules');
@@ -15,8 +14,9 @@ const { buildGameRecord, writeGameRecord } = require('./record');
15
14
  const { verifyGameProject } = require('./verifier');
16
15
 
17
16
  // The template cache's own records and Unity's local state never reach the project; nor does the template's
18
- // LICENSE (the generated project is the user's, to license as they choose)
19
- const LEFTOVERS = ['.git', COMMIT_FILE_NAME, REF_FILE_NAME, 'LICENSE', 'Library', 'Temp', 'Logs', 'UserSettings'];
17
+ // LICENSE (the generated project is the user's, to license as they choose), nor an older template's GameCI
18
+ // workflow (.github; GameCI is not offered for games)
19
+ const LEFTOVERS = ['.git', COMMIT_FILE_NAME, REF_FILE_NAME, 'LICENSE', 'Library', 'Temp', 'Logs', 'UserSettings', '.github'];
20
20
  const PACKAGE_GUIDS = path.join('.cmpose', 'package-guids.txt');
21
21
 
22
22
  function gameWarnings(value) {
@@ -57,10 +57,9 @@ async function generateGame(value, { projectDir, template = null, coreVersion, g
57
57
  await applyFlags(projectDir, { kind: value.templateType, render: value.render, off });
58
58
  log.info(`✅ Applied ${value.templateType} (${value.render}), flags off: ${off.length ? off.join(', ') : 'none'}`);
59
59
 
60
- // 4–6. identity, real IDs, CI and README
60
+ // 4–6. identity, real IDs and README
61
61
  await applyGameIdentity(projectDir, value);
62
62
  await writeGameIds(projectDir, value.ids);
63
- await applyCiOption(projectDir, value.ci);
64
63
  await applyGameReadme(projectDir, value);
65
64
  log.info(`✅ Renamed to ${value.companyName}.${value.projectName} (${value.packageName})`);
66
65
 
@@ -4,8 +4,8 @@ const fs = require('fs-extra');
4
4
  const { removeMarkedBlock } = require('../readmeService');
5
5
  const { GAME_SCHEMA } = require('./contract');
6
6
 
7
- // The generated README keeps the <!-- cmpose:<flag> --> sections of the flags that are on; other marked
8
- // sections (cmpose:ci) are not flags and stay. Returns false when the project has no README.
7
+ // The generated README keeps the <!-- cmpose:<flag> --> sections of the flags that are on; an older template's
8
+ // <!-- cmpose:ci --> section always goes (GameCI is not offered for games). Returns false when the project has no README.
9
9
  async function applyGameReadme(projectDir, { flags }) {
10
10
  const file = path.join(projectDir, 'README.md');
11
11
  if (!(await fs.pathExists(file))) return false;
@@ -13,6 +13,7 @@ async function applyGameReadme(projectDir, { flags }) {
13
13
  const before = await fs.readFile(file, 'utf8');
14
14
  let text = before;
15
15
  for (const flag of GAME_SCHEMA.flags) if (!on.has(flag)) text = removeMarkedBlock(text, `cmpose:${flag}`);
16
+ text = removeMarkedBlock(text, 'cmpose:ci');
16
17
  if (text !== before) await fs.writeFile(file, text);
17
18
  return true;
18
19
  }
@@ -33,7 +33,6 @@ function buildGameRecord({ template, coreVersion, generatorVersion = null, value
33
33
  render: value.render,
34
34
  flags,
35
35
  features: strings(value.features),
36
- ci: value.ci === true,
37
36
  minSdk: value.minSdk,
38
37
  iosVersion: value.iosVersion,
39
38
  ids: idStatuses(flags, value.ids),
@@ -168,7 +168,9 @@ function validateGame(input) {
168
168
  iosVersion = v;
169
169
  }
170
170
 
171
+ // GameCI is not offered for Unity games: false (or absent) is accepted and dropped
171
172
  if (input.ci !== undefined && typeof input.ci !== 'boolean') return fail('ci must be a boolean');
173
+ if (input.ci === true) return fail('ci is not offered for Unity games');
172
174
 
173
175
  let ids = {};
174
176
  if (input.ids !== undefined) {
@@ -179,7 +181,7 @@ function validateGame(input) {
179
181
 
180
182
  return {
181
183
  ok: true,
182
- value: { projectName, appName, packageName, companyName, templateType, render, flags, features, minSdk, iosVersion, ci: input.ci === true, ids }
184
+ value: { projectName, appName, packageName, companyName, templateType, render, flags, features, minSdk, iosVersion, ids }
183
185
  };
184
186
  }
185
187
 
package/src/pins.js CHANGED
@@ -3,5 +3,5 @@
3
3
  module.exports = Object.freeze({
4
4
  cmp: Object.freeze({ repo: 'Keremturker/cmpose-template', ref: 'template-2026.10.14' }),
5
5
  // The release step replaces the placeholder with the game template's tag
6
- game: Object.freeze({ repo: 'Keremturker/cmpose-game-template', ref: 'game-template-2026.10.15' })
6
+ game: Object.freeze({ repo: 'Keremturker/cmpose-game-template', ref: 'game-template-2026.10.15.1' })
7
7
  });