@multiplatform.one/cli 9.16.1 → 10.0.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.
@@ -5,6 +5,7 @@ import { generateDoctypeTypes, typesDrift } from "../commands/doctypeTypes.mjs";
5
5
  import { runE2ESession } from "../commands/e2e.mjs";
6
6
  import { SINGLETON_APPS, init } from "../commands/init.mjs";
7
7
  import { pythonFiles, runPythonTools } from "../commands/pythonTools.mjs";
8
+ import { s as runThemeKeys, t as formatThemeKeysReport } from "../themeKeys-DUM-GCcW.mjs";
8
9
  import { updateApp } from "../commands/updateApp.mjs";
9
10
  import { availableServices, parseTestTiers, runBuild, runFrappeBench, runIntegrationTests, runRootFormat, runRootLint, runUnitTests, testTiers, waitFunctions } from "../commands/verbs.mjs";
10
11
  import fsSync from "node:fs";
@@ -210,6 +211,20 @@ frappe.command("types").description("generate TypeScript types for doctypes from
210
211
  }
211
212
  await fs.writeFile(out, generated);
212
213
  });
214
+ program.command("migrate").description("source migrations that follow an MPO upgrade, each a dry run unless --write").command("theme-keys").argument("[paths...]", "files or directories to rename in (default: the whole project)").option("--write", "apply the renames; without it the run only prints per-file counts").option("--exclude <path>", "leave a file or directory alone (repeatable)", collect, []).option("--json <file>", "also write the full report, unclassified sites included, as JSON").description("rename Tamagui 2 camelCase theme keys to Tamagui 3 kebab-case ($color-12 to $color-12, theme.borderColorControl to theme[\"border-color-control\"]); run after mpo update and Tamagui's flat-values codemod").action(async (paths, options) => {
215
+ const fromCwd = (entry) => path.resolve(process.cwd(), entry);
216
+ const report = await runThemeKeys(projectRoot, {
217
+ paths: paths.map(fromCwd),
218
+ exclude: options.exclude.map((entry) => path.relative(projectRoot, fromCwd(entry))),
219
+ write: Boolean(options.write)
220
+ });
221
+ if (paths.length && !report.scanned && !report.skipped.length) {
222
+ console.error(`no source file under ${paths.join(", ")}`);
223
+ process.exit(2);
224
+ }
225
+ console.log(formatThemeKeysReport(report));
226
+ if (options.json) await fs.writeFile(fromCwd(options.json), `${JSON.stringify(report, null, 2)}\n`);
227
+ });
213
228
  program.command("build").argument("[args...]", `build to run: ${[...availableServices, "packages"].join(", ")} (default: all)`).description("run build command").action(async (args) => {
214
229
  await runBuild(args, projectRoot);
215
230
  });
@@ -0,0 +1,3 @@
1
+ import { a as renameThemeKeysInCss, c as themeKeyForms, i as renameCssVars, l as themeKeysSkipMarker, n as isStyleValueProp, o as renameThemeKeysInSource, r as listThemeKeyFiles, s as runThemeKeys, t as formatThemeKeysReport } from "../themeKeys-DUM-GCcW.mjs";
2
+
3
+ export { formatThemeKeysReport, isStyleValueProp, listThemeKeyFiles, renameCssVars, renameThemeKeysInCss, renameThemeKeysInSource, runThemeKeys, themeKeyForms, themeKeysSkipMarker };
package/lib/source.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "9.16.1",
2
+ "cliVersion": "10.0.0",
3
3
  "url": "https://git.corp.bitspur.com/multiplatform.one/mpo.git",
4
- "sha": "2abf07dfc9bf29b8b3ce2d2800fc51a8b7af9f08"
4
+ "sha": "f668ffcc2b91273528dee962d82ac7ada952e1d8"
5
5
  }