@magmonium/cli 0.10.13 → 0.10.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.
@@ -17,6 +17,8 @@ const {
17
17
  collectDocs,
18
18
  runI18nGate,
19
19
  I18N_BASELINE_FILE,
20
+ I18nFixer,
21
+ isAppRepo,
20
22
  } = require('../../src/index.js');
21
23
 
22
24
  const fs = require('fs').promises;
@@ -35,6 +37,7 @@ const I18N_GATE_WHY = {
35
37
  * good assets in place for a running app.
36
38
  */
37
39
  async function assertI18nComplete(root, verbose) {
40
+ if (isAppRepo(root)) return reportAppRepoI18n(root, verbose);
38
41
  const { failures, tightenable, enOnly } = await runI18nGate(root, verbose);
39
42
  if (enOnly.length > 0) {
40
43
  console.log(
@@ -65,6 +68,26 @@ async function assertI18nComplete(root, verbose) {
65
68
  process.exit(1);
66
69
  }
67
70
 
71
+ /**
72
+ * An AppRepo's TranslationAssets live in its design (`.magmonium/assets/
73
+ * i18n.json`) and have no baseline (m-one-ui ADR 0223), so a gap never stops
74
+ * the compile — the app runs, showing English until the gap is filled. Said
75
+ * once, with the `/one` command that fills it.
76
+ */
77
+ async function reportAppRepoI18n(root, verbose) {
78
+ const incomplete = await new I18nFixer(root, verbose).scan();
79
+ if (incomplete.length === 0) return;
80
+ const absent = incomplete.filter((entry) => entry.existingFile === null).map((entry) => entry.key);
81
+ const shown = absent.slice(0, 5).join(', ') + (absent.length > 5 ? ', …' : '');
82
+ console.log(
83
+ `ℹ️ ${incomplete.length} TranslationAsset key(s) missing languages` +
84
+ (absent.length ? `, ${absent.length} with no asset (${shown})` : '') +
85
+ ' — compile continues.' +
86
+ '\n Fix in Claude Code: /one translate missing' +
87
+ '\n Or from the terminal: npx mag-cli fix-i18n'
88
+ );
89
+ }
90
+
68
91
  /**
69
92
  * Create a YamlCompiler with validation rules for a specific asset type
70
93
  * @param {string} assetType - The asset type (Button, Card, etc.)
package/codegen/index.js CHANGED
@@ -29071,7 +29071,7 @@ __export(package_exports2, {
29071
29071
  version: () => version2
29072
29072
  });
29073
29073
  var name2 = "@magmonium/cli";
29074
- var version2 = "0.10.13";
29074
+ var version2 = "0.10.14";
29075
29075
  var description2 = "A powerful and extensible asset compilation tool that can be shared across multiple projects";
29076
29076
  var bin = {
29077
29077
  "mag-cli": "bin/cli.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmonium/cli",
3
- "version": "0.10.13",
3
+ "version": "0.10.14",
4
4
  "description": "A powerful and extensible asset compilation tool that can be shared across multiple projects",
5
5
  "bin": {
6
6
  "mag-cli": "bin/cli.js"